-
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
Support for multiple collectibles transaction on confirmation page #19502
Conversation
780ef08
to
cc215ae
Compare
Jenkins BuildsClick to see older builds (16)
|
[chain-id] | ||
(let [network-name (-> (rf/sub [:wallet/network-details-by-chain-id chain-id]) | ||
:network-name)] | ||
(if (= network-name :mainnet) :ethereum network-name))) |
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.
@OmarBasem, @smohamedjavid - don't we already have a solution for this somewhere else? 🤔
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 think Javid is handling it in one of his PRs which is not merged yet
(if (= network-name :mainnet) :ethereum network-name))) | ||
|
||
(defn network-amounts-from-route | ||
[route token-symbol token-decimals to?] |
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.
can we make this a map? 🙏
Also it can be private?
{} | ||
route)) | ||
|
||
(defn network-values-from-amounts |
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.
private?
(defn network-values-from-amounts | ||
[network-amounts token-symbol] | ||
(reduce-kv (fn [acc k v] | ||
(assoc acc k {:amount v :token-symbol token-symbol})) |
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.
maybe align the keys for readability?
{} | ||
network-amounts)) | ||
|
||
(defn sanitize-network-values |
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.
we already have this function, no?
cc @briansztamfater
[{:keys [account-props theme label accessibility-label | ||
summary-type values] | ||
:as props}] | ||
(tap> props) |
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.
🦅
:token-symbol token-symbol | ||
:route route | ||
:token-decimals token-decimals | ||
:to? true})}] |
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 file looks much cleaner with how you have organised it!
Nice one @vkjr! 🚀
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.
looks good to me, albeit seems like a lot of shared functionality between this pr:
#19392
and would be good to align the two so we avoid duplication etc 👍
@status-im/wallet-mobile-devs - can someone give this pr a quick happy path check? |
We moved and refactored most of the logic for calculating amounts of each network to the send events in #19392, so I think we should wait. Though this PR looks good, I think transaction confirmation view it will be simplified and many of the functions modified here will be removed in favor of events and subscriptions. |
3f1ee4d
to
f51725b
Compare
@J-Son89 @briansztamfater , |
Cool, whatever you and @briansztamfater think. All good by me either way 👍 |
f51725b
to
bd82e29
Compare
0% of end-end tests have passed
Failed tests (51)Click to expandClass TestWalletMultipleDevice:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestActivityMultipleDevicePR:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestCommunityOneDeviceMerged:
Class TestDeepLinksOneDevice:
Class TestWalletOneDevice:
Class TestCommunityMultipleDeviceMerged:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestActivityMultipleDevicePRTwo:
Class TestActivityCenterContactRequestMultipleDevicePR:
Expected to fail tests (1)Click to expandClass TestCommunityOneDeviceMerged:
|
92% of end-end tests have passed
Failed tests (3)Click to expandClass TestGroupChatMultipleDeviceMergedNewUI:
Class TestCommunityOneDeviceMerged:
Class TestCommunityMultipleDeviceMerged:
Expected to fail tests (1)Click to expandClass TestCommunityOneDeviceMerged:
Passed tests (48)Click to expandClass TestCommunityOneDeviceMerged:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestWalletOneDevice:
Class TestActivityMultipleDevicePRTwo:
Class TestWalletMultipleDevice:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestActivityMultipleDevicePR:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestDeepLinksOneDevice:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestCommunityMultipleDeviceMerged:
|
bd82e29
to
bcddfd7
Compare
e2e failures are not related to PR. |
bcddfd7
to
1db8eb2
Compare
1db8eb2
to
5c4b06b
Compare
fixes #19142
Summary
Screen.Recording.2024-04-03.at.16.12.59.mov
Figma designs
Review notes
Functional changes are minimal. Added a few conditionals to correctly display collectible image in title and name of the collectible in
from
andto
section.Everything else is a refactoring for better readability.
status: ready