Skip to content

Commit

Permalink
Operator precedence
Browse files Browse the repository at this point in the history
  • Loading branch information
slumber committed Feb 3, 2021
1 parent 1df2949 commit 1bdce0d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sdk/zksync.js/src/batch-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ export class BatchBuilder {
for (const tx of this.txs) {
const fee = tx.tx.fee;
const token = tx.token;
totalFee.set(token, totalFee.get(token) || 0 + fee);
const curr: BigNumber = totalFee.get(token) || BigNumber.from(0);
totalFee.set(token, curr.add(fee));
}

const { txs, message } = await this.processTransactions();
Expand Down

0 comments on commit 1bdce0d

Please sign in to comment.