Skip to content

Commit

Permalink
Remove code duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
vladbochok committed Jan 14, 2022
1 parent 7676b83 commit adf87a8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions contracts/contracts/ZkSync.sol
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,7 @@ contract ZkSync is UpgradeableMaster, Storage, Config, Events, ReentrancyGuard {
withdrawnNFTs[op.tokenId] = address(_factory);
emit WithdrawalNFT(op.tokenId);
} catch {
pendingWithdrawnNFTs[op.tokenId] = op;
emit WithdrawalNFTPending(op.tokenId);
storePendingNFT(op);
}
}

Expand Down Expand Up @@ -489,9 +488,7 @@ contract ZkSync is UpgradeableMaster, Storage, Config, Events, ReentrancyGuard {
if (sent) {
emit Withdrawal(_tokenId, _amount);
} else {
bytes22 packedBalanceKey = packAddressAndTokenId(_recipient, _tokenId);
increaseBalanceToWithdraw(packedBalanceKey, _amount);
emit WithdrawalPending(_tokenId, _recipient, _amount);
storePendingBalance(_tokenId, _recipient, _amount);
}
}

Expand Down

0 comments on commit adf87a8

Please sign in to comment.