Skip to content

Commit

Permalink
Order in handles has to match order in circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
ly0va committed May 31, 2021
1 parent 0b96087 commit 1321de4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/lib/state/src/handler/swap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,11 @@ impl ZkSyncState {
use crate::state::BalanceUpdate::*;

let updates = vec![
self.update_account(op.submitter, op.tx.fee_token, Sub(op.tx.fee.clone()), 1),
self.update_account(op.accounts.0, token_0, Sub(amounts.0.clone()), increment_0),
self.update_account(op.recipients.1, token_0, Add(amounts.0), 0),
self.update_account(op.accounts.1, token_1, Sub(amounts.1.clone()), increment_1),
self.update_account(op.recipients.0, token_1, Add(amounts.1), 0),
self.update_account(op.recipients.1, token_0, Add(amounts.0), 0),
self.update_account(op.submitter, op.tx.fee_token, Sub(op.tx.fee.clone()), 1),
];

let fee = CollectedFee {
Expand Down

0 comments on commit 1321de4

Please sign in to comment.