Skip to content
Snippets Groups Projects

Fees should use the right units

Closed Carles Barrobés requested to merge transfer-fee-bug into develop

Files

@@ -479,9 +479,8 @@ export class AccountsService extends RxStartableService<AccountsState> {
@@ -479,9 +479,8 @@ export class AccountsService extends RxStartableService<AccountsState> {
throw new Error('ERROR.AMOUNT_NEGATIVE');
throw new Error('ERROR.AMOUNT_NEGATIVE');
}
}
// Remove decimals, in amount and fee
// Convert amount to right unit ("cents")
amount = amount * powBase;
amount = amount * powBase;
if (fee) fee = fee * powBase;
// Check fee validity
// Check fee validity
fee = fee || currency.fees?.tx || 0;
fee = fee || currency.fees?.tx || 0;
Loading