-
Notifications
You must be signed in to change notification settings - Fork 984
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
Swap: use correct fee on spending cap screen #21532
base: develop
Are you sure you want to change the base?
Conversation
(defn get-standard-fiat-format | ||
[crypto-value currency-symbol fiat-value] | ||
(if (string/includes? crypto-value "<") | ||
(defn fiat-formatted-for-ui |
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.
This function was renamed because we don't have any "standard" fiat format) But naming it as "ui"-related makes it clear that result shouldnt be used in calculations.
Also for some reason we were passing here crypto value and checking if it includes "<" sign. We actually don't need this because we have a fiat value. So extra argument removed.
Jenkins BuildsClick to see older builds (8)
|
@@ -198,7 +197,7 @@ | |||
:network-image (:source network)}] | |||
[data-item | |||
{:title (i18n/label :t/max-fees) | |||
:subtitle (if (and estimated-time max-fees) max-fees (i18n/label :t/unknown)) | |||
:subtitle (if (and estimated-time approval-fees) approval-fees (i18n/label :t/unknown)) |
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.
This is an actual bugfix.
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.
LGTM
94cbe69
to
a7f4f92
Compare
token-for-fees (first (filter #(= (string/lower-case (:symbol %)) | ||
(string/lower-case constants/token-for-fees-symbol)) | ||
tokens)) |
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.
nit: Consider using some
instead of first
+ filter
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.
Thank you so much for you PR @vkjr !!
50% of end-end tests have passed
Failed tests (4)Click to expandClass TestWalletMultipleDevice:
Class TestCommunityOneDeviceMerged:
Class TestCommunityMultipleDeviceMerged:
Passed tests (4)Click to expandClass TestWalletOneDevice:
Class TestCommunityOneDeviceMerged:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
|
@@ -160,6 +159,7 @@ | |||
display-decimals))] | |||
(or receive-amount 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.
extra space
0% of end-end tests have passed
Failed tests (4)Click to expandClass TestWalletMultipleDevice:
Class TestCommunityOneDeviceMerged:
Class TestCommunityMultipleDeviceMerged:
|
a7f4f92
to
11e15be
Compare
hi @vkjr thank you for PR. When I enter a non-approved value (5.989 DAI) on mobile, the difference between non-approved and approved ERC-20 (5.98 DAI) is only about 90 cents . However the approval fee for this transaction is approximately $4. I perfomed four tests on both Desktop and mobile to minimize the impact of fee amount changes. On Desktop, where it appears to work correctly, the non-approved value is around $4 less than the approved value. Could you take a look at this? Steps:
Actual result:seems on the swap fee for non-approved in calculated incorrectly or calculated including only swap fee mobile.mp4Expected result:On the swap fee for non-approved includes approval fee + swap fee |
@VolodLytvynenko, thanks for checking, will take a look |
fixes #21428
Summary
Incorrect fee was used before, that is fixed.
Also minor refactoring done
Review notes
get-standard-fiat-format
was refactored, explanation in comment to the codeTesting notes
Platforms
Areas that maybe impacted
Functional
status: ready