-
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
Bottom sheet with save and send options not displayed after scanning wallet QR using universal scanner #18928 #19250
Changes from 60 commits
3c4d5aa
e488c70
84c6f76
edbdb77
ffbf034
f9fcf47
f89ea86
8b4acd9
84ebeeb
f9b774c
0e42390
d1810f2
df249f6
d857563
4073123
fb8746d
1cf6675
9d44709
5957dfe
28b80c8
e3c364e
1ad2683
bcf6464
f07b826
57c7e88
107d3e9
5c22d1e
2eff897
ba7ed1e
0680304
88f9b5a
e0a98e2
1091e81
8fc2db0
3b0d4b0
4a1cda9
6596d11
acf6a0d
608ef41
3c4ce57
9f761de
692b4be
3368bb7
4b586e7
2477f04
9b1da7b
43cf9e6
1ec164e
09e865d
2b6f910
9322e00
98afa30
b1792c9
a8b5019
32cd9ad
f8f446b
781263d
02db6d6
15c9ae0
82d106a
58bf0d2
f8f2d3c
16898b4
ce57df5
6b2a44f
b3db159
b4f104d
091c91c
fca6576
8fa4740
d2ecca8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
(ns status-im.contexts.shell.qr-reader.events | ||
(:require | ||
[status-im.contexts.shell.qr-reader.sheets.scanned-address :as scanned-address] | ||
[utils.re-frame :as rf])) | ||
|
||
(rf/reg-event-fx | ||
:generic-scanner/scan-success | ||
(fn [_ [address]] | ||
{:fx [[:dispatch [:navigate-back]] | ||
[:dispatch [:show-bottom-sheet {:content #(scanned-address/view address)}]]]})) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
(ns status-im.contexts.shell.qr-reader.sheets.scanned-address | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: we should discrimate somehow what this is related to. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
(:require | ||
[quo.core :as quo] | ||
[utils.i18n :as i18n] | ||
[utils.re-frame :as rf])) | ||
|
||
(defn view | ||
[address] | ||
[:<> | ||
[quo/drawer-top | ||
{:title address | ||
:type :address}] | ||
[quo/action-drawer | ||
[[{:icon :i/send | ||
:accessibility-label :send-asset | ||
:label (i18n/label :t/send-to-this-address) | ||
:on-press (fn [] | ||
(rf/dispatch [:wallet/select-send-address | ||
{:address address | ||
:recipient address | ||
:stack-id :wallet-select-address | ||
:start-flow? true}]))} | ||
{:icon :i/save | ||
:accessibility-label :save-address | ||
:label (i18n/label :t/save-address) | ||
:on-press #(js/alert "feature not implemented")}]]]]) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,11 +12,11 @@ | |
fiat-value (utils/total-token-fiat-value currency token) | ||
fiat-formatted (utils/get-standard-fiat-format crypto-formatted currency-symbol fiat-value)] | ||
[quo/token-network | ||
{:token (:symbol token) | ||
{:token (keyword (:symbol token)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should make this has no side effects on it's previous uses. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think it does There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I changed the schema to accept keyword and string |
||
:label (:name token) | ||
:token-value (str crypto-formatted " " (:symbol token)) | ||
:fiat-value fiat-formatted | ||
:networks (:networks token) | ||
:networks (seq (:networks token)) | ||
:on-press #(on-token-press token)}])) | ||
|
||
(defn view | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -357,3 +357,13 @@ | |
{:id :send-transaction-error | ||
:type :negative | ||
:text (:message error)}]))}]}))) | ||
|
||
(rf/reg-event-fx | ||
:wallet/select-from-account | ||
(fn [_ [{:keys [address stack-id start-flow?]}]] | ||
{:fx [[:dispatch [:wallet/switch-current-viewing-account address]] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
[:dispatch | ||
[:wallet/wizard-navigate-forward | ||
{:current-screen stack-id | ||
:start-flow? start-flow? | ||
:flow-id :wallet-flow}]]]})) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
(ns status-im.contexts.wallet.send.flow-config) | ||
|
||
(def steps | ||
[{:screen-id :screen/wallet.select-address | ||
[{:screen-id :screen/wallet.select-from | ||
:skip-step? (fn [db] (some? (get-in db [:wallet :current-viewing-account-address])))} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🙌 |
||
{:screen-id :screen/wallet.select-address | ||
:skip-step? (fn [db] (some? (get-in db [:wallet :ui :send :recipient])))} | ||
{:screen-id :screen/wallet.select-asset | ||
:skip-step? (fn [db] (some? (get-in db [:wallet :ui :send :token])))} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
(ns status-im.contexts.wallet.send.from.style) | ||
|
||
(def accounts-list | ||
{:padding-bottom 12}) | ||
|
||
(def accounts-list-container | ||
{:padding-horizontal 8}) |
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 you please comment of why you are removing all of this?
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.
They were unused