-
Notifications
You must be signed in to change notification settings - Fork 81
fix(swap): build paraswap tx error #17840
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
Conversation
Jenkins BuildsClick to see older builds (21)
|
@@ -520,6 +520,7 @@ QtObject { | |||
tokenKey, | |||
/*amountOut = */ "0", | |||
/*toToken =*/ "", | |||
/*slippagePercentage*/ "", |
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.
It's a double
, so 0.0
?
popup.store.suggestedRoutes(d.uuid, | ||
d.isCollectiblesTransfer ? "1" : amountToSend.amount, | ||
/* amountOut */ "0", | ||
/* slippagePercentage */ "", |
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.
/* slippagePercentage */ "", | |
/* slippagePercentage */ 0.0, |
} | ||
|
||
function suggestedRoutes(uuid, amountIn, amountOut = "0", extraParamsJson = "") { | ||
function suggestedRoutes(uuid, amountIn, amountOut = "0", slippagePercentage = "", extraParamsJson = "") { |
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.
function suggestedRoutes(uuid, amountIn, amountOut = "0", slippagePercentage = "", extraParamsJson = "") { | |
function suggestedRoutes(uuid, amountIn, amountOut = "0", slippagePercentage = 0.0, extraParamsJson = "") { |
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.
@caybro but expected type on the Nim side is string, and then we parse it.
Check here:
status-desktop/src/app/modules/main/wallet_section/send_new/view.nim
Lines 32 to 45 in aa03be9
proc fetchSuggestedRoutes*(self: View, | |
uuid: string, | |
sendType: int, | |
chainId: int, | |
accountFrom: string, | |
accountTo: string, | |
amountIn: string, | |
token: string, | |
amountOut: string, | |
toToken: string, | |
slippagePercentageString: string, | |
extraParamsJson: string) {.slot.} = | |
var extraParamsTable: Table[string, string] | |
self.pathModel.setItems(@[]) |
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 see... it's just that in swap adaptor/form, it's declared as a double
b7b3299
to
aa03be9
Compare
ff5a52a
to
724f934
Compare
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 tested a couple of token pairs such as ETH <-> ERC20, ERC20 <-> ETH using low amounts and I was able to get price quotation. This looks good thanks for the fix!
After improvements on the fees calculation the build transaction 1001 error started to occur. It was because of missed slippage param when doing the build tx call. Fixed on the statusgo side. These changes also bring some improvements on setting custom slippage.
724f934
to
3ce9c54
Compare
After improvements on the fees calculation the build transaction 1001 error started to occur. It was because of missed slippage param when doing the build tx call. Fixed on the statusgo side.
These changes also bring some improvements on setting custom slippage.
Corresponding
status-go
changes: