-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
fix/swap calcs #3346
base: main
Are you sure you want to change the base?
fix/swap calcs #3346
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Coverage Report for Coverage
File Coverage
|
// Why do we need to subtract the gas price here? | ||
/* | ||
* If (target === 'toToken') { | ||
* marketValue -= this.gasPriceInUSD || 0 | ||
* } | ||
*/ |
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.
probably because we are showing this value to the user as what it'd receive
given they are spending gas for the tx, it's deducted
buyt cc @enesozturk @svenvoskamp for confirmation
|
||
return html`<w3m-swap-input | ||
.value=${target === 'toToken' ? this.toTokenAmount : this.sourceTokenAmount} | ||
?disabled=${this.loadingQuote && target === 'toToken'} | ||
.disabled=${target === 'toToken'} |
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.
why remove the loading ?
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 input should be always disabled, unless we want to add some logic to calculate the swap when changing the toToken input. Doesn't work right now
Description
?disabled
for.disabled
)TODO:
@tomiir @enesozturk @svenvoskamp Please check the commented code
Type of change
Showcase (Optional)
Before fix:
before_fix.mp4
After fix:
after_fix.mp4
Checklist