Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4db2f93faf | ||
|
|
b89dce3c2a | ||
|
|
8aba451be8 | ||
|
|
82dd805755 | ||
|
|
6e30d9faa8 | ||
|
|
070869b705 |
@@ -36,3 +36,5 @@ SHOW_NOT_IMPLEMENTED_FEATURES=0
|
||||
ENABLE_ALERT_BANNER=0
|
||||
FLAG_WALLET_CONNECT_ENABLED=1
|
||||
API_LOGGING_ENABLED=1
|
||||
SENTRY_ENABLED=0
|
||||
SENTRY_ENVIRONMENT=ci-main
|
||||
|
||||
@@ -40,3 +40,5 @@ ENABLE_ALERT_BANNER=0
|
||||
FLAG_WALLET_CONNECT_ENABLED=1
|
||||
MOBILE_DATA_SYNCING_TOGGLE_ENABLE=0
|
||||
API_LOGGING_ENABLED=1
|
||||
SENTRY_ENABLED=0
|
||||
SENTRY_ENVIRONMENT=ci-main
|
||||
|
||||
@@ -37,3 +37,5 @@ TEST_NETWORKS_ENABLED=1
|
||||
ENABLE_ALERT_BANNER=1
|
||||
FLAG_WALLET_CONNECT_ENABLED=1
|
||||
API_LOGGING_ENABLED=1
|
||||
SENTRY_ENABLED=0
|
||||
SENTRY_ENVIRONMENT=ci-main
|
||||
|
||||
@@ -24,3 +24,5 @@ TEST_NETWORKS_ENABLED=0
|
||||
ENABLE_ALERT_BANNER=1
|
||||
FLAG_WALLET_CONNECT_ENABLED=1
|
||||
API_LOGGING_ENABLED=1
|
||||
SENTRY_ENABLED=1
|
||||
SENTRY_ENVIRONMENT=ci-nightly
|
||||
|
||||
@@ -21,3 +21,5 @@ TEST_NETWORKS_ENABLED=0
|
||||
STATUS_PROXY_STAGE_NAME=prod
|
||||
FLAG_WALLET_CONNECT_ENABLED=1
|
||||
API_LOGGING_ENABLED=0
|
||||
SENTRY_ENABLED=1
|
||||
SENTRY_ENVIRONMENT=production
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.18'
|
||||
library 'status-jenkins-lib@v1.9.20'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
@@ -41,6 +41,7 @@ pipeline {
|
||||
BUILD_ENV = 'prod'
|
||||
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
|
||||
FASTLANE_DISABLE_COLORS = 1
|
||||
SENTRY_PRODUCTION = "${utils.isReleaseBuild() ? 'true' : 'false'}"
|
||||
}
|
||||
|
||||
stages {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.18'
|
||||
library 'status-jenkins-lib@v1.9.20'
|
||||
|
||||
import groovy.json.JsonBuilder
|
||||
|
||||
@@ -134,4 +134,3 @@ def updateBucketJSON(urls, fileName) {
|
||||
writeFile(file: filePath, text: contentJson)
|
||||
return s5cmd.upload(filePath)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.18'
|
||||
library 'status-jenkins-lib@v1.9.20'
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux' }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.18'
|
||||
library 'status-jenkins-lib@v1.9.20'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
@@ -41,6 +41,7 @@ pipeline {
|
||||
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
|
||||
FASTLANE_DISABLE_COLORS = 1
|
||||
BUNDLE_PATH = "${HOME}/.bundle"
|
||||
SENTRY_PRODUCTION = "${utils.isReleaseBuild() ? 'true' : 'false'}"
|
||||
}
|
||||
|
||||
stages {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.18'
|
||||
library 'status-jenkins-lib@v1.9.20'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.13'
|
||||
library 'status-jenkins-lib@v1.9.20'
|
||||
|
||||
pipeline {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.13'
|
||||
library 'status-jenkins-lib@v1.9.20'
|
||||
|
||||
pipeline {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.13'
|
||||
library 'status-jenkins-lib@v1.9.20'
|
||||
|
||||
pipeline {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.13'
|
||||
library 'status-jenkins-lib@v1.9.20'
|
||||
|
||||
pipeline {
|
||||
agent { label 'macos' }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.13'
|
||||
library 'status-jenkins-lib@v1.9.20'
|
||||
|
||||
pipeline {
|
||||
agent { label params.AGENT_LABEL }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.13'
|
||||
library 'status-jenkins-lib@v1.9.20'
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux' }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.13'
|
||||
library 'status-jenkins-lib@v1.9.20'
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
|
||||
@@ -108,6 +108,15 @@ class StatusModule(private val reactContext: ReactApplicationContext, private va
|
||||
)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun intendedPanic(message: String) {
|
||||
StatusBackendClient.executeStatusGoRequest(
|
||||
endpoint = "IntendedPanic",
|
||||
requestBody = message,
|
||||
statusgoFunction = { Statusgo.intendedPanic(message) },
|
||||
)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun addCentralizedMetric(request: String, callback: Callback) {
|
||||
StatusBackendClient.executeStatusGoRequestWithCallback(
|
||||
|
||||
@@ -109,6 +109,17 @@ RCT_EXPORT_METHOD(getNodeConfig:(RCTResponseSenderBlock)callback) {
|
||||
callback:callback];
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(intendedPanic:(NSString *)message) {
|
||||
#if DEBUG
|
||||
NSLog(@"IntendedPanic() method called");
|
||||
#endif
|
||||
[StatusBackendClient executeStatusGoRequest:@"IntendedPanic"
|
||||
body:message
|
||||
statusgoFunction:^NSString *{
|
||||
return StatusgoIntendedPanic(message);
|
||||
}];
|
||||
}
|
||||
|
||||
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(fleets) {
|
||||
return [StatusBackendClient executeStatusGoRequestWithResult:@"Fleets"
|
||||
body:@""
|
||||
|
||||
@@ -48,6 +48,10 @@ in buildGoPackage rec {
|
||||
# TODO: try removing when go is upgraded to 1.22
|
||||
GODEBUG = "netdns=cgo+2";
|
||||
|
||||
# Sentry for status-go
|
||||
SENTRY_CONTEXT_NAME = "status-mobile";
|
||||
SENTRY_CONTEXT_VERSION = version;
|
||||
|
||||
preBuild = ''
|
||||
echo 'Generate static files'
|
||||
pushd go/src/$goPackagePath
|
||||
|
||||
|
After Width: | Height: | Size: 163 KiB |
|
After Width: | Height: | Size: 300 KiB |
|
After Width: | Height: | Size: 142 KiB |
|
After Width: | Height: | Size: 258 KiB |
|
After Width: | Height: | Size: 157 KiB |
|
After Width: | Height: | Size: 282 KiB |
|
After Width: | Height: | Size: 135 KiB |
|
After Width: | Height: | Size: 242 KiB |
|
Before Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 168 KiB |
|
After Width: | Height: | Size: 312 KiB |
|
Before Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 148 KiB |
|
After Width: | Height: | Size: 276 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 136 KiB |
|
After Width: | Height: | Size: 242 KiB |
|
After Width: | Height: | Size: 120 KiB |
|
After Width: | Height: | Size: 219 KiB |
|
After Width: | Height: | Size: 179 KiB |
|
After Width: | Height: | Size: 327 KiB |
|
After Width: | Height: | Size: 128 KiB |
|
After Width: | Height: | Size: 229 KiB |
|
After Width: | Height: | Size: 106 KiB |
|
After Width: | Height: | Size: 195 KiB |
|
After Width: | Height: | Size: 151 KiB |
|
After Width: | Height: | Size: 269 KiB |
|
After Width: | Height: | Size: 136 KiB |
|
After Width: | Height: | Size: 248 KiB |
|
Before Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 237 KiB |
|
After Width: | Height: | Size: 428 KiB |
|
Before Width: | Height: | Size: 195 KiB After Width: | Height: | Size: 235 KiB |
|
Before Width: | Height: | Size: 345 KiB After Width: | Height: | Size: 441 KiB |
@@ -45,8 +45,9 @@ SECRETS_ENV_VARS=(
|
||||
'INFURA_TOKEN_SECRET'
|
||||
'OPENSEA_API_KEY'
|
||||
'MIXPANEL_APP_ID'
|
||||
'MIXPANEL_TOKEN'
|
||||
'MIXPANEL_APP_TOKEN'
|
||||
'POKT_TOKEN'
|
||||
'SENTRY_DSN_STATUS_GO'
|
||||
)
|
||||
|
||||
# Secrets like this can't be passed via args or they end up in derivation.
|
||||
|
||||
@@ -77,8 +77,13 @@
|
||||
#shadow/env "STATUS_BACKEND_SERVER_IMAGE_SERVER_URI_PREFIX"
|
||||
status-im.config/STATUS_BACKEND_SERVER_ROOT_DATA_DIR #shadow/env
|
||||
"STATUS_BACKEND_SERVER_ROOT_DATA_DIR"
|
||||
|
||||
;; Uncomment this line during development if you want to test the integration with Sentry.
|
||||
;;
|
||||
;; status-im.config/SENTRY_DSN_STATUS_GO #shadow/env "SENTRY_DSN_STATUS_GO"
|
||||
|
||||
status-im.config/MIXPANEL_APP_ID #shadow/env "MIXPANEL_APP_ID"
|
||||
status-im.config/MIXPANEL_TOKEN #shadow/env "MIXPANEL_TOKEN"
|
||||
status-im.config/MIXPANEL_APP_TOKEN #shadow/env "MIXPANEL_APP_TOKEN"
|
||||
status-im.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"
|
||||
status-im.config/RARIBLE_MAINNET_API_KEY #shadow/env "RARIBLE_MAINNET_API_KEY"
|
||||
status-im.config/RARIBLE_TESTNET_API_KEY #shadow/env "RARIBLE_TESTNET_API_KEY"
|
||||
@@ -119,9 +124,10 @@
|
||||
status-im.config/INFURA_TOKEN #shadow/env "INFURA_TOKEN"
|
||||
status-im.config/STATUS_BUILD_PROXY_USER #shadow/env "STATUS_BUILD_PROXY_USER"
|
||||
status-im.config/STATUS_BUILD_PROXY_PASSWORD #shadow/env "STATUS_BUILD_PROXY_PASSWORD"
|
||||
status-im.config/SENTRY_DSN_STATUS_GO #shadow/env "SENTRY_DSN_STATUS_GO"
|
||||
status-im.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"
|
||||
status-im.config/MIXPANEL_APP_ID #shadow/env "MIXPANEL_APP_ID"
|
||||
status-im.config/MIXPANEL_TOKEN #shadow/env "MIXPANEL_TOKEN"
|
||||
status-im.config/MIXPANEL_APP_TOKEN #shadow/env "MIXPANEL_APP_TOKEN"
|
||||
status-im.config/RARIBLE_MAINNET_API_KEY #shadow/env "RARIBLE_MAINNET_API_KEY"
|
||||
status-im.config/RARIBLE_TESTNET_API_KEY #shadow/env "RARIBLE_TESTNET_API_KEY"
|
||||
status-im.config/ALCHEMY_ETHEREUM_MAINNET_TOKEN #shadow/env "ALCHEMY_ETHEREUM_MAINNET_TOKEN"
|
||||
@@ -168,7 +174,7 @@
|
||||
status-im.config/INFURA_TOKEN #shadow/env "INFURA_TOKEN"
|
||||
status-im.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"
|
||||
status-im.config/MIXPANEL_APP_ID #shadow/env "MIXPANEL_APP_ID"
|
||||
status-im.config/MIXPANEL_TOKEN #shadow/env "MIXPANEL_TOKEN"
|
||||
status-im.config/MIXPANEL_APP_TOKEN #shadow/env "MIXPANEL_APP_TOKEN"
|
||||
status-im.config/RARIBLE_MAINNET_API_KEY #shadow/env "RARIBLE_MAINNET_API_KEY"
|
||||
status-im.config/RARIBLE_TESTNET_API_KEY #shadow/env "RARIBLE_TESTNET_API_KEY"
|
||||
status-im.config/ALCHEMY_ETHEREUM_MAINNET_TOKEN #shadow/env "ALCHEMY_ETHEREUM_MAINNET_TOKEN"
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
(ns legacy.status-im.ui.screens.advanced-settings.views
|
||||
(:require
|
||||
[clojure.string :as string]
|
||||
[legacy.status-im.ui.components.core :as components]
|
||||
[legacy.status-im.ui.components.list.item :as list.item]
|
||||
[legacy.status-im.ui.components.list.views :as list]
|
||||
[quo.core :as quo]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.config :as config]
|
||||
[status-im.feature-flags :as ff]
|
||||
[utils.i18n :as i18n]
|
||||
[utils.re-frame :as rf])
|
||||
(:require-macros [legacy.status-im.utils.views :as views]))
|
||||
@@ -17,7 +20,16 @@
|
||||
peer-syncing-enabled?]}]
|
||||
(keep
|
||||
identity
|
||||
[{:size :small
|
||||
[(when (ff/enabled? ::ff/app-monitoring.intentional-crash)
|
||||
{:size :small
|
||||
:title (str "Force crash immediately"
|
||||
(when (string/blank? config/sentry-dsn-status-go)
|
||||
" (Sentry DSN is not set)"))
|
||||
:accessibility-label :intended-panic
|
||||
:on-press (fn []
|
||||
(re-frame/dispatch [:app-monitoring/intended-panic
|
||||
"status-mobile intentional panic"]))})
|
||||
{:size :small
|
||||
:title (i18n/label :t/log-level)
|
||||
:accessibility-label :log-level-settings-button
|
||||
:on-press
|
||||
|
||||
@@ -569,3 +569,7 @@
|
||||
(.createAccountFromPrivateKey ^js (account-manager)
|
||||
(types/clj->json {:privateKey private-key})
|
||||
callback)))
|
||||
|
||||
(defn intended-panic
|
||||
[message]
|
||||
(.intendedPanic ^js (status) message))
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
[rn/view (style/card-view-chat-icon 48 theme)
|
||||
[icon/community-icon {:images images} 48]]
|
||||
(when (= status :gated)
|
||||
[rn/view (style/permission-tag-styles)
|
||||
[rn/view style/permission-tag-styles
|
||||
[community-view/permission-tag-container
|
||||
{:locked? locked?
|
||||
:status status
|
||||
@@ -63,10 +63,12 @@
|
||||
[community-view/community-title
|
||||
{:title name
|
||||
:description description}]
|
||||
[rn/view {:style (style/card-stats-position)}
|
||||
[rn/view {:style style/card-stats-position}
|
||||
[community-view/community-stats-column
|
||||
{:type :card-view}]]
|
||||
[rn/view {:style (style/community-tags-position)}
|
||||
{:type :card-view
|
||||
:members-count (:members-count community)
|
||||
:active-members-count (:active-members-count community)}]]
|
||||
[rn/view {:style style/community-tags-position}
|
||||
[community-view/community-tags {:tags tags}]]]]]]))
|
||||
|
||||
(defn view
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
:style {:border-radius 12
|
||||
:margin-left 12}}
|
||||
props)
|
||||
[rn/view (merge (style/membership-info-container) style)
|
||||
[rn/view (merge style/membership-info-container style)
|
||||
[community-icon/community-icon
|
||||
{:images images} 32]
|
||||
[rn/view
|
||||
|
||||
@@ -11,11 +11,8 @@
|
||||
[react-native.gesture :as gesture]))
|
||||
|
||||
(defn community-stats-column
|
||||
[{:keys [type members-count active-count]}]
|
||||
[rn/view
|
||||
(if (= type :card-view)
|
||||
(style/card-stats-container)
|
||||
(style/list-stats-container))
|
||||
[{:keys [type members-count active-members-count]}]
|
||||
[rn/view (if (= type :card-view) style/card-stats-container style/list-stats-container)
|
||||
[community-stat/view
|
||||
{:accessibility-label :stats-members-count
|
||||
:icon :i/group
|
||||
@@ -24,7 +21,7 @@
|
||||
[community-stat/view
|
||||
{:accessibility-label :stats-active-count
|
||||
:icon :i/active-members
|
||||
:value active-count}]])
|
||||
:value active-members-count}]])
|
||||
|
||||
(defn community-tags
|
||||
[{:keys [tags container-style last-item-style]}]
|
||||
|
||||
@@ -17,24 +17,20 @@
|
||||
(def detail-container
|
||||
{:flex 1})
|
||||
|
||||
(defn card-stats-container
|
||||
[]
|
||||
(def card-stats-container
|
||||
{:flex-direction :row})
|
||||
|
||||
(defn list-stats-container
|
||||
[]
|
||||
(def list-stats-container
|
||||
{:flex-direction :row
|
||||
:align-items :center})
|
||||
|
||||
(defn card-stats-position
|
||||
[]
|
||||
(def card-stats-position
|
||||
{:position :absolute
|
||||
:top 116
|
||||
:right 12
|
||||
:left 12})
|
||||
|
||||
(defn community-tags-position
|
||||
[]
|
||||
(def community-tags-position
|
||||
{:position :absolute
|
||||
:top 154
|
||||
:right 12
|
||||
@@ -68,8 +64,7 @@
|
||||
colors/neutral-90
|
||||
theme)})
|
||||
|
||||
(defn membership-info-container
|
||||
[]
|
||||
(def membership-info-container
|
||||
{:flex-direction :row
|
||||
:border-radius 16
|
||||
:align-items :center
|
||||
@@ -87,8 +82,7 @@
|
||||
:border-top-left-radius 20
|
||||
:background-color colors/primary-50-opa-20})
|
||||
|
||||
(defn permission-tag-styles
|
||||
[]
|
||||
(def permission-tag-styles
|
||||
{:position :absolute
|
||||
:top 8
|
||||
:right 8})
|
||||
@@ -146,10 +140,14 @@
|
||||
:background-color (colors/theme-colors colors/white colors/neutral-90 theme)})
|
||||
|
||||
(def loading-tags-container
|
||||
{:margin-top 20 :flex-direction :row :align-items :center})
|
||||
{:margin-top 20
|
||||
:flex-direction :row
|
||||
:align-items :center})
|
||||
|
||||
(def loading-stats-container
|
||||
{:margin-top 20 :flex-direction :row :align-items :center})
|
||||
{:margin-top 20
|
||||
:flex-direction :row
|
||||
:align-items :center})
|
||||
|
||||
(defn loading-stat-circle
|
||||
[theme margin-left]
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
(ns status-im.common.app-monitoring.effects
|
||||
(:require
|
||||
[native-module.core :as native-module]
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
(rf/reg-fx :effects.app-monitoring/intended-panic
|
||||
(fn [message]
|
||||
(native-module/intended-panic message)))
|
||||
@@ -0,0 +1,8 @@
|
||||
(ns status-im.common.app-monitoring.events
|
||||
(:require
|
||||
status-im.common.app-monitoring.effects
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
(rf/reg-event-fx :app-monitoring/intended-panic
|
||||
(fn [_ [message]]
|
||||
{:fx [[:effects.app-monitoring/intended-panic message]]}))
|
||||
@@ -26,9 +26,19 @@
|
||||
:qr-code (js/require "../resources/images/ui2/qr-code.png")
|
||||
:keycard-logo (js/require "../resources/images/ui2/keycard-logo.png")
|
||||
:keycard-buy (js/require "../resources/images/ui2/keycard-buy.png")
|
||||
:keycard-backup-positive (js/require "../resources/images/ui2/keycard-backup-positive.png")
|
||||
:keycard-change-pin (js/require "../resources/images/ui2/keycard-change-pin.png")
|
||||
:keycard-change-pin-positive (js/require "../resources/images/ui2/keycard-change-pin-positive.png")
|
||||
:keycard-change-pin-negative (js/require "../resources/images/ui2/keycard-change-pin-negative.png")
|
||||
:keycard-migration (js/require "../resources/images/ui2/keycard-migration.png")
|
||||
:keycard-migration-failed (js/require "../resources/images/ui2/keycard-migration-failed.png")
|
||||
:keycard-migration-succeeded (js/require "../resources/images/ui2/keycard-migration-succeeded.png")
|
||||
:keycard-not-same (js/require "../resources/images/ui2/keycard-not-same.png")
|
||||
:keycard-not-empty (js/require "../resources/images/ui2/keycard-not-empty.png")
|
||||
:keycard-reset-positive (js/require "../resources/images/ui2/keycard-reset-positive.png")
|
||||
:keycard-reset-negative (js/require "../resources/images/ui2/keycard-reset-negative.png")
|
||||
:keycard-unblock (js/require "../resources/images/ui2/keycard-unblock.png")
|
||||
:keycard-unblock-positive (js/require "../resources/images/ui2/keycard-unblock-positive.png")
|
||||
:not-keycard (js/require "../resources/images/ui2/not-keycard.png")
|
||||
:discover (js/require "../resources/images/ui2/discover.png")
|
||||
:invite-friends (js/require "../resources/images/ui2/invite-friends.png")
|
||||
|
||||
@@ -26,11 +26,11 @@
|
||||
(goog-define ALCHEMY_BASE_MAINNET_TOKEN "")
|
||||
(goog-define ALCHEMY_BASE_SEPOLIA_TOKEN "")
|
||||
(goog-define WALLET_CONNECT_PROJECT_ID "87815d72a81d739d2a7ce15c2cfdefb3")
|
||||
(goog-define MIXPANEL_APP_ID "3350627")
|
||||
(goog-define MIXPANEL_TOKEN "5c73bda2d36a9f688a5ee45641fb6775")
|
||||
(goog-define STATUS_BUILD_ETH_RPC_PROXY_USER "")
|
||||
(goog-define STATUS_BUILD_ETH_RPC_PROXY_PASSWORD "")
|
||||
(goog-define STATUS_BUILD_ETH_RPC_PROXY_URL "")
|
||||
(goog-define MIXPANEL_APP_ID "")
|
||||
(goog-define MIXPANEL_APP_TOKEN "")
|
||||
|
||||
(def mainnet-rpc-url (str "https://eth-archival.rpc.grove.city/v1/" POKT_TOKEN))
|
||||
(def sepolia-rpc-url (str "https://sepolia-archival.rpc.grove.city/v1/" POKT_TOKEN))
|
||||
@@ -53,8 +53,16 @@
|
||||
(def opensea-link "https://opensea.io")
|
||||
(def opensea-tesnet-link "https://testnets.opensea.io")
|
||||
|
||||
;; These MixPanel values should be injected via the CI since they vary depending
|
||||
;; on the environment, as we want to keep production and test/development
|
||||
;; metrics separate.
|
||||
;;
|
||||
;; We primarily use two MixPanel projects: the production project is named
|
||||
;; `status-im`, and the test project is `test.status-im`.
|
||||
;;
|
||||
;; During development, do not use the production app ID and token.
|
||||
(def mixpanel-app-id MIXPANEL_APP_ID)
|
||||
(def mixpanel-token MIXPANEL_TOKEN)
|
||||
(def mixpanel-token MIXPANEL_APP_TOKEN)
|
||||
|
||||
(def opensea-api-key OPENSEA_API_KEY)
|
||||
(def status-proxy-enabled? true)
|
||||
@@ -136,3 +144,8 @@
|
||||
|
||||
(def re-frisk-host (get-config :RE_FRISK_HOST "localhost"))
|
||||
(def re-frisk-port (get-config :RE_FRISK_PORT "4567"))
|
||||
;;;; Sentry
|
||||
;; Documentation: status-go/internal/sentry/README.md
|
||||
(goog-define SENTRY_DSN_STATUS_GO "")
|
||||
(def sentry-enabled? (enabled? (get-config :SENTRY_ENABLED "0")))
|
||||
(def sentry-dsn-status-go SENTRY_DSN_STATUS_GO)
|
||||
|
||||
@@ -18,7 +18,9 @@
|
||||
:params [{:id request-to-join-id}]
|
||||
:on-success #(rf/dispatch [:communities/cancel-request-to-join-success %])
|
||||
:js-response true
|
||||
:on-error #(log/error "failed to cancel request to join community" request-to-join-id %)}]}))
|
||||
:on-error #(log/error "failed to cancel request to join community"
|
||||
request-to-join-id
|
||||
%)}]}))
|
||||
|
||||
(rf/reg-event-fx :communities/left
|
||||
(fn [_ [response-js]]
|
||||
|
||||
@@ -34,8 +34,7 @@
|
||||
|
||||
(defn screen-title
|
||||
[]
|
||||
[rn/view
|
||||
{:style (style/screen-title-container (safe-area/get-top))}
|
||||
[rn/view {:style (style/screen-title-container (safe-area/get-top))}
|
||||
[quo/text
|
||||
{:accessibility-label :communities-screen-title
|
||||
:weight :semi-bold
|
||||
@@ -95,14 +94,14 @@
|
||||
|
||||
(defn featured-list
|
||||
[communities view-type]
|
||||
(let [view-size (reagent/atom 0)
|
||||
loaded? (and communities (pos? (count communities)))]
|
||||
(let [view-size (reagent/atom 0)
|
||||
set-view-size (fn [e]
|
||||
(reset! view-size (- (oops/oget e "nativeEvent.layout.width") 40)))
|
||||
loaded? (and communities (pos? (count communities)))]
|
||||
(fn []
|
||||
[rn/view
|
||||
{:style style/featured-list-container
|
||||
:on-layout #(swap! view-size
|
||||
(fn [_]
|
||||
(- (oops/oget % "nativeEvent.layout.width") 40)))}
|
||||
:on-layout set-view-size}
|
||||
(when-not (= @view-size 0)
|
||||
[rn/flat-list
|
||||
{:key-fn :id
|
||||
@@ -132,32 +131,29 @@
|
||||
[discover-communities-segments selected-tab false]])
|
||||
|
||||
(defn other-communities-list
|
||||
[{:keys [communities communities-ids view-type]}]
|
||||
[{:keys [communities view-type]}]
|
||||
[rn/view {:style style/other-communities-container}
|
||||
(if (and communities (pos? (count communities)))
|
||||
(map-indexed
|
||||
(fn [inner-index item]
|
||||
(let [community-id (when communities-ids item)
|
||||
community (if communities
|
||||
item
|
||||
(rf/sub [:communities/home-item community-id]))
|
||||
cover {:uri (get-in (:images item) [:banner :uri])}]
|
||||
[rn/view
|
||||
{:key (str inner-index (:id community))
|
||||
:margin-bottom 16}
|
||||
(if (= view-type :card-view)
|
||||
[quo/community-card-view-item
|
||||
{:community (assoc community :cover cover)
|
||||
:on-press #(rf/dispatch [:communities/navigate-to-community-overview (:id community)])}]
|
||||
|
||||
[quo/community-list
|
||||
{:on-press (fn []
|
||||
(rf/dispatch [:dismiss-keyboard])
|
||||
(rf/dispatch [:communities/navigate-to-community-overview
|
||||
(:id community)]))
|
||||
:on-long-press #(js/alert "TODO: to be implemented")}
|
||||
community])]))
|
||||
(if communities communities communities-ids))
|
||||
(if (seq communities)
|
||||
(map-indexed (fn [inner-index {community-id :id :as community}]
|
||||
(let [cover {:uri (-> community :images :banner :uri)}]
|
||||
[rn/view
|
||||
{:key (str inner-index community-id)
|
||||
:style {:margin-bottom 16}}
|
||||
(if (= view-type :card-view)
|
||||
[quo/community-card-view-item
|
||||
{:community (assoc community
|
||||
:cover cover
|
||||
:members-count (count (:members community)))
|
||||
:on-press #(rf/dispatch [:communities/navigate-to-community-overview
|
||||
community-id])}]
|
||||
[quo/community-list
|
||||
{:on-press (fn []
|
||||
(rf/dispatch [:dismiss-keyboard])
|
||||
(rf/dispatch [:communities/navigate-to-community-overview
|
||||
community-id]))
|
||||
:on-long-press #(js/alert "TODO: to be implemented")}
|
||||
community])]))
|
||||
communities)
|
||||
[:<>
|
||||
[rn/view {:margin-bottom 16} [quo/community-card-view-item {:loading? true}]]
|
||||
[rn/view {:margin-bottom 16} [quo/community-card-view-item {:loading? true}]]
|
||||
@@ -168,8 +164,9 @@
|
||||
[rn/view {:style {:flex 1}}
|
||||
(case @selected-tab
|
||||
:all
|
||||
(other-communities-list {:communities (rf/sub [:communities/other-contract-communities])
|
||||
:view-type view-type})
|
||||
[other-communities-list
|
||||
{:communities (rf/sub [:communities/other-contract-communities])
|
||||
:view-type view-type}]
|
||||
|
||||
:open
|
||||
[:<>]
|
||||
@@ -183,60 +180,55 @@
|
||||
(i18n/label :t/error)])])
|
||||
|
||||
(defn render-communities
|
||||
[selected-tab
|
||||
featured-communities-count
|
||||
featured-communities
|
||||
view-type]
|
||||
(fn []
|
||||
[rn/view
|
||||
[discover-communities-header
|
||||
{:selected-tab selected-tab
|
||||
:view-type view-type
|
||||
:featured-communities-count featured-communities-count
|
||||
:featured-communities featured-communities}]
|
||||
[communities-lists selected-tab view-type]]))
|
||||
[{:keys [selected-tab featured-communities-count featured-communities view-type]}]
|
||||
[rn/view
|
||||
[discover-communities-header
|
||||
{:selected-tab selected-tab
|
||||
:view-type view-type
|
||||
:featured-communities-count featured-communities-count
|
||||
:featured-communities featured-communities}]
|
||||
[communities-lists selected-tab view-type]])
|
||||
|
||||
(defn render-sticky-header
|
||||
[{:keys [selected-tab scroll-height]}]
|
||||
(fn []
|
||||
(when (> @scroll-height 360)
|
||||
[rn/view
|
||||
{:style (style/blur-tabs-header (safe-area/get-top))}
|
||||
[discover-communities-segments selected-tab true]])))
|
||||
(when (> @scroll-height 360)
|
||||
[rn/view
|
||||
{:style (style/blur-tabs-header (safe-area/get-top))}
|
||||
[discover-communities-segments selected-tab true]]))
|
||||
|
||||
(defn discover-screen-content
|
||||
[featured-communities theme]
|
||||
(let [view-type (reagent/atom :card-view)
|
||||
selected-tab (reagent/atom :all)
|
||||
scroll-height (reagent/atom 0)
|
||||
featured-communities-count (count featured-communities)]
|
||||
[]
|
||||
(let [view-type (reagent/atom :card-view)
|
||||
selected-tab (reagent/atom :all)
|
||||
scroll-height (reagent/atom 0)]
|
||||
(fn []
|
||||
[scroll-page/scroll-page
|
||||
{:on-scroll #(reset! scroll-height %)
|
||||
:page-nav-props {:background :blur}
|
||||
:navigate-back? :true
|
||||
:height (if (> @scroll-height 360)
|
||||
208
|
||||
148)
|
||||
:background-color (colors/theme-colors colors/white colors/neutral-95 theme)
|
||||
:sticky-header [render-sticky-header
|
||||
{:selected-tab selected-tab
|
||||
:scroll-height scroll-height}]}
|
||||
|
||||
[render-communities
|
||||
selected-tab
|
||||
featured-communities-count
|
||||
featured-communities
|
||||
@view-type]])))
|
||||
(let [theme (quo.theme/use-theme)
|
||||
featured-communities (rf/sub [:communities/featured-contract-communities])
|
||||
featured-communities-count (count featured-communities)]
|
||||
[scroll-page/scroll-page
|
||||
{:on-scroll #(reset! scroll-height %)
|
||||
:page-nav-props {:background :blur}
|
||||
:navigate-back? :true
|
||||
:height (if (> @scroll-height 360)
|
||||
208
|
||||
148)
|
||||
:background-color (colors/theme-colors colors/white colors/neutral-95 theme)
|
||||
:sticky-header [render-sticky-header
|
||||
{:selected-tab selected-tab
|
||||
:scroll-height scroll-height}]}
|
||||
[render-communities
|
||||
{:selected-tab selected-tab
|
||||
:featured-communities-count featured-communities-count
|
||||
:featured-communities featured-communities
|
||||
:view-type @view-type}]]))))
|
||||
|
||||
(defn view
|
||||
[]
|
||||
(let [theme (quo.theme/use-theme)
|
||||
featured-communities (rf/sub [:communities/featured-contract-communities])]
|
||||
(let [theme (quo.theme/use-theme)]
|
||||
(rn/use-mount #(rf/dispatch [:fetch-contract-communities]))
|
||||
[rn/view
|
||||
{:style (style/discover-screen-container (colors/theme-colors
|
||||
colors/white
|
||||
colors/neutral-95
|
||||
theme))}
|
||||
[discover-screen-content featured-communities theme]]))
|
||||
[discover-screen-content]]))
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
:on-press events-helper/navigate-back}]
|
||||
[quo/page-top
|
||||
{:title (i18n/label :t/ready-add-keypair-keycard)}]
|
||||
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}}
|
||||
[rn/image
|
||||
{:resize-mode :contain
|
||||
:source (resources/get-image :keycard-migration)}]]
|
||||
[rn/image
|
||||
{:resize-mode :contain
|
||||
:style {:flex 1 :width (:width (rn/get-window))}
|
||||
:source (resources/get-image :keycard-migration)}]
|
||||
[common.view/tips]
|
||||
[quo/bottom-actions
|
||||
{:actions :one-action
|
||||
@@ -33,8 +33,11 @@
|
||||
:on-press events-helper/navigate-back}]
|
||||
[quo/page-top
|
||||
{:title (i18n/label :t/backup-keycard-created)}]
|
||||
[rn/view {:style {:flex 1}}]
|
||||
[rn/view {:style {:padding-horizontal 20}}
|
||||
[rn/image
|
||||
{:resize-mode :contain
|
||||
:style {:flex 1 :width (:width (rn/get-window))}
|
||||
:source (resources/get-image :keycard-backup-positive)}]
|
||||
[rn/view {:style {:padding-horizontal 20 :padding-vertical 12}}
|
||||
[quo/button {:on-press events-helper/navigate-back}
|
||||
(i18n/label :t/done)]]])
|
||||
|
||||
@@ -49,7 +52,10 @@
|
||||
{:title (i18n/label :t/keycard-not-empty)
|
||||
:description :text
|
||||
:description-text (i18n/label :t/scan-empty-keycard)}]
|
||||
[rn/view {:style {:flex 1}}]
|
||||
[rn/image
|
||||
{:resize-mode :contain
|
||||
:style {:flex 1 :width (:width (rn/get-window))}
|
||||
:source (resources/get-image :keycard-not-empty)}]
|
||||
[common.view/tips]
|
||||
[rn/view {:style {:padding-horizontal 20}}
|
||||
[quo/button {:on-press on-press}
|
||||
@@ -65,10 +71,10 @@
|
||||
{:title (i18n/label :t/scan-empty-keycard)
|
||||
:description :text
|
||||
:description-text (i18n/label :t/backup-empty-keycard-only)}]
|
||||
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}}
|
||||
[rn/image
|
||||
{:resize-mode :contain
|
||||
:source (resources/get-image :check-your-keycard)}]]
|
||||
[rn/image
|
||||
{:resize-mode :contain
|
||||
:style {:flex 1 :width (:width (rn/get-window))}
|
||||
:source (resources/get-image :check-your-keycard)}]
|
||||
[common.view/tips]
|
||||
[quo/bottom-actions
|
||||
{:actions :one-action
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
(:require [quo.core :as quo]
|
||||
[react-native.core :as rn]
|
||||
[status-im.common.events-helper :as events-helper]
|
||||
[status-im.common.resources :as resources]
|
||||
[status-im.contexts.keycard.common.view :as common.view]
|
||||
[utils.i18n :as i18n]
|
||||
[utils.re-frame :as rf]))
|
||||
@@ -32,9 +33,10 @@
|
||||
:on-press events-helper/navigate-back}]
|
||||
[quo/page-top
|
||||
{:title (i18n/label :t/ready-to-change-pin)}]
|
||||
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}}
|
||||
[rn/image
|
||||
{:resize-mode :contain}]]
|
||||
[rn/image
|
||||
{:resize-mode :contain
|
||||
:style {:flex 1 :width (:width (rn/get-window))}
|
||||
:source (resources/get-image :keycard-change-pin)}]
|
||||
[common.view/tips]
|
||||
[quo/bottom-actions
|
||||
{:actions :one-action
|
||||
@@ -52,9 +54,10 @@
|
||||
{:title (i18n/label :t/keycard-pin-changed)
|
||||
:description :text
|
||||
:description-text (i18n/label :t/keycard-pin-changed-description)}]
|
||||
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}}
|
||||
[rn/image
|
||||
{:resize-mode :contain}]]
|
||||
[rn/image
|
||||
{:resize-mode :contain
|
||||
:style {:flex 1 :width (:width (rn/get-window))}
|
||||
:source (resources/get-image :keycard-change-pin-positive)}]
|
||||
[quo/bottom-actions
|
||||
{:actions :one-action
|
||||
:button-one-label (i18n/label :t/done)
|
||||
@@ -70,9 +73,10 @@
|
||||
{:title (i18n/label :t/keycard-pin-change-failed)
|
||||
:description :text
|
||||
:description-text (i18n/label :t/keycard-pin-change-failed-description)}]
|
||||
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}}
|
||||
[rn/image
|
||||
{:resize-mode :contain}]]
|
||||
[rn/image
|
||||
{:resize-mode :contain
|
||||
:style {:flex 1 :width (:width (rn/get-window))}
|
||||
:source (resources/get-image :keycard-change-pin-negative)}]
|
||||
[common.view/tips]
|
||||
[quo/bottom-actions
|
||||
{:actions :one-action
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
{:title (i18n/label :t/check-keycard)
|
||||
:description :text
|
||||
:description-text (i18n/label :t/see-keycard-ready)}]
|
||||
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}}
|
||||
[rn/image
|
||||
{:resize-mode :contain
|
||||
:source (resources/get-image :check-your-keycard)}]]
|
||||
[rn/image
|
||||
{:resize-mode :contain
|
||||
:style {:flex 1 :width (:width (rn/get-window))}
|
||||
:source (resources/get-image :check-your-keycard)}]
|
||||
[common.view/tips]
|
||||
[quo/bottom-actions
|
||||
{:actions :one-action
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
(:require [quo.core :as quo]
|
||||
[react-native.core :as rn]
|
||||
[status-im.common.events-helper :as events-helper]
|
||||
[status-im.common.resources :as resources]
|
||||
[utils.i18n :as i18n]))
|
||||
|
||||
(defn view
|
||||
@@ -14,8 +15,11 @@
|
||||
{:title (i18n/label :t/different-keycard)
|
||||
:description :text
|
||||
:description-text (i18n/label :t/scan-previous-keycard)}]
|
||||
[rn/view {:style {:flex 1}}]
|
||||
[rn/view {:style {:padding-horizontal 20}}
|
||||
[rn/image
|
||||
{:resize-mode :contain
|
||||
:style {:flex 1 :width (:width (rn/get-window))}
|
||||
:source (resources/get-image :keycard-not-same)}]
|
||||
[rn/view {:style {:padding-horizontal 20 :padding-vertical 12}}
|
||||
[quo/button {:on-press events-helper/navigate-back}
|
||||
(i18n/label :t/try-again)]]])
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
(:require [quo.core :as quo]
|
||||
[react-native.core :as rn]
|
||||
[status-im.common.events-helper :as events-helper]
|
||||
[status-im.common.resources :as resources]
|
||||
[utils.i18n :as i18n]
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
@@ -48,8 +49,11 @@
|
||||
{:title (i18n/label :t/keycard-reset-success)
|
||||
:description :text
|
||||
:description-text (i18n/label :t/keycard-empty-ready)}]
|
||||
[rn/view {:style {:flex 1}}]
|
||||
[rn/view {:style {:padding-horizontal 20}}
|
||||
[rn/image
|
||||
{:resize-mode :contain
|
||||
:style {:flex 1 :width (:width (rn/get-window))}
|
||||
:source (resources/get-image :keycard-reset-positive)}]
|
||||
[rn/view {:style {:padding-horizontal 20 :padding-vertical 12}}
|
||||
[quo/button {:on-press events-helper/navigate-back}
|
||||
(i18n/label :t/done)]]])
|
||||
|
||||
@@ -61,8 +65,11 @@
|
||||
:on-press events-helper/navigate-back}]
|
||||
[quo/page-top
|
||||
{:title (i18n/label :t/keycard-reset-failed)}]
|
||||
[rn/view {:style {:flex 1}}]
|
||||
[rn/view {:style {:padding-horizontal 20}}
|
||||
[rn/image
|
||||
{:resize-mode :contain
|
||||
:style {:flex 1 :width (:width (rn/get-window))}
|
||||
:source (resources/get-image :keycard-reset-negative)}]
|
||||
[rn/view {:style {:padding-horizontal 20 :padding-vertical 12}}
|
||||
[quo/button {:on-press events-helper/navigate-back}
|
||||
(i18n/label :t/try-again)]]])
|
||||
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
:profile-picture profile-picture
|
||||
:customization-color customization-color}
|
||||
:container-style {:margin-top constants/page-nav-height}}]
|
||||
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}}
|
||||
[rn/image
|
||||
{:resize-mode :contain
|
||||
:source (resources/get-image :keycard-migration-failed)}]]
|
||||
[rn/image
|
||||
{:resize-mode :contain
|
||||
:style {:flex 1 :width (:width (rn/get-window))}
|
||||
:source (resources/get-image :keycard-migration-failed)}]
|
||||
[quo/divider-label (i18n/label :t/what-you-can-do)]
|
||||
[quo/markdown-list {:description (i18n/label :t/keycard-migration-failed-instruction-1)}]
|
||||
[quo/markdown-list {:description (i18n/label :t/keycard-migration-failed-instruction-2)}]
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
:container-style {:margin-top constants/page-nav-height}}]
|
||||
[quo/text {:style {:padding-horizontal 20}}
|
||||
(i18n/label :t/do-not-quit)]
|
||||
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}}
|
||||
[rn/image
|
||||
{:resize-mode :contain
|
||||
:source (resources/get-image :keycard-migration)}]]]))
|
||||
[rn/image
|
||||
{:resize-mode :contain
|
||||
:style {:flex 1 :width (:width (rn/get-window))}
|
||||
:source (resources/get-image :keycard-migration)}]]))
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
:container-style {:margin-top constants/page-nav-height}}]
|
||||
[quo/text {:style {:padding-horizontal 20}}
|
||||
(i18n/label :t/use-keycard-for-status)]
|
||||
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}}
|
||||
[rn/image
|
||||
{:resize-mode :contain
|
||||
:source (resources/get-image :keycard-migration-succeeded)}]]
|
||||
[rn/image
|
||||
{:resize-mode :contain
|
||||
:style {:flex 1 :width (:width (rn/get-window))}
|
||||
:source (resources/get-image :keycard-migration-succeeded)}]
|
||||
[quo/button
|
||||
{:on-press #(rf/dispatch [:profile/logout])
|
||||
:container-style {:margin-horizontal 20}}
|
||||
:container-style {:margin-horizontal 20 :margin-vertical 12}}
|
||||
(i18n/label :t/logout)]]))
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
:context-tag {:full-name profile-name
|
||||
:profile-picture profile-picture
|
||||
:customization-color customization-color}}]
|
||||
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}}
|
||||
[rn/image
|
||||
{:resize-mode :contain
|
||||
:source (resources/get-image :keycard-migration)}]]
|
||||
[rn/image
|
||||
{:resize-mode :contain
|
||||
:style {:flex 1 :width (:width (rn/get-window))}
|
||||
:source (resources/get-image :keycard-migration)}]
|
||||
[common.view/tips]
|
||||
[quo/bottom-actions
|
||||
{:actions :one-action
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
{:title (i18n/label :t/oops-not-keycard)
|
||||
:description :text
|
||||
:description-text (i18n/label :t/make-sure-keycard)}]
|
||||
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}}
|
||||
[rn/image
|
||||
{:resize-mode :contain
|
||||
:source (resources/get-image :not-keycard)}]]
|
||||
[rn/view {:style {:padding-horizontal 20}}
|
||||
[rn/image
|
||||
{:resize-mode :contain
|
||||
:style {:flex 1 :width (:width (rn/get-window))}
|
||||
:source (resources/get-image :not-keycard)}]
|
||||
[rn/view {:style {:padding-horizontal 20 :padding-vertical 12}}
|
||||
[quo/button {:on-press events-helper/navigate-back}
|
||||
(i18n/label :t/try-again)]]])
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
(:require [quo.core :as quo]
|
||||
[react-native.core :as rn]
|
||||
[status-im.common.events-helper :as events-helper]
|
||||
[status-im.common.resources :as resources]
|
||||
[status-im.contexts.keycard.common.view :as common.view]
|
||||
[utils.i18n :as i18n]
|
||||
[utils.re-frame :as rf]))
|
||||
@@ -13,9 +14,14 @@
|
||||
{:icon-name :i/close
|
||||
:on-press events-helper/navigate-back}]
|
||||
[quo/page-top
|
||||
{:title (i18n/label :t/keycard-unblocked)}]
|
||||
[rn/view {:style {:flex 1}}]
|
||||
[rn/view {:style {:padding-horizontal 20}}
|
||||
{:title (i18n/label :t/keycard-unblocked)
|
||||
:description :text
|
||||
:description-text (i18n/label :t/keycard-unblocked-description)}]
|
||||
[rn/image
|
||||
{:resize-mode :contain
|
||||
:style {:flex 1 :width (:width (rn/get-window))}
|
||||
:source (resources/get-image :keycard-unblock-positive)}]
|
||||
[rn/view {:style {:padding-horizontal 20 :padding-vertical 12}}
|
||||
[quo/button {:on-press events-helper/navigate-back}
|
||||
(i18n/label :t/done)]]])
|
||||
|
||||
@@ -27,7 +33,10 @@
|
||||
:on-press events-helper/navigate-back}]
|
||||
[quo/page-top
|
||||
{:title (i18n/label :t/ready-to-unblock-keycard)}]
|
||||
[rn/view {:style {:flex 1}}]
|
||||
[rn/image
|
||||
{:resize-mode :contain
|
||||
:style {:flex 1 :width (:width (rn/get-window))}
|
||||
:source (resources/get-image :keycard-unblock)}]
|
||||
[common.view/tips]
|
||||
[quo/bottom-actions
|
||||
{:actions :one-action
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
{:dataDir (native-module/backup-disabled-data-dir)
|
||||
:mixpanelAppId config/mixpanel-app-id
|
||||
:mixpanelToken config/mixpanel-token
|
||||
:sentryDSN (if config/sentry-enabled? config/sentry-dsn-status-go "")
|
||||
:mediaServerEnableTLS (config/enabled? config/STATUS_BACKEND_SERVER_MEDIA_SERVER_ENABLE_TLS)
|
||||
:logEnabled (not (string/blank? config/log-level))
|
||||
:logLevel config/log-level
|
||||
|
||||
@@ -164,15 +164,12 @@
|
||||
on-press-continue (rn/use-callback
|
||||
(fn []
|
||||
(rf/dispatch
|
||||
[:wallet/set-address-to-save
|
||||
[:open-modal :screen/settings.save-address
|
||||
{:address address
|
||||
:ens (when ens-name? address-or-ens)
|
||||
:ens? ens-name?}])
|
||||
(rf/dispatch
|
||||
[:open-modal :screen/settings.save-address]))
|
||||
:ens? ens-name?}]))
|
||||
[address ens-name? address-or-ens])]
|
||||
(rn/use-unmount #(rf/dispatch [:wallet/clean-scanned-address]))
|
||||
(rn/use-mount #(rf/dispatch [:wallet/clear-address-to-save]))
|
||||
[quo/overlay {:type :shell}
|
||||
[floating-button-page/view
|
||||
{:footer-container-padding 0
|
||||
|
||||
@@ -143,18 +143,6 @@
|
||||
|
||||
(rf/reg-event-fx :wallet/add-saved-address-failed add-saved-address-failed)
|
||||
|
||||
(defn set-address-to-save
|
||||
[{:keys [db]} [args]]
|
||||
{:db (assoc-in db [:wallet :ui :saved-address] args)})
|
||||
|
||||
(rf/reg-event-fx :wallet/set-address-to-save set-address-to-save)
|
||||
|
||||
(defn clear-address-to-save
|
||||
[{:keys [db]}]
|
||||
{:db (update-in db [:wallet :ui] dissoc :saved-address)})
|
||||
|
||||
(rf/reg-event-fx :wallet/clear-address-to-save clear-address-to-save)
|
||||
|
||||
(defn check-remaining-capacity-for-saved-addresses
|
||||
[{:keys [db]} [{:keys [on-success on-error]}]]
|
||||
(let [test-networks-enabled? (boolean (get-in db [:profile/profile :test-networks-enabled?]))]
|
||||
|
||||
@@ -17,50 +17,48 @@
|
||||
|
||||
(defn view
|
||||
[]
|
||||
(let [{:keys [edit?]} (rf/sub [:get-screen-params])
|
||||
{:keys [address name customization-color ens ens?]}
|
||||
(rf/sub [:wallet/saved-address])
|
||||
(let [{:keys [address name customization-color ens
|
||||
ens? edit?]} (rf/sub [:get-screen-params])
|
||||
[address-label set-address-label] (rn/use-state (or name ""))
|
||||
[address-color set-address-color] (rn/use-state (or customization-color
|
||||
(rand-nth colors/account-colors)))
|
||||
placeholder (i18n/label :t/address-name)
|
||||
address-text (rn/use-callback
|
||||
(fn []
|
||||
[quo/address-text
|
||||
{:full-address? true
|
||||
:address address
|
||||
:format :long}])
|
||||
[address])
|
||||
on-press-save (rn/use-callback
|
||||
(fn []
|
||||
(rf/dispatch [:wallet/save-address
|
||||
{:on-success
|
||||
(if edit?
|
||||
[:wallet/edit-saved-address-success]
|
||||
[:wallet/add-saved-address-success
|
||||
(i18n/label :t/address-saved)])
|
||||
:on-error
|
||||
[:wallet/add-saved-address-failed]
|
||||
:name address-label
|
||||
:ens (when ens? ens)
|
||||
:address address
|
||||
:customization-color address-color}]))
|
||||
[address address-label
|
||||
address-color])
|
||||
data-item-props (rn/use-memo
|
||||
#(cond-> {:status :default
|
||||
:size :default
|
||||
:subtitle-type :default
|
||||
:label :none
|
||||
:blur? true
|
||||
:card? true
|
||||
:title (i18n/label :t/address)
|
||||
:subtitle ens
|
||||
:custom-subtitle address-text
|
||||
:container-style style/data-item}
|
||||
ens?
|
||||
(dissoc :custom-subtitle))
|
||||
[ens ens? address-text])]
|
||||
placeholder (i18n/label :t/address-name)
|
||||
address-text (rn/use-callback
|
||||
(fn []
|
||||
[quo/address-text
|
||||
{:full-address? true
|
||||
:address address
|
||||
:format :long}])
|
||||
[address])
|
||||
on-press-save (rn/use-callback
|
||||
(fn []
|
||||
(rf/dispatch [:wallet/save-address
|
||||
{:on-success
|
||||
(if edit?
|
||||
[:wallet/edit-saved-address-success]
|
||||
[:wallet/add-saved-address-success
|
||||
(i18n/label :t/address-saved)])
|
||||
:on-error
|
||||
[:wallet/add-saved-address-failed]
|
||||
:name address-label
|
||||
:ens (when ens? ens)
|
||||
:address address
|
||||
:customization-color address-color}]))
|
||||
[address address-label
|
||||
address-color])
|
||||
data-item-props (rn/use-memo
|
||||
#(cond-> {:status :default
|
||||
:size :default
|
||||
:subtitle-type :default
|
||||
:blur? true
|
||||
:card? true
|
||||
:title (i18n/label :t/address)
|
||||
:subtitle ens
|
||||
:custom-subtitle address-text
|
||||
:container-style style/data-item}
|
||||
ens?
|
||||
(dissoc :custom-subtitle))
|
||||
[ens ens? address-text])]
|
||||
[quo/overlay {:type :shell}
|
||||
[floating-button-page/view
|
||||
{:footer-container-padding (if edit? (+ (safe-area/get-bottom) 12) 0)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
(defn view
|
||||
[{:keys [name address customization-color] :as opts}]
|
||||
[{:keys [name address customization-color] :as address-details}]
|
||||
(let [open-send-flow (rn/use-callback
|
||||
(fn []
|
||||
(rf/dispatch [:wallet/init-send-flow-for-address
|
||||
@@ -62,19 +62,20 @@
|
||||
{:theme :dark
|
||||
:shell? true
|
||||
:content (fn []
|
||||
[remove-address/view opts])}])
|
||||
[opts])
|
||||
[remove-address/view address-details])}])
|
||||
[address-details])
|
||||
open-show-address-qr (rn/use-callback
|
||||
#(rf/dispatch [:open-modal
|
||||
:screen/settings.share-saved-address opts])
|
||||
[opts])
|
||||
:screen/settings.share-saved-address
|
||||
address-details])
|
||||
[address-details])
|
||||
open-edit-saved-address (rn/use-callback
|
||||
(fn []
|
||||
(rf/dispatch [:wallet/set-address-to-save opts])
|
||||
(rf/dispatch [:open-modal
|
||||
:screen/settings.edit-saved-address
|
||||
{:edit? true}]))
|
||||
[opts])]
|
||||
(merge {:edit? true}
|
||||
address-details)]))
|
||||
[address-details])]
|
||||
[quo/action-drawer
|
||||
[[{:icon :i/arrow-up
|
||||
:label (i18n/label :t/send-to-user {:user name})
|
||||
|
||||
@@ -410,7 +410,17 @@
|
||||
{:db (assoc-in db [:wallet :ui :swap :sign-transactions-callback-fx] callback-fx)}))
|
||||
|
||||
(rf/reg-event-fx
|
||||
:wallet.swap/approve
|
||||
:wallet.swap/review-swap
|
||||
(fn [{:keys [db]}]
|
||||
{:db (-> db
|
||||
(update-in [:wallet :ui :swap] dissoc :transaction-for-signing))
|
||||
:fx [[:dispatch
|
||||
[:navigate-to-within-stack
|
||||
[:screen/wallet.swap-confirmation
|
||||
:screen/wallet.setup-swap]]]]}))
|
||||
|
||||
(rf/reg-event-fx
|
||||
:wallet/prepare-signatures-for-swap-transactions
|
||||
(fn [{:keys [db]}]
|
||||
(let [last-request-uuid (get-in db [:wallet :ui :swap :last-request-uuid])
|
||||
max-slippage (get-in db [:wallet :ui :swap :max-slippage])]
|
||||
@@ -420,23 +430,7 @@
|
||||
:slippage max-slippage}]]
|
||||
[:dispatch
|
||||
[:wallet.swap/set-sign-transactions-callback-fx
|
||||
[:dispatch [:open-modal :screen/wallet.swap-set-spending-cap]]]]]})))
|
||||
|
||||
(rf/reg-event-fx
|
||||
:wallet.swap/review-swap
|
||||
(fn [{:keys [db]}]
|
||||
(let [last-request-uuid (get-in db [:wallet :ui :swap :last-request-uuid])
|
||||
max-slippage (get-in db [:wallet :ui :swap :max-slippage])]
|
||||
{:db (-> db
|
||||
(update-in [:wallet :ui :swap] dissoc :transaction-for-signing))
|
||||
:fx [[:dispatch
|
||||
[:wallet/build-transactions-from-route
|
||||
{:request-uuid last-request-uuid
|
||||
:slippage max-slippage}]]
|
||||
[:dispatch
|
||||
[:navigate-to-within-stack
|
||||
[:screen/wallet.swap-confirmation
|
||||
:screen/wallet.setup-swap]]]]})))
|
||||
[:dispatch [:wallet/prepare-signatures-for-transactions :swap]]]]]})))
|
||||
|
||||
(defn transaction-approval-required?
|
||||
[transactions {:keys [swap-proposal approval-transaction-id]}]
|
||||
|
||||
@@ -231,7 +231,7 @@
|
||||
(biometric/get-icon-by-type biometric-type)
|
||||
:password)
|
||||
:disabled? (or loading-swap-proposal? (not swap-proposal))
|
||||
:on-complete #(rf/dispatch [:wallet/prepare-signatures-for-transactions :swap])}]))
|
||||
:on-complete #(rf/dispatch [:wallet/prepare-signatures-for-swap-transactions])}]))
|
||||
|
||||
(defn- footer
|
||||
[]
|
||||
|
||||
@@ -169,6 +169,12 @@
|
||||
(fn []
|
||||
(request-fetch-swap-proposal))
|
||||
[pay-input-amount])
|
||||
(rn/use-effect
|
||||
(fn []
|
||||
;; Restart swap proposal fetch after approval confirmation, as route building was paused.
|
||||
(when (and approval-required (= approval-transaction-status :confirmed))
|
||||
(request-fetch-swap-proposal)))
|
||||
[approval-required approval-transaction-status])
|
||||
(rn/use-effect
|
||||
(fn []
|
||||
(when-not overlay-shown?
|
||||
@@ -374,8 +380,6 @@
|
||||
[]
|
||||
(let [[pay-input-state set-pay-input-state] (rn/use-state controlled-input/init-state)
|
||||
[pay-input-focused? set-pay-input-focused?] (rn/use-state true)
|
||||
refetch-interval (rn/use-ref-atom nil)
|
||||
error-response (rf/sub [:wallet/swap-error-response])
|
||||
loading-swap-proposal? (rf/sub [:wallet/swap-loading-swap-proposal?])
|
||||
swap-proposal (rf/sub [:wallet/swap-proposal-without-fees])
|
||||
asset-to-pay (rf/sub [:wallet/swap-asset-to-pay])
|
||||
@@ -433,71 +437,26 @@
|
||||
(controlled-input/set-input-value
|
||||
input-state
|
||||
max-value)))))
|
||||
on-refresh-swap-proposal (rn/use-callback
|
||||
(fn []
|
||||
(let
|
||||
[bottom-sheets (rf/sub
|
||||
[:bottom-sheet-sheets])
|
||||
approval-transaction-status
|
||||
(rf/sub
|
||||
[:wallet/swap-approval-transaction-status])]
|
||||
(when-not valid-pay-input?
|
||||
(when @refetch-interval
|
||||
(js/clearTimeout @refetch-interval))
|
||||
(reset! refetch-interval nil))
|
||||
(when @refetch-interval
|
||||
(js/clearTimeout @refetch-interval))
|
||||
(reset! refetch-interval nil)
|
||||
(when (and valid-pay-input?
|
||||
(not loading-swap-proposal?)
|
||||
(not bottom-sheets)
|
||||
(not= approval-transaction-status
|
||||
:pending))
|
||||
(fetch-swap-proposal
|
||||
{:amount pay-input-amount
|
||||
:valid-input? valid-pay-input?
|
||||
:clean-approval-transaction? false}))))
|
||||
[valid-pay-input? loading-swap-proposal?
|
||||
pay-input-amount])
|
||||
refetch-swap-proposal (fn []
|
||||
(when valid-pay-input?
|
||||
(fetch-swap-proposal
|
||||
{:amount pay-input-amount
|
||||
:valid-input? valid-pay-input?
|
||||
:clean-approval-transaction? true})))]
|
||||
(rn/use-effect (fn []
|
||||
(when @refetch-interval
|
||||
(js/clearInterval @refetch-interval)
|
||||
(reset! refetch-interval nil))
|
||||
(when (or swap-proposal error-response)
|
||||
(reset! refetch-interval
|
||||
(js/setInterval
|
||||
on-refresh-swap-proposal
|
||||
constants/swap-proposal-refresh-interval-ms))))
|
||||
[swap-proposal error-response])
|
||||
(rn/use-effect (fn []
|
||||
(rf/dispatch [:wallet/clean-swap-proposal
|
||||
{:clean-amounts? false
|
||||
:clean-approval-transaction? true}])
|
||||
(when @refetch-interval
|
||||
(js/clearInterval @refetch-interval)
|
||||
(reset! refetch-interval nil))
|
||||
(refetch-swap-proposal))
|
||||
[current-account-address])
|
||||
(rn/use-unmount (fn []
|
||||
(rf/dispatch [:wallet/clean-swap-proposal
|
||||
{:clean-amounts? true
|
||||
:clean-approval-transaction? true}])
|
||||
(when @refetch-interval
|
||||
(js/clearInterval @refetch-interval)
|
||||
(reset! refetch-interval nil))))
|
||||
:clean-approval-transaction? true}])))
|
||||
(rn/use-effect
|
||||
(fn []
|
||||
(when asset-to-pay
|
||||
(let [swap-amount (rf/sub [:wallet/swap-amount])]
|
||||
(when (and swap-amount refetch-interval)
|
||||
(js/clearTimeout @refetch-interval)
|
||||
(reset! refetch-interval nil))
|
||||
(cond (and swap-amount (not= swap-amount pay-input-amount))
|
||||
(set-pay-input-state
|
||||
(fn [input-state]
|
||||
@@ -528,15 +487,12 @@
|
||||
:on-max-press on-max-press
|
||||
:input-focused? pay-input-focused?
|
||||
:on-token-press #(rf/dispatch [:show-bottom-sheet {:content pay-token-bottom-sheet}])
|
||||
:on-approve-press #(rf/dispatch [:wallet.swap/approve])
|
||||
:on-approve-press #(rf/dispatch [:open-modal :screen/wallet.swap-set-spending-cap])
|
||||
:on-input-focus (fn []
|
||||
(when platform/android? (rf/dispatch [:dismiss-keyboard]))
|
||||
(set-pay-input-focused? true))}]
|
||||
[swap-order-button
|
||||
{:on-press (fn []
|
||||
(when @refetch-interval
|
||||
(js/clearTimeout @refetch-interval)
|
||||
(reset! refetch-interval nil))
|
||||
(rf/dispatch [:wallet.swap/flip-assets]))}]
|
||||
[receive-token-input
|
||||
{:input-focused? (not pay-input-focused?)
|
||||
|
||||
@@ -163,13 +163,12 @@
|
||||
|
||||
(defn- slide-button
|
||||
[]
|
||||
(let [loading-swap-proposal? (rf/sub [:wallet/swap-loading-swap-proposal?])
|
||||
transaction-for-signing (rf/sub [:wallet/swap-transaction-for-signing])
|
||||
swap-proposal (rf/sub [:wallet/swap-proposal-without-fees])
|
||||
account (rf/sub [:wallet/current-viewing-account])
|
||||
biometric-auth? (= (rf/sub [:auth-method]) constants/auth-method-biometric)
|
||||
biometric-type (rf/sub [:biometrics/supported-type])
|
||||
account-color (:color account)]
|
||||
(let [loading-swap-proposal? (rf/sub [:wallet/swap-loading-swap-proposal?])
|
||||
swap-proposal (rf/sub [:wallet/swap-proposal-without-fees])
|
||||
account (rf/sub [:wallet/current-viewing-account])
|
||||
biometric-auth? (= (rf/sub [:auth-method]) constants/auth-method-biometric)
|
||||
biometric-type (rf/sub [:biometrics/supported-type])
|
||||
account-color (:color account)]
|
||||
[quo/slide-button
|
||||
{:size :size-48
|
||||
:track-text (i18n/label :t/slide-to-swap)
|
||||
@@ -179,9 +178,8 @@
|
||||
(biometric/get-icon-by-type biometric-type)
|
||||
:password)
|
||||
:disabled? (or loading-swap-proposal?
|
||||
(not swap-proposal)
|
||||
(not transaction-for-signing))
|
||||
:on-complete #(rf/dispatch [:wallet/prepare-signatures-for-transactions :swap])}]))
|
||||
(not swap-proposal))
|
||||
:on-complete #(rf/dispatch [:wallet/prepare-signatures-for-swap-transactions])}]))
|
||||
|
||||
(defn footer
|
||||
[]
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
(:require
|
||||
status-im.common.alert-banner.events
|
||||
status-im.common.alert.effects
|
||||
status-im.common.app-monitoring.events
|
||||
status-im.common.async-storage.effects
|
||||
status-im.common.emoji-picker.events
|
||||
status-im.common.font.events
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
(def ^:private initial-flags
|
||||
{::community.edit-account-selection (enabled-in-env? :FLAG_EDIT_ACCOUNT_SELECTION_ENABLED)
|
||||
::community.view-token-requirements (enabled-in-env? :FLAG_VIEW_TOKEN_REQUIREMENTS)
|
||||
::app-monitoring.intentional-crash (enabled-in-env? :FLAG_INTENTIONAL_CRASH_ENABLED)
|
||||
|
||||
;; Feature toggled (off by default) because the desktop app disabled this
|
||||
;; feature and we want both clients in sync. We keep the code because it
|
||||
|
||||
@@ -123,12 +123,9 @@
|
||||
|
||||
(def status
|
||||
(clj->js
|
||||
{:getNodeConfig
|
||||
(fn [] (types/clj->json {:WakuV2Config ""}))
|
||||
:addCentralizedMetric
|
||||
(fn [_ callback]
|
||||
(callback))
|
||||
:fleets
|
||||
(fn [] (.fleets native-status))
|
||||
:startLocalNotifications
|
||||
identity}))
|
||||
{:intendedPanic identity
|
||||
:getNodeConfig (fn [] (types/clj->json {:WakuV2Config ""}))
|
||||
:addCentralizedMetric (fn [_ callback]
|
||||
(callback))
|
||||
:fleets (fn [] (.fleets native-status))
|
||||
:startLocalNotifications identity}))
|
||||
|
||||
@@ -796,7 +796,7 @@
|
||||
"device-syncing": "Device syncing",
|
||||
"devices": "Devices",
|
||||
"devices-count": "{{number}} devices",
|
||||
"different-keycard": "It’s a different Keycard",
|
||||
"different-keycard": "This is a different Keycard",
|
||||
"disable": "disable",
|
||||
"disable-all": "Disable all",
|
||||
"disable-later-in-settings": "You can disable this later in Settings",
|
||||
@@ -1468,6 +1468,7 @@
|
||||
"keycard-success-title": "Success",
|
||||
"keycard-unauthorized-operation": "You're unauthorized to perform this operation.\n Please tap valid card and try again.",
|
||||
"keycard-unblocked": "Keycard unblocked",
|
||||
"keycard-unblocked-description": "You’ll need this Keycard to login to Status and transact with derived accounts.",
|
||||
"keycard-upsell-subtitle": "Enhanced security and convenience",
|
||||
"keypair-name": "Key pair name",
|
||||
"keypair-name-description": "Name key pair for your own personal reference",
|
||||
|
||||