Skip to content

Commit

Permalink
chore: added abstract method for calling claim_fee on NEAR chain
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Frolov authored and Ivan Frolov committed Nov 28, 2024
1 parent 1d56481 commit 24ed394
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions bridge-sdk/connectors/omni-connector/src/omni_connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use ethers::prelude::*;
use near_primitives::hash::CryptoHash;
use near_primitives::types::AccountId;
use near_primitives::views::FinalExecutionOutcomeView;
use omni_types::locker_args::StorageDepositArgs;
use omni_types::locker_args::{ClaimFeeArgs, StorageDepositArgs};
use omni_types::prover_args::EvmVerifyProofArgs;
use omni_types::prover_result::ProofKind;
use omni_types::Fee;
Expand Down Expand Up @@ -135,12 +135,19 @@ impl OmniConnector {
fee: Option<Fee>,
) -> Result<FinalExecutionOutcomeView> {
let near_bridge_client = self.near_bridge_client()?;

near_bridge_client
.sign_transfer(origin_nonce, fee_recipient, fee)
.await
}

pub async fn near_claim_fee(
&self,
claim_fee_args: ClaimFeeArgs,
) -> Result<FinalExecutionOutcomeView> {
let near_bridge_client = self.near_bridge_client()?;
near_bridge_client.claim_fee(claim_fee_args).await
}

pub async fn init_transfer(&self, init_transfer_args: InitTransferArgs) -> Result<String> {
match init_transfer_args {
InitTransferArgs::NearInitTransfer {
Expand Down

0 comments on commit 24ed394

Please sign in to comment.