-
Notifications
You must be signed in to change notification settings - Fork 985
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
Screens for editing transaction settings #21838
base: develop
Are you sure you want to change the base?
Conversation
Jenkins Builds
|
@@ -7,8 +7,8 @@ | |||
[react-native.core :as rn] | |||
[react-native.platform :as platform])) | |||
|
|||
(defn- label-&-counter | |||
[{:keys [label current-chars char-limit variant-colors theme]}] | |||
(defn- label-line |
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.
In designs input field has labels at top-left and top-right sides. In our component we had only characters counter in the right side, so i added a right-side label.
:number (count networks) | ||
:size :size-16} | ||
networks] | ||
(when networks |
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.
If networks
is empty we don't need this component because it eats some space and leads to incorrect alignment of text after it.
(let [theme (quo.theme/use-theme) | ||
window-width (:width (rn/get-window))] | ||
[{:keys [token-symbol on-token-press value error? on-swap currency-symbol show-token-icon? | ||
swappable?]}] |
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.
Two new features of token-input
:
If not swappable?
we won't display the button to swap between crypto and fiat values.
If not show-token-icon?
we do not show icon. Because GWEI
or UNITS
that we enter in transaction settings screens do not have icons.
@@ -78,16 +78,19 @@ | |||
|
|||
(defn set-upper-limit | |||
[state limit] | |||
(when limit | |||
(if limit |
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.
Without this change set-upper-limit
breaks the usage of ->
because no value returned when limit not applied
@@ -768,3 +768,41 @@ | |||
:always (update-in [:wallet :ui :send] dissoc :amount :route) | |||
(not keep-tx-data?) (update-in [:wallet :ui :send] dissoc :tx-type)) | |||
:fx [[:dispatch [:navigate-back]]]}))) | |||
|
|||
(rf/reg-event-fx |
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 do not know yet in what form we will get the recommended and current values for transaction settings from status-go
, so for now I've stored test values like that. Not a final form I believe.
{:db (all-screens-params db (first comp-id) screen-params) | ||
:fx [[:navigate-to-within-stack (conj comp-id (:theme db))]]}) | ||
{:db (all-screens-params db (first comp-id) screen-params) | ||
:dispatch-n [[:hide-bottom-sheet]] |
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.
Bottom sheets should be hidden when navigate to another screen. Copied from :navigate-to
event above in the code.
46862df
to
dd4e08a
Compare
fixes #21023 #21024
Summary
Implemented screens for editing Max base fee, Priority fee, Nonce and Max gas amount.
This is only UI implementation and it is hidden under feature flag.
status-go pr is not merged yet, so integration with status-go will be made separately
Screen.Recording.2024-12-17.at.15.50.35.mov
Review notes
Figma designs
In figma designs "max base fee" and "priority fee" use
token-input
component withswap
button that allows switching between fiat and crypto. In my implementation there is no switching because it is not practical. 1 gwei is just a fraction of cent and user will never operate in fiat to set fees. Also we never operate with values less than 1 cent in other parts of our app. (cc @xAlisher)Testing notes
Platforms
Areas that maybe impacted
Functional
Steps to test
status: ready