Skip to content

Commit

Permalink
Merge branch 'main' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
Ikari-Shinji-re committed Apr 27, 2024
2 parents d275a07 + a81b7b7 commit dc36a86
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 12 deletions.
2 changes: 1 addition & 1 deletion widget/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"devDependencies": {},
"dependencies": {
"@rango-dev/widget-embedded": "^0.27.1",
"@rango-dev/widget-embedded": "^0.27.2",
"@rango-dev/logging-subscriber": "^0.2.1-next.0",
"@rango-dev/logging-console": "^0.2.1-next.0",
"react": "^18.2.0",
Expand Down
9 changes: 9 additions & 0 deletions widget/embedded/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## [0.27.2](https://github.com/rango-exchange/rango-client/compare/[email protected]@0.27.2) (2024-04-27)


### Bug Fixes

* make sure to correctly pass validation parameters when setting up a new swap ([4f6d37e](https://github.com/rango-exchange/rango-client/commit/4f6d37ea9b59caca4d0064c1b33b05077b0b59a3))



## [0.27.1](https://github.com/rango-exchange/rango-client/compare/[email protected]@0.27.1) (2024-04-24)


Expand Down
2 changes: 1 addition & 1 deletion widget/embedded/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rango-dev/widget-embedded",
"version": "0.27.1",
"version": "0.27.2",
"license": "MIT",
"type": "module",
"source": "./src/index.ts",
Expand Down
19 changes: 11 additions & 8 deletions widget/embedded/src/hooks/useConfirmSwap/useConfirmSwap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,6 @@ export function useConfirmSwap(): ConfirmSwap {
slippage: userSlippage.toString(),
disabledSwappersGroups: disabledLiquiditySources,
};
const swap = calculatePendingSwap(
inputAmount.toString(),
result,
getWalletsForNewSwap(selectedWallets),
swapSettings,
false,
{ blockchains, tokens }
);

const confirmSwapWarnings = generateWarnings(
initialQuote ?? undefined,
Expand All @@ -114,6 +106,17 @@ export function useConfirmSwap(): ConfirmSwap {
}
resetAlerts();

const proceedAnyway = !!confirmSwapWarnings.balance;

const swap = calculatePendingSwap(
inputAmount.toString(),
result,
getWalletsForNewSwap(selectedWallets),
swapSettings,
proceedAnyway ? false : true,
{ blockchains, tokens }
);

return {
quote: currentQuote,
swap,
Expand Down
2 changes: 1 addition & 1 deletion widget/iframe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
},
"devDependencies": {},
"dependencies": {
"@rango-dev/widget-embedded": "^0.27.1"
"@rango-dev/widget-embedded": "^0.27.2"
}
}
2 changes: 1 addition & 1 deletion widget/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@rango-dev/ui": "^0.33.0",
"@rango-dev/wallets-react": "^0.18.0",
"@rango-dev/wallets-shared": "^0.32.0",
"@rango-dev/widget-embedded": "^0.27.1",
"@rango-dev/widget-embedded": "^0.27.2",
"rango-sdk": "^0.1.45",
"react": "^18.2.0",
"react-color": "^2.19.3",
Expand Down

0 comments on commit dc36a86

Please sign in to comment.