Skip to content

Commit

Permalink
fix the receipt address with tron
Browse files Browse the repository at this point in the history
  • Loading branch information
haunv3 committed Sep 26, 2024
1 parent 8236cd5 commit e9401ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/universal-swap/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oraichain/oraidex-universal-swap",
"version": "1.1.9",
"version": "1.1.10",
"main": "build/index.js",
"files": [
"build/"
Expand Down
10 changes: 5 additions & 5 deletions packages/universal-swap/src/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,14 @@ import {
IBC_WASM_CONTRACT,
IBC_WASM_CONTRACT_TEST,
tokenMap,
AmountDetails,
buildMultipleExecuteMessages,
ibcInfosOld,
checkValidateAddressWithNetwork,
BigDecimal,
OSMOSIS_ROUTER_CONTRACT,
cosmosChains,
parseAssetInfoFromContractAddrOrDenom,
TON_ORAICHAIN_DENOM,
toDisplay
toDisplay,
EVM_CHAIN_ID_COMMON
} from "@oraichain/oraidex-common";
import { ethers } from "ethers";
import { UniversalSwapHelper } from "./helper";
Expand Down Expand Up @@ -1163,7 +1161,9 @@ export class UniversalSwapHandler {
if (!isValidRecipient.isValid) throw generateError("Recipient address invalid!");

toAddress =
originalToToken.chainId === "0x2b6653dc" ? tronToEthAddress(recipientAddress) : this.swapData.recipientAddress;
originalToToken.chainId === EVM_CHAIN_ID_COMMON.TRON_CHAIN_ID
? tronToEthAddress(recipientAddress)
: this.swapData.recipientAddress;
} else {
toAddress = await this.getUniversalSwapToAddress(originalToToken.chainId, {
metamaskAddress: evm,
Expand Down

0 comments on commit e9401ae

Please sign in to comment.