Skip to content

Commit

Permalink
Merge pull request #176 from multiversx/v3-fixes-part-2
Browse files Browse the repository at this point in the history
feat/v3 fixes part 2
  • Loading branch information
dragos-rebegea authored Jul 2, 2024
2 parents 1626a82 + 336bdcc commit 38f8f74
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bridge-proxy/src/bridge-proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +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();
require!(token_id == eth_tx.token_id, "Invalid token id");
require!(amount == eth_tx.amount, "Invalid amount");
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 38f8f74

Please sign in to comment.