From 4f530317972401d3bbd4e39b211af60771ccfeb3 Mon Sep 17 00:00:00 2001 From: Emily Williams Date: Thu, 3 Oct 2024 13:42:57 -0400 Subject: [PATCH] fix(router-sdk): Update router-sdk to consumer latest v4-sdk (#142) --- sdks/router-sdk/package.json | 2 +- sdks/router-sdk/src/utils/pathCurrency.ts | 2 +- yarn.lock | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sdks/router-sdk/package.json b/sdks/router-sdk/package.json index 070554205..fa7bc6c1e 100644 --- a/sdks/router-sdk/package.json +++ b/sdks/router-sdk/package.json @@ -25,7 +25,7 @@ "@uniswap/swap-router-contracts": "^1.3.0", "@uniswap/v2-sdk": "^4.6.0", "@uniswap/v3-sdk": "^3.17.0", - "@uniswap/v4-sdk": "^1.6.0" + "@uniswap/v4-sdk": "^1.9.0" }, "devDependencies": { "@types/jest": "^24.0.25", diff --git a/sdks/router-sdk/src/utils/pathCurrency.ts b/sdks/router-sdk/src/utils/pathCurrency.ts index 1d793ae54..6143817b3 100644 --- a/sdks/router-sdk/src/utils/pathCurrency.ts +++ b/sdks/router-sdk/src/utils/pathCurrency.ts @@ -21,7 +21,7 @@ export function getPathCurrency(currency: Currency, pool: TPool): Currency { // return native currency if pool involves native version of wrapped currency (only applies to V4) } else if (pool instanceof V4Pool) { - if (pool.currency0.wrapped.equals(currency)) { + if (pool.token0.wrapped.equals(currency)) { return pool.token0 } else if (pool.token1.wrapped.equals(currency)) { return pool.token1 diff --git a/yarn.lock b/yarn.lock index 07174f440..adf469ddb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4633,7 +4633,7 @@ __metadata: "@uniswap/swap-router-contracts": ^1.3.0 "@uniswap/v2-sdk": ^4.6.0 "@uniswap/v3-sdk": ^3.17.0 - "@uniswap/v4-sdk": ^1.6.0 + "@uniswap/v4-sdk": ^1.9.0 prettier: ^2.4.1 tsdx: ^0.14.1 languageName: unknown @@ -4890,16 +4890,16 @@ __metadata: languageName: node linkType: hard -"@uniswap/v4-sdk@npm:^1.6.0, @uniswap/v4-sdk@npm:^1.6.3": - version: 1.8.1 - resolution: "@uniswap/v4-sdk@npm:1.8.1" +"@uniswap/v4-sdk@npm:^1.6.0, @uniswap/v4-sdk@npm:^1.6.3, @uniswap/v4-sdk@npm:^1.9.0": + version: 1.9.0 + resolution: "@uniswap/v4-sdk@npm:1.9.0" dependencies: "@ethersproject/solidity": ^5.0.9 "@uniswap/sdk-core": ^5.3.1 "@uniswap/v3-sdk": 3.12.0 tiny-invariant: ^1.1.0 tiny-warning: ^1.0.3 - checksum: d19ed9242ad177fa219d78ef83a221b61dd611c9935b0cb5be28b51aeb6e100df2825a9b433462240fb2dbf1e1877c32e18b0ae3d25ec480a7d892773c0ef31d + checksum: 1483b4ab207c4ffd3f144f848884247189f0dc807f0b2fc149b7cc0bfcb1de5b758e080ed3b829008d6384b498218b9e6f4d3e5fdcaf04cb3721b5b5cef44a70 languageName: node linkType: hard