From 1ba9cc6a14246c507b55f3a56c1cc74090394382 Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Tue, 6 Dec 2022 17:43:51 -0500 Subject: [PATCH] hi --- package.json | 2 +- src/bridge/bridge.ts | 3 ++- src/swappools.ts | 2 ++ src/tokens.ts | 3 ++- test/synapsebridge/getEstimatedBridgeOutput-test.ts | 4 +++- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index e32a7344..fd556450 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@synapseprotocol/sdk", - "version": "0.95.1-alpha.64", + "version": "0.95.1-alpha.65", "description": "Synapse Protocol's NodeJS SDK.", "repository": "github.com/synapsecns/sdk", "author": "synapsecns", diff --git a/src/bridge/bridge.ts b/src/bridge/bridge.ts index 3d5c6588..444ee3b3 100644 --- a/src/bridge/bridge.ts +++ b/src/bridge/bridge.ts @@ -815,7 +815,8 @@ export namespace Bridge { Tokens.USDC.id, Tokens.USDT.id, Tokens.DAI.id, - Tokens.WBTC.id + Tokens.WBTC.id, + Tokens.WAVAX.id ]) if (chainIdTo === ChainId.ETH) { easyRedeems.push(Tokens.WETH.id) diff --git a/src/swappools.ts b/src/swappools.ts index 9de08ecf..b4b3aba6 100644 --- a/src/swappools.ts +++ b/src/swappools.ts @@ -774,12 +774,14 @@ export namespace SwapPools { [SwapType.WBTC]: [Tokens.WBTC], [SwapType.KLAY]: KLAY_Pool.poolTokens, [SwapType.JEWEL]: [Tokens.JEWEL], + [SwapType.AVAX]: [Tokens.WAVAX], }, swappableSwapGroups: { [SwapType.ETH]: {poolTokens: [Tokens.ETH, Tokens.WETH], swapType: SwapType.ETH}, [SwapType.WBTC]: {poolTokens: [Tokens.WBTC], swapType: SwapType.WBTC}, [SwapType.KLAY]: KLAY_Pool, [SwapType.JEWEL]: JEWEL_POOL, + [SwapType.AVAX]: WAVAX_Pool, }, }, }; diff --git a/src/tokens.ts b/src/tokens.ts index f332f7b8..9c0be2e3 100644 --- a/src/tokens.ts +++ b/src/tokens.ts @@ -373,7 +373,8 @@ export namespace Tokens { [ChainId.MOONBEAM]: "0xA1f8890E39b4d8E33efe296D698fe42Fb5e59cC3", [ChainId.AVALANCHE]: "0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7", [ChainId.DFK]: "0xB57B60DeBDB0b8172bb6316a9164bd3C695F133a", - [ChainId.HARMONY]: "0xD9eAA386cCD65F30b77FF175F6b52115FE454fD6" // synAVAX, but here for compat. + [ChainId.HARMONY]: "0xD9eAA386cCD65F30b77FF175F6b52115FE454fD6", // synAVAX, but here for compat. + [ChainId.KLAYTN]: "0xCd8fE44A29Db9159dB36f96570d7A4d91986f528" }, swapType: SwapType.AVAX, underlyingToken: AVAX, diff --git a/test/synapsebridge/getEstimatedBridgeOutput-test.ts b/test/synapsebridge/getEstimatedBridgeOutput-test.ts index b3fdf80e..c81f206c 100644 --- a/test/synapsebridge/getEstimatedBridgeOutput-test.ts +++ b/test/synapsebridge/getEstimatedBridgeOutput-test.ts @@ -252,7 +252,9 @@ describe("SynapseBridge - getEstimatedBridgeOutput tests", function(this: Mocha. makeTestCase(Tokens.NETH, Tokens.DFK_ETH, ChainId.AVALANCHE, ChainId.DFK), makeTestCase(Tokens.DFK_ETH, Tokens.WETH, ChainId.DFK, ChainId.OPTIMISM), makeTestCase(Tokens.DFK_ETH, Tokens.NETH, ChainId.DFK, ChainId.FANTOM), - makeTestCase(Tokens.GAS_JEWEL, Tokens.JEWEL, ChainId.DFK, ChainId.KLAYTN) + makeTestCase(Tokens.GAS_JEWEL, Tokens.JEWEL, ChainId.DFK, ChainId.KLAYTN), + makeTestCase(Tokens.WAVAX, Tokens.WAVAX, ChainId.DFK, ChainId.KLAYTN), + makeTestCase(Tokens.WAVAX, Tokens.WAVAX, ChainId.KLAYTN, ChainId.DFK) ].forEach((tc: TestCase) => { const [describeTitle, bridgeOutputTestTitle, transactionTestTitle, approveTestTitle] = makeTestName(tc);