Skip to content

Commit

Permalink
feat: decided which finalize_transfer to call based on token addr
Browse files Browse the repository at this point in the history
  • Loading branch information
frolvanya committed Dec 20, 2024
1 parent 343df38 commit 1dbe563
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions bridge-sdk/connectors/omni-connector/src/omni_connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -515,10 +515,17 @@ impl OmniConnector {
})?,
};

solana_bridge_client
.finalize_transfer(payload, solana_token)
.await
.map_err(|_| BridgeSdkError::UnknownError)
if solana_token == Pubkey::default() {
solana_bridge_client
.finalize_transfer_sol(payload)
.await
.map_err(|_| BridgeSdkError::UnknownError)
} else {
solana_bridge_client
.finalize_transfer(payload, solana_token)
.await
.map_err(|_| BridgeSdkError::UnknownError)
}
}

pub async fn log_metadata(&self, log_metadata_args: LogMetadataArgs) -> Result<String> {
Expand Down

0 comments on commit 1dbe563

Please sign in to comment.