[#21615] fix: hide mercuryo provider (#21626)

This commit is contained in:
Mohsen 2024-11-25 20:58:58 +03:00 committed by GitHub
parent 9c9b55fe3e
commit 05d4b4b068
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 28 additions and 18 deletions

View File

@ -49,6 +49,7 @@
(rf/dispatch [:wallet/get-crypto-on-ramps])))
(let [crypto-on-ramps (rf/sub [:wallet/crypto-on-ramps])
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)
[min-height set-min-height] (rn/use-state 0)
on-layout (rn/use-callback
@ -56,18 +57,27 @@
(oops/oget % :nativeEvent :layout :height)))]
[:<>
[quo/drawer-top {:title (or title (i18n/label :t/ways-to-buy-assets))}]
[quo/segmented-control
{:size 32
:container-style style/tabs
:default-active initial-tab
:on-change set-selected-tab
:data tabs}]
[rn/flat-list
{:data (if (= selected-tab :recurrent)
(:recurrent crypto-on-ramps)
(:one-time crypto-on-ramps))
:on-layout on-layout
:style (style/list-container min-height)
:render-data {:tab selected-tab
:account account}
:render-fn crypto-on-ramp-item}]]))
(when has-recurrent?
[:<>
[quo/segmented-control
{:size 32
:container-style style/tabs
:default-active initial-tab
:on-change set-selected-tab
:data tabs}]
[rn/flat-list
{:data (if (= selected-tab :recurrent)
(:recurrent crypto-on-ramps)
(:one-time crypto-on-ramps))
:on-layout on-layout
:style (style/list-container min-height)
: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}])]))

View File

@ -3,7 +3,7 @@
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
"owner": "status-im",
"repo": "status-go",
"version": "v3.10.0",
"commit-sha1": "906c50bf26ef85b9a15eb3b640a6cbe2e1071260",
"src-sha256": "05di85jgy2avnl6y1pgx1kzqng9k068braj5fhaknpalm8yyln7k"
"version": "v4.0.0",
"commit-sha1": "032eb5b6ee71b675b7d1d63198e79e2c18063654",
"src-sha256": "06qffndymgl80c08w96rs02ycxigai7y06d7ljwrkfr4brc86r21"
}