From 74286d2d4d9510b213b9a7781cf8ec99242d7d0f Mon Sep 17 00:00:00 2001 From: Csongor Kiss Date: Sun, 10 Dec 2023 19:45:09 +0000 Subject: [PATCH] terra/token-bridge: simplify conditional --- terra/contracts/token-bridge/src/contract.rs | 36 +++++++------------- 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/terra/contracts/token-bridge/src/contract.rs b/terra/contracts/token-bridge/src/contract.rs index 919bf7fad0..5dbe11abdd 100644 --- a/terra/contracts/token-bridge/src/contract.rs +++ b/terra/contracts/token-bridge/src/contract.rs @@ -681,30 +681,18 @@ fn handle_complete_transfer( relayer_address: &HumanAddr, ) -> StdResult { let transfer_info = TransferInfo::deserialize(data)?; - if transfer_info.token_chain == CHAIN_ID { - if is_native_id(transfer_info.token_address.as_slice()) { - handle_complete_transfer_token_native( - deps, - env, - info, - emitter_chain, - emitter_address, - transfer_type, - data, - relayer_address, - ) - } else { - handle_complete_transfer_token( - deps, - env, - info, - emitter_chain, - emitter_address, - transfer_type, - data, - relayer_address, - ) - } + if transfer_info.token_chain == CHAIN_ID && is_native_id(transfer_info.token_address.as_slice()) + { + handle_complete_transfer_token_native( + deps, + env, + info, + emitter_chain, + emitter_address, + transfer_type, + data, + relayer_address, + ) } else { handle_complete_transfer_token( deps,