Skip to content
Snippets Groups Projects

Bugfix: correctly compute transfer amount

Closed Carles Barrobés requested to merge transfer-fee-bug into develop
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -463,7 +463,7 @@ export class AccountsService extends RxStartableService<AccountsState> {
@@ -463,7 +463,7 @@ export class AccountsService extends RxStartableService<AccountsState> {
// Compute total amount (with fee) and remove decimals
// Compute total amount (with fee) and remove decimals
const powBase = Math.pow(10, currency.decimals || 0);
const powBase = Math.pow(10, currency.decimals || 0);
const totalAmount = Math.floor((amount + fee) * powBase);
const totalAmount = Math.floor(amount * powBase + fee);
// Get pair, and unlock it
// Get pair, and unlock it
const issuerPair = keyring.getPair(issuerAccount.address);
const issuerPair = keyring.getPair(issuerAccount.address);
Loading