parent
9c9b55fe3e
commit
05d4b4b068
|
@ -49,6 +49,7 @@
|
||||||
(rf/dispatch [:wallet/get-crypto-on-ramps])))
|
(rf/dispatch [:wallet/get-crypto-on-ramps])))
|
||||||
(let [crypto-on-ramps (rf/sub [:wallet/crypto-on-ramps])
|
(let [crypto-on-ramps (rf/sub [:wallet/crypto-on-ramps])
|
||||||
account (rf/sub [:wallet/current-viewing-account-or-default])
|
account (rf/sub [:wallet/current-viewing-account-or-default])
|
||||||
|
has-recurrent? (seq (:recurrent crypto-on-ramps))
|
||||||
[selected-tab set-selected-tab] (rn/use-state initial-tab)
|
[selected-tab set-selected-tab] (rn/use-state initial-tab)
|
||||||
[min-height set-min-height] (rn/use-state 0)
|
[min-height set-min-height] (rn/use-state 0)
|
||||||
on-layout (rn/use-callback
|
on-layout (rn/use-callback
|
||||||
|
@ -56,18 +57,27 @@
|
||||||
(oops/oget % :nativeEvent :layout :height)))]
|
(oops/oget % :nativeEvent :layout :height)))]
|
||||||
[:<>
|
[:<>
|
||||||
[quo/drawer-top {:title (or title (i18n/label :t/ways-to-buy-assets))}]
|
[quo/drawer-top {:title (or title (i18n/label :t/ways-to-buy-assets))}]
|
||||||
[quo/segmented-control
|
(when has-recurrent?
|
||||||
{:size 32
|
[:<>
|
||||||
:container-style style/tabs
|
[quo/segmented-control
|
||||||
:default-active initial-tab
|
{:size 32
|
||||||
:on-change set-selected-tab
|
:container-style style/tabs
|
||||||
:data tabs}]
|
:default-active initial-tab
|
||||||
[rn/flat-list
|
:on-change set-selected-tab
|
||||||
{:data (if (= selected-tab :recurrent)
|
:data tabs}]
|
||||||
(:recurrent crypto-on-ramps)
|
[rn/flat-list
|
||||||
(:one-time crypto-on-ramps))
|
{:data (if (= selected-tab :recurrent)
|
||||||
:on-layout on-layout
|
(:recurrent crypto-on-ramps)
|
||||||
:style (style/list-container min-height)
|
(:one-time crypto-on-ramps))
|
||||||
:render-data {:tab selected-tab
|
:on-layout on-layout
|
||||||
:account account}
|
:style (style/list-container min-height)
|
||||||
:render-fn crypto-on-ramp-item}]]))
|
:render-data {:tab selected-tab
|
||||||
|
:account account}
|
||||||
|
:render-fn crypto-on-ramp-item}]])
|
||||||
|
(when-not has-recurrent?
|
||||||
|
[rn/flat-list
|
||||||
|
{:data (:one-time crypto-on-ramps)
|
||||||
|
:on-layout on-layout
|
||||||
|
:style (style/list-container min-height)
|
||||||
|
:render-data {:account account}
|
||||||
|
:render-fn crypto-on-ramp-item}])]))
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
|
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
|
||||||
"owner": "status-im",
|
"owner": "status-im",
|
||||||
"repo": "status-go",
|
"repo": "status-go",
|
||||||
"version": "v3.10.0",
|
"version": "v4.0.0",
|
||||||
"commit-sha1": "906c50bf26ef85b9a15eb3b640a6cbe2e1071260",
|
"commit-sha1": "032eb5b6ee71b675b7d1d63198e79e2c18063654",
|
||||||
"src-sha256": "05di85jgy2avnl6y1pgx1kzqng9k068braj5fhaknpalm8yyln7k"
|
"src-sha256": "06qffndymgl80c08w96rs02ycxigai7y06d7ljwrkfr4brc86r21"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue