-
Notifications
You must be signed in to change notification settings - Fork 980
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
Wallet - refresh activity after sending a transaction #19984
base: develop
Are you sure you want to change the base?
Conversation
Jenkins BuildsClick to see older builds (32)
|
7904672
to
4ba54ed
Compare
4ba54ed
to
e7c911f
Compare
c98c966
to
8d1934c
Compare
- `scroll-on-press?` When non-nil, clicking on a tag centers it the middle | ||
(with animation enabled). | ||
" | ||
(defn view-internal |
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.
added a malli schema and removed doc string
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.
defn- view-internal
[{:keys [default-active data fade-end-percentage fade-end? on-change on-scroll scroll-on-press? | ||
scrollable? style container-style size blur? in-scroll-view? customization-color] | ||
scrollable? style container-style size blur? in-scroll-view? customization-color | ||
active-tab-id] |
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.
tabs component now is controllable from outside with a prop for value.
:customization-color customization-color | ||
:label (i18n/label :t/jump-to)}} | ||
style/shell-button]])))) | ||
(let [selected-tab (or (rf/sub [:wallet/account-tab]) first-tab-id) |
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.
selected tab is stored in the reframe db so we can go to the right tab after certain actions (e.g complete transaction)
- `scroll-on-press?` When non-nil, clicking on a tag centers it the middle | ||
(with animation enabled). | ||
" | ||
(defn view-internal |
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.
defn- view-internal
[:wallet/wizard-navigate-forward | ||
{:current-screen :screen/wallet.transaction-confirmation | ||
:flow-id :wallet-send-flow}]]]}))) | ||
[:wallet/end-transaction-flow]]]}))) |
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.
Shouldn't we update the flow_config
of bridge and send?
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.
yes good point, I'll double check that. I see you had it in the similar pr so will check with that too 🙏
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 🚀
@@ -0,0 +1,32 @@ | |||
(ns quo.components.tabs.tabs.schema) | |||
|
|||
(def ^:private ?data-schema |
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.
The question mark prefix should be enough to tell ?data
is a schema.
:default-active first-tab-id | ||
:active-tab-id selected-tab | ||
:data (tabs-data watch-only?) | ||
:on-change #(rf/dispatch [:wallet/select-account-tab %]) |
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.
The handler can be extracted to a var because it doesn't close over values.
@@ -52,6 +56,7 @@ | |||
(rf/reg-event-fx :wallet/close-account-page | |||
(fn [_] | |||
{:fx [[:dispatch [:wallet/clean-current-viewing-account]] | |||
[:dispatch [:wallet/select-account-tab nil]] |
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.
A minor suggestion, but I'd have a separate event to deselect the account tab instead of relying on nil.
(rf/reg-event-fx :wallet/deselect-account-tab
(fn [{:keys [db]} _]
{:db (update-in db [:wallet :ui :account-page] dissoc :active-tab)}))
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.
done
[:sequential | ||
[:maybe | ||
[:map | ||
[:id [:maybe :keyword]] |
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.
About the :maybe
here, wouldn't it be a bug to have a tab item without an ID? Seems really odd to rely on a nil ID, but maybe that's how it already is and the schema is just explicitly telling us now this oddity?
[:catn | ||
[:props | ||
[:map | ||
[:default-active {:optional true} [:maybe :keyword]] |
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.
When opening the AC, the schema fails because we pass :default-active
as a number, not as a keyword.
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 forgot about AC, will update
21e527a
to
d503f86
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.
PR LGTM! And thanks for adding schemas to the complex tabs component 👏🏼
d503f86
to
6a88d9e
Compare
85% of end-end tests have passed
Failed tests (5)Click to expandClass TestWalletMultipleDevice:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestWalletOneDevice:
Expected to fail tests (3)Click to expandClass TestGroupChatMultipleDeviceMergedNewUI:
Class TestCommunityOneDeviceMerged:
Passed tests (44)Click to expandClass TestCommunityOneDeviceMerged:
Class TestWalletOneDevice:
Class TestActivityMultipleDevicePRTwo:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestCommunityMultipleDeviceMerged:
Class TestDeepLinksOneDevice:
Class TestActivityMultipleDevicePR:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
|
6a88d9e
to
f6d134d
Compare
hi @J-Son89 thank you for PR. Take a look at found issue PR_ISSUE 1: "Invalid argument 2: json can't unmarshal.." error is shown after transaction confirmation when a universal scanner is usedDescription:After confirming a transaction, an error toast "Invalid argument 2: json can't unmarshal.." is displayed when the universal scanner is used during sending flow. Additionally, the user is navigated to the main wallet page instead of the activity tab. However, the transaction is actually confirmed successfully, and there is no issue with the transaction itself. Steps:
Actual result:
Expected result:
Devices:
Logs |
PR_ISSUE 2: Confirmation page remains stuck when attempting to send a collectibleSteps:
Actual result:The confirmation page remains stuck. collectible.mp4Expected result:The user should be navigated to the activity tab after confirming the transaction. OS:IOS, Android Devices:
Logs |
@VolodLytvynenko - when trying to fix the issues you raised I found some navigation issues related to sending. To fix the issues you mentioned I have to address these here too. I will be off tomorrow and Monday so probably won't have these fixes until next week. Will update you when I have them in place, but also this means it will probably have to have another round of dev code review 👍 |
@J-Son89 got it. Thank you for update |
f6d134d
to
812a590
Compare
fixes: #19981, #19519
This pr does a few things
corrects the navigation for MVP, i.e after confirming a transaction it goes directly to account view and shows the activity tab
refreshes activity after sending a transaction
this in turn refreshes the recent transactions tab in the select address page of sending flows.
to make this work I had to update the tabs component to be controllable, as such we should check other pages with tabs are working alright.
Screen.Recording.2024-05-10.at.18.28.24.mov