diff --git a/chain-registry b/chain-registry index ff10ba1d..5b1f2401 160000 --- a/chain-registry +++ b/chain-registry @@ -1 +1 @@ -Subproject commit ff10ba1d51957afd3a10d1c698835e3d5006926d +Subproject commit 5b1f24010a9c18188005646359ae9064a849ac13 diff --git a/initia-registry b/initia-registry index 2ddcaf2d..1a1b33f8 160000 --- a/initia-registry +++ b/initia-registry @@ -1 +1 @@ -Subproject commit 2ddcaf2d78d0bd4e4a567f8eee62bd8058563dfc +Subproject commit 1a1b33f84c5a32b1e9af80df1ab50a318ddb7c44 diff --git a/package-lock.json b/package-lock.json index 712b2a56..b68aa859 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,7 +44,7 @@ "@radix-ui/react-switch": "^1.0.3", "@radix-ui/react-tooltip": "^1.0.7", "@sentry/nextjs": "^7.99.0", - "@skip-router/core": "^3.0.1", + "@skip-router/core": "4.0.0", "@solana/spl-token": "^0.4.1", "@solana/wallet-adapter-react": "^0.15.35", "@solana/wallet-adapter-wallets": "^0.19.31", @@ -13482,9 +13482,9 @@ } }, "node_modules/@skip-router/core": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@skip-router/core/-/core-3.0.1.tgz", - "integrity": "sha512-MpmZdSouFlCBJRaxLeU+L7vrpnv94xtLac7kJnN5A/pw/J+xUP/eBWH/KRTfzzW2C0bjH56HA5DK4fHKyh2q9A==", + "version": "4.0.0", + "resolved": "file:skip-router-core-4.0.0.tgz", + "integrity": "sha512-SdljW8c72PHvVlqUGeZk7j63b6fUfE5+7aOltDgq1oZWZykZp+86kAruEfCKunw9trS/URvj7hqQZ6tuHT/P9g==", "dependencies": { "@cosmjs/amino": "0.32.3", "@cosmjs/cosmwasm-stargate": "0.32.3", diff --git a/package.json b/package.json index 4ecec851..4b72b1e2 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "@radix-ui/react-switch": "^1.0.3", "@radix-ui/react-tooltip": "^1.0.7", "@sentry/nextjs": "^7.99.0", - "@skip-router/core": "^3.0.1", + "@skip-router/core": "4.0.0", "@solana/spl-token": "^0.4.1", "@solana/wallet-adapter-react": "^0.15.35", "@solana/wallet-adapter-wallets": "^0.19.31", diff --git a/src/components/PreviewRoute/ChainStep.tsx b/src/components/PreviewRoute/ChainStep.tsx index bd07d46e..b6fa4c96 100644 --- a/src/components/PreviewRoute/ChainStep.tsx +++ b/src/components/PreviewRoute/ChainStep.tsx @@ -271,7 +271,7 @@ export const ChainStep = ({ )}
- {swapAction && signRequired && !isSource ? ( + {swapAction && signRequired && (!isSource || (isSource && route.chainIDs.length === 1)) ? ( { })(); if ("swap" in operation) { - if ("swapIn" in operation.swap) { - _actions.push({ - type: "SWAP", - denomIn: operation.swap.denomIn, - denomOut: operation.swap.denomOut, - chainID: operation.swap.chainID, - id: `swap-${swapCount}-${transferCount}-${i}`, - swapVenue: operation.swap.swapIn.swapVenue, - signRequired, - amountIn: operation.amountIn, - amountOut: operation.amountOut, - txIndex: operation.txIndex, - }); - } - if ("swapOut" in operation.swap) { - _actions.push({ - type: "SWAP", - denomIn: operation.swap.denomIn, - denomOut: operation.swap.denomOut, - chainID: operation.swap.chainID, - id: `swap-${swapCount}-${transferCount}-${i}`, - swapVenue: operation.swap.swapOut.swapVenue, - signRequired, - amountIn: operation.amountIn, - amountOut: operation.amountOut, - txIndex: operation.txIndex, - }); - } + _actions.push({ + type: "SWAP", + denomIn: operation.swap.denomIn, + denomOut: operation.swap.denomOut, + chainID: operation.swap.chainID, + id: `swap-${swapCount}-${transferCount}-${i}`, + signRequired, + amountIn: operation.amountIn, + amountOut: operation.amountOut, + txIndex: operation.txIndex, + }); + swapCount++; return; } diff --git a/src/solve/queries.ts b/src/solve/queries.ts index cb406ecb..e71146fa 100644 --- a/src/solve/queries.ts +++ b/src/solve/queries.ts @@ -133,6 +133,9 @@ export function useRoute({ allowUnsafe: true, experimentalFeatures, smartRelay: true, + smartSwapOptions: { + splitRoutes: true, + }, } : { amountOut: amount, @@ -145,6 +148,9 @@ export function useRoute({ allowUnsafe: true, experimentalFeatures, smartRelay: true, + smartSwapOptions: { + splitRoutes: true, + }, }, );