-
Notifications
You must be signed in to change notification settings - Fork 247
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(addAmountOutInSentTransactions)_: Add amount out in NewRouterSentTransaction function #5995
Conversation
Jenkins BuildsClick to see older builds (23)
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5995 +/- ##
===========================================
+ Coverage 47.46% 47.49% +0.02%
===========================================
Files 849 849
Lines 138611 138613 +2
===========================================
+ Hits 65794 65830 +36
+ Misses 65017 64997 -20
+ Partials 7800 7786 -14
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@@ -43,7 +43,8 @@ type RouterSentTransaction struct { | |||
ToChain uint64 `json:"toChain"` | |||
FromToken string `json:"fromToken"` | |||
ToToken string `json:"toToken"` | |||
Amount string `json:"amount"` // amount of the transaction | |||
Amount string `json:"amount"` // amount of the transaction | |||
AmountOut string `json:"amountOut"` // amount of the transaction sent |
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.
@Khushboo-dev-cpp why do we need the amount out? It is supposed to be used internally only on the statusgo side.
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.
Also RouterSentTransaction
refers to a single tx sent, but SendDetails
contains info about all general data.
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.
@saledjenic the reason why I added this is because i case of Swaps we need a from token amount to swap and the actual to token amount that will be received by the swap.
I am not sure I understand the difference between individual tx's and the SendDetails and when what should be used.
I tried to add the amountOut to the SendDetails but it seems like the SendDetails are filled =with the input values from the client where this amount out is not available. Please correct me if I am wrong. but thats the reason I added this new param in the RouterSentTransaction.
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.
Basically SendDetails
contains global details, what was the intention of the user, and corresponds to the router input params. A single send is composed of one or more transactions, so each RouterSentTransaction
corresponds to each transaction that was sent. Worth noticing that an approval tx is also a single RouterSentTransaction
, it means if you want to swap erc20 token you will have 2 RouterSentTransaction
, one for approval, one for swap.
bc67541
to
4670752
Compare
4670752
to
266303f
Compare
266303f
to
e4dc175
Compare
…tTransaction function
e4dc175
to
bb9d78e
Compare
✔️ status-go/prs/linux/x86_64/main/PR-5995#5 🔹 ~5 min 45 sec 🔹 bb9d78e 🔹 📦 linux package |
✔️ status-go/prs/ios/PR-5995#5 🔹 ~8 min 34 sec 🔹 bb9d78e 🔹 📦 ios package |
A short summary which serves as a squashed-commit message.
A description to understand introduced changes without reading the code.
Important changes:
Closes #