Fees should use the right units
3 unresolved threads
3 unresolved threads
Compare changes
@@ -479,9 +479,8 @@ export class AccountsService extends RxStartableService<AccountsState> {
Follow-up to !5 (comment 40410)
Looking at the code in develop right now I think it still suffers from one of the issues I mentioned, which is that the fees are multiplied by
powBase
(https://git.duniter.org/clients/cesium-grp/cesium2s/-/blob/develop/src/app/account/accounts.service.ts?ref_type=heads#L483) when in fact they souldn't, as they are in GDcents and not GD (see https://git.duniter.org/clients/cesium-grp/cesium2s/-/blob/develop/src/app/network/network.service.ts?ref_type=heads#L25).
I dont understand why we need to remove this line ? The
fee
argument (see function jsdoc) are in decimals. So we need to convert in cents, before using it.Interesting... although while it is true that the docstring mentions decimals, your comment contradicts my observations, which are:
So for the time being I would even remove the
fee
parameter and always use the network values (in cents) to prevent tripping others up.But I see your point, this is not really a bug (it only converts the undefined argument to align the units) but it makes the code confusing and unit mismatch is a potential source of bugs and the variable names aren't helping make out the difference.