diff --git a/ActionTransfer.js b/ActionTransfer.js index 090ea1d..6c7a332 100644 --- a/ActionTransfer.js +++ b/ActionTransfer.js @@ -25,9 +25,9 @@ MOM.executableMe = async function() { MOM.executeMe = async function () { let sender= await wo.Account.getOne({Account: { address: this.actorAddress }}) if (sender && sender.type !== 'multisig' && this.toAddress != this.actorAddress && sender.balance >= this.amount + this.fee){ - await sender.setMe({Account:{ balance: sender.balance-this.amount-this.fee }, cond:{ address:sender.address}}) + await sender.setMe({Account:{ balance: Number(sender.balance)-Number(this.amount)-Number(this.fee), countAction: sender.countAction+1 }, cond:{ address:sender.address}}) let getter= await wo.Account.getOne({Account: { address: this.toAddress }}) || await wo.Account.addOne({Account: { address: this.toAddress }}) - await getter.setMe({Account:{ balance: getter.balance+this.amount }, cond:{ address:getter.address}}) + await getter.setMe({Account:{ balance: Number(getter.balance)+Number(this.amount), countAction: getter.countAction+1 }, cond:{ address:getter.address}}) mylog.info('Excecuted action='+JSON.stringify(this)) return this }