Skip to content

Commit

Permalink
Make get_native_token_id public
Browse files Browse the repository at this point in the history
  • Loading branch information
karim-en committed Dec 9, 2024
1 parent db88f8d commit 45f8ed7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions near/omni-bridge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,13 @@ impl Contract {
}
}

pub fn get_native_token_id(&self, origin_chain: ChainKind) -> AccountId {
let native_token_address =
OmniAddress::new_zero(origin_chain).sdk_expect("ERR_FAILED_TO_GET_ZERO_ADDRESS");

self.get_token_id(&native_token_address)
}

pub fn get_transfer_message(&self, transfer_id: TransferId) -> TransferMessage {
self.pending_transfers
.get(&transfer_id)
Expand Down Expand Up @@ -1025,13 +1032,6 @@ impl Contract {
env::log_str(&OmniBridgeEvent::FinTransferEvent { transfer_message }.to_log_string());
}

fn get_native_token_id(&self, origin_chain: ChainKind) -> AccountId {
let native_token_address =
OmniAddress::new_zero(origin_chain).sdk_expect("ERR_FAILED_TO_GET_ZERO_ADDRESS");

self.get_token_id(&native_token_address)
}

fn check_or_pay_ft_storage(
mut main_promise: Promise,
storage_deposit_actions: &Vec<StorageDepositAction>,
Expand Down

0 comments on commit 45f8ed7

Please sign in to comment.