Skip to content

Commit

Permalink
fix: make transfer callback private
Browse files Browse the repository at this point in the history
  • Loading branch information
vasyafromrussia committed Jan 24, 2024
1 parent 8fe03ae commit 4f7cb09
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Binary file modified res/sweat.wasm
Binary file not shown.
5 changes: 1 addition & 4 deletions sweat/src/defer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,8 @@ pub trait FungibleTokenTransferCallback {

#[near_bindgen]
impl FungibleTokenTransferCallback for Contract {
#[private]
fn on_record(&mut self, receiver_id: AccountId, amount: U128, fee_account_id: AccountId, fee: U128) {
if !self.oracles.contains(&env::signer_account_id()) {
panic_str("The operation can be only initiated by an oracle");
}

if !is_promise_success() {
panic_str("Failed to record data in holding account");
}
Expand Down

0 comments on commit 4f7cb09

Please sign in to comment.