-
-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(unlock-app): Decent for swaps #14043
Conversation
@@ -165,27 +164,15 @@ export function Payment({ checkoutService }: Props) { | |||
|
|||
const canAfford = balance?.isGasPayable && balance?.isPayable | |||
|
|||
const { data: uniswapRoutes, isInitialLoading: isUniswapRoutesLoading } = | |||
useUniswapRoutes({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will clean up on a different PR.
userTokenBalance: string | ||
} | ||
|
||
// TheBox returns BigInts as strings with a trailing 'n' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking into it, yes its a real issue when parsing serialized values...
@@ -425,22 +365,28 @@ export function Payment({ checkoutService }: Props) { | |||
> | |||
<div className="flex justify-between w-full"> | |||
<h3 className="font-bold"> | |||
Pay with {route.symbol} on {route.networkName} | |||
Pay with {route.tokenPayment.symbol} on{' '} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that throws. an error when the lock is priced in native token. Added a fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ha! Good catch I will look at this gain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok tested with a few locks on various networks, lg !
Description
Until now we used Decent for the "crosschain purchase" scenario where the transaction would be sent from different network, but only paid on this network's native currency.
Since Uniswap broke their libraries, we are now also using Decent for "swap" scenario where we now have the following supported flows:
Issues
Fixes #
Refs #
Checklist:
Release Note Draft Snippet