Skip to content

Commit

Permalink
- refactored condition
Browse files Browse the repository at this point in the history
  • Loading branch information
iulianpascalau committed Jul 2, 2024
1 parent baeac51 commit 336bdcc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bridge-proxy/src/bridge-proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ pub trait BridgeProxyContract:
#[endpoint]
fn deposit(&self, eth_tx: EthTransaction<Self::Api>) {
self.require_not_paused();
let (token_id, amount) = self.call_value().single_fungible_esdt();
let caller = self.blockchain().get_caller();
require!(
caller == self.multi_transfer_address().get(),
"Only MultiTransfer can do deposits"
);
self.pending_transactions().push(&eth_tx);
}

Expand Down

0 comments on commit 336bdcc

Please sign in to comment.