File tree 10 files changed +24
-15
lines changed
resources/images/icons2/20x20
preview/status_im/common/floating_button_page
10 files changed +24
-15
lines changed Original file line number Diff line number Diff line change 48
48
:accessibility-label :receive }]
49
49
(when swap-action
50
50
[action-button
51
- {:icon :i/swap
51
+ {:icon :i/transaction
52
52
:text (i18n/label :t/swap )
53
53
:on-press swap-action
54
54
:theme theme
Original file line number Diff line number Diff line change 60
60
61
61
(defn- view-internal
62
62
[{:keys [type account-props token-props networks? values]}]
63
- (let [theme (quo.theme/use-theme )]
63
+ (let [theme (quo.theme/use-theme )
64
+ address (or (:address account-props) (:address token-props))]
64
65
[rn/view
65
66
{:style (style/container networks? theme)}
66
67
[rn/view
89
90
(get-in account-props [:status-account :name ])]
90
91
[rn/view
91
92
{:style (style/dot-divider theme)}]])
92
- [text/text
93
- {:size (when (not= type :account ) :paragraph-2 )
94
- :weight (when (= type :account ) :semi-bold )
95
- :style {:color (when (not= type :account )
96
- (colors/theme-colors colors/neutral-50 colors/neutral-40 theme))}}
97
- (or (:address account-props) (:address token-props))]]]]
93
+ (when address
94
+ [text/text
95
+ {:size (when (not= type :account ) :paragraph-2 )
96
+ :weight (when (= type :account ) :semi-bold )
97
+ :style {:color (when (not= type :account )
98
+ (colors/theme-colors colors/neutral-50 colors/neutral-40 theme))}}
99
+ address])]]]
98
100
(when networks?
99
101
[:<>
100
102
[rn/view
Original file line number Diff line number Diff line change 17
17
18
18
(def transaction-icon
19
19
{:send :i/send
20
- :swap :i/swap
20
+ :swap :i/transaction
21
21
:bridge :i/bridge })
22
22
23
23
(defn transaction-header
Original file line number Diff line number Diff line change 23
23
(def transaction-icon
24
24
{:receive :i/receive
25
25
:send :i/send
26
- :swap :i/swap
26
+ :swap :i/transaction
27
27
:bridge :i/bridge
28
28
:buy :i/buy
29
29
:destroy :i/destroy
Original file line number Diff line number Diff line change 25
25
:title " floating button page"
26
26
:description " press right icon to swap button type"
27
27
:text-align :left
28
- :right-side [{:icon-name :i/swap
28
+ :right-side [{:icon-name :i/transaction
29
29
:on-press #(swap! slide? not)}]
30
30
:background :blur
31
31
:icon-name :i/close
Original file line number Diff line number Diff line change 48
48
49
49
(defn- action-swap
50
50
[{:keys [token asset-to-receive token-symbol testnet-mode?]}]
51
- {:icon :i/swap
51
+ {:icon :i/transaction
52
52
:accessibility-label :swap
53
53
:label (i18n/label :t/swap )
54
54
:disabled? testnet-mode?
Original file line number Diff line number Diff line change 80
80
:values (send-utils/network-values-for-ui network-values)
81
81
:token-props {:token token-symbol
82
82
:label (str amount " " token-symbol)
83
- :address (address-utils/get-shortened-compressed-key token-address)
83
+ :address (when token-address
84
+ (address-utils/get-shortened-compressed-key token-address))
84
85
:size 32 }}]]))
85
86
86
87
(defn- pay-section
98
99
:label (i18n/label :t/pay )
99
100
:token-symbol pay-token-symbol
100
101
:amount pay-amount
101
- :token-address pay-token-address
102
+ :token-address (when-not (address-utils/zero-address? pay-token-address)
103
+ pay-token-address)
102
104
:network network-name
103
105
:theme theme}]))
104
106
117
119
:label (i18n/label :t/receive )
118
120
:token-symbol receive-token-symbol
119
121
:amount receive-amount
120
- :token-address receive-token-address
122
+ :token-address (when-not (address-utils/zero-address? receive-token-address)
123
+ receive-token-address)
121
124
:network network-name
122
125
:theme theme}]))
123
126
Original file line number Diff line number Diff line change 10
10
(def regx-eip-3770-address #"^(?:(?:eth:|arb1:|oeth:)(?=:|))*0x[0-9a-fA-F]{40}$" )
11
11
(def regx-metamask-address #"^ethereum:(0x[0-9a-fA-F]{40})(?:@(0x1|0xa|0xa4b1))?$" )
12
12
(def regx-address-contains #"(?i)0x[a-fA-F0-9]{40}" )
13
+ (def zero-address " 0x0000000000000000000000000000000000000000" )
13
14
14
15
(defn normalized-hex
15
16
[hex]
137
138
(metamask-address? address)
138
139
(metamask-address->eth-address address)))
139
140
141
+ (defn zero-address?
142
+ [address]
143
+ (= address zero-address))
You can’t perform that action at this time.
0 commit comments