Compare commits

..
105 changed files with 311 additions and 478 deletions
-2
View File
@@ -36,5 +36,3 @@ 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
-2
View File
@@ -40,5 +40,3 @@ 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
-2
View File
@@ -37,5 +37,3 @@ TEST_NETWORKS_ENABLED=1
ENABLE_ALERT_BANNER=1
FLAG_WALLET_CONNECT_ENABLED=1
API_LOGGING_ENABLED=1
SENTRY_ENABLED=0
SENTRY_ENVIRONMENT=ci-main
-2
View File
@@ -24,5 +24,3 @@ TEST_NETWORKS_ENABLED=0
ENABLE_ALERT_BANNER=1
FLAG_WALLET_CONNECT_ENABLED=1
API_LOGGING_ENABLED=1
SENTRY_ENABLED=1
SENTRY_ENVIRONMENT=ci-nightly
+1 -3
View File
@@ -2,7 +2,7 @@ DEBUG_WEBVIEW=0
ETHEREUM_DEV_CLUSTER=0
EXTENSIONS=0
GROUP_CHATS_ENABLED=1
LOG_LEVEL=error
LOG_LEVEL=
MAILSERVER_CONFIRMATIONS_ENABLED=1
MAINNET_WARNING_ENABLED=1
PFS_ENCRYPTION_ENABLED=1
@@ -21,5 +21,3 @@ TEST_NETWORKS_ENABLED=0
STATUS_PROXY_STAGE_NAME=prod
FLAG_WALLET_CONNECT_ENABLED=1
API_LOGGING_ENABLED=0
SENTRY_ENABLED=1
SENTRY_ENVIRONMENT=production
+2
View File
@@ -279,6 +279,8 @@ run-android: export TARGET := android
# https://github.com/status-im/status-mobile/issues/18493
run-android: export ORG_GRADLE_PROJECT_hermesEnabled := false
run-android: export ORG_GRADLE_PROJECT_universalApk := false
# enabling new architecture requires hermes to be enabled
run-android: export ORG_GRADLE_PROJECT_newArchEnabled := false
run-android: ##@run Build Android APK and start it on the device
@scripts/run-android.sh
+1
View File
@@ -53,6 +53,7 @@ commitHash=unknown
# your application. You should enable this flag either if you want
# to write custom TurboModules/Fabric components OR use libraries that
# are providing them.
# enabling new architecture requires hermes to be enabled
newArchEnabled=false
# Use this property to enable or disable the Hermes JS engine.
-1
View File
@@ -41,7 +41,6 @@ pipeline {
BUILD_ENV = 'prod'
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
FASTLANE_DISABLE_COLORS = 1
SENTRY_PRODUCTION = "${utils.isReleaseBuild() ? 'true' : 'false'}"
}
stages {
+1
View File
@@ -134,3 +134,4 @@ def updateBucketJSON(urls, fileName) {
writeFile(file: filePath, text: contentJson)
return s5cmd.upload(filePath)
}
-1
View File
@@ -41,7 +41,6 @@ pipeline {
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
FASTLANE_DISABLE_COLORS = 1
BUNDLE_PATH = "${HOME}/.bundle"
SENTRY_PRODUCTION = "${utils.isReleaseBuild() ? 'true' : 'false'}"
}
stages {
+3 -12
View File
@@ -109,19 +109,10 @@ pipeline {
stage('Upload') {
steps { script {
sshagent(credentials: ['nix-cache-ssh']) {
nix.shell(
"""
nix.shell("""
find /nix/store/ -mindepth 1 -maxdepth 1 -type d \
-not -name "*.links" -and -not -name "*-status-mobile-*" \
-and -not -name "tmp-*" \
-print0 | xargs -0 nix-store -qR | sort -u > "${WORKSPACE_TMP}"/store-paths.txt
""",
pure: false
)
nix.shell(
"""
nix-store --export < "${WORKSPACE_TMP}"/store-paths.txt | \\
ssh ${env.NIX_SSHOPTS} ${params.NIX_CACHE_USER}@${params.NIX_CACHE_HOST} ${env.NIX_STORE_CMD} --import
-not -name '*.links' -and -not -name '*-status-mobile-*' \
| xargs nix copy --to ${NIX_SSH_REMOTE}
""",
pure: false
)
@@ -108,15 +108,6 @@ 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,17 +109,6 @@ 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:@""
+5 -1
View File
@@ -15,6 +15,8 @@
# Disabled for debug builds to avoid 'maximum call stack exceeded' errors.
# https://github.com/status-im/status-mobile/issues/18493
hermesEnabled ? lib.getEnvWithDefault "ORG_GRADLE_PROJECT_hermesEnabled" "true",
# enabling new architecture requires hermes to be enabled
newArchEnabled ? lib.getEnvWithDefault "ORG_GRADLE_PROJECT_newArchEnabled" "true",
buildUrl ? lib.getEnvWithDefault "ORG_GRADLE_PROJECT_buildUrl" null,
statusGoSrcOverride ? lib.getEnvWithDefault "STATUS_GO_SRC_OVERRIDE" null,
reactMetroPort ? lib.getEnvWithDefault "RCT_METRO_PORT" 8081,
@@ -71,7 +73,7 @@ in stdenv.mkDerivation rec {
};
};
buildInputs = with pkgs; [ nodejs openjdk_headless ];
buildInputs = with pkgs; [ nodejs openjdk ];
nativeBuildInputs = with pkgs; [ bash gradle unzip ]
++ lib.optionals stdenv.isDarwin [ file gnumake ];
@@ -91,6 +93,8 @@ in stdenv.mkDerivation rec {
ORG_GRADLE_PROJECT_buildUrl = buildUrl;
ORG_GRADLE_PROJECT_hermesEnabled = hermesEnabled;
ORG_GRADLE_PROJECT_universalApk = universalApk;
# enabling new architecture requires hermes to be enabled
ORG_GRADLE_PROJECT_newArchEnabled = newArchEnabled;
# Fix for ERR_OSSL_EVP_UNSUPPORTED error.
NODE_OPTIONS = "--openssl-legacy-provider";
+1 -1
View File
@@ -8,7 +8,7 @@ rec {
shell = mkShell {
buildInputs = with pkgs; [
openjdk_headless
openjdk
gradle
lsof # used in start-react-native.sh
flock # used in nix/scripts/node_modules.sh
+1 -1
View File
@@ -38,7 +38,7 @@ stdenv.mkDerivation {
];
};
};
buildInputs = with pkgs; [ clojure nodejs bash git openjdk_headless ];
buildInputs = with pkgs; [ clojure nodejs bash git openjdk];
phases = [
"unpackPhase" "secretsPhase" "patchPhase"
"configurePhase" "buildPhase" "installPhase"
+1 -1
View File
@@ -49,7 +49,7 @@ in {
nodejs = super.nodejs_20;
ruby = super.ruby_3_1;
yarn = super.yarn.override { nodejs = super.nodejs_20; };
openjdk_headless = super.openjdk17_headless;
openjdk = super.openjdk17_headless;
xcodeWrapper = callPackage ./pkgs/xcodeenv/compose-xcodewrapper.nix { } {
versions = ["16.0" "16.1" "16.2"];
};
+2 -2
View File
@@ -1,8 +1,8 @@
{ mkShell, openjdk_headless, androidPkgs }:
{ mkShell, openjdk, androidPkgs }:
mkShell {
name = "android-sdk-shell";
buildInputs = [ openjdk_headless ];
buildInputs = [ openjdk ];
shellHook = ''
export ANDROID_HOME="${androidPkgs.sdk}"
+2 -2
View File
@@ -19,7 +19,7 @@ let
# for calling clojure targets in CI or Makefile
clojure = mkShell {
buildInputs = with pkgs; [
clojure flock maven openjdk_headless
clojure flock maven openjdk
# lint specific utilities
babashka clj-kondo clojure-lsp ripgrep zprint
];
@@ -61,7 +61,7 @@ let
# for 'scripts/generate-keystore.sh'
keytool = mkShell {
buildInputs = with pkgs; [ openjdk_headless apksigner ];
buildInputs = with pkgs; [ openjdk apksigner ];
};
# for targets needing 'adb', 'apkanalyzer' and other SDK/NDK tools
+2 -6
View File
@@ -1,5 +1,5 @@
{ callPackage, lib, buildGoPackage, pkgs
, androidPkgs, openjdk_headless, gomobile, xcodeWrapper, removeReferencesTo
, androidPkgs, openjdk, gomobile, xcodeWrapper, removeReferencesTo
, go-bindata, mockgen, protobuf3_20, protoc-gen-go
, meta
, source
@@ -32,7 +32,7 @@ in buildGoPackage rec {
extraSrcPaths = [ gomobile ];
nativeBuildInputs = [
gomobile removeReferencesTo go-bindata mockgen protoc-gen-go protobuf3_20 fakeGit
] ++ optional isAndroid openjdk_headless
] ++ optional isAndroid openjdk
++ optional isIOS xcodeWrapper;
ldflags = goBuildLdFlags;
@@ -48,10 +48,6 @@ 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
+6
View File
@@ -1,4 +1,10 @@
module.exports = {
project: {
android: {
// https://github.com/reactwg/react-native-new-architecture/discussions/135
unstable_reactLegacyComponentNames: ['BVLinearGradient', 'CKCameraManager', 'FastImageView'],
},
},
dependencies: {
'react-native-config': {
platforms: {
Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 300 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 312 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 276 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 327 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 229 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 237 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 428 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 235 KiB

After

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 441 KiB

After

Width:  |  Height:  |  Size: 345 KiB

-1
View File
@@ -47,7 +47,6 @@ SECRETS_ENV_VARS=(
'MIXPANEL_APP_ID'
'MIXPANEL_APP_TOKEN'
'POKT_TOKEN'
'SENTRY_DSN_STATUS_GO'
)
# Secrets like this can't be passed via args or they end up in derivation.
-6
View File
@@ -77,11 +77,6 @@
#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_APP_TOKEN #shadow/env "MIXPANEL_APP_TOKEN"
status-im.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"
@@ -124,7 +119,6 @@
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_APP_TOKEN #shadow/env "MIXPANEL_APP_TOKEN"
+6 -28
View File
@@ -2,41 +2,19 @@
(:require
[legacy.status-im.multiaccounts.update.core :as multiaccounts.update]
[re-frame.core :as re-frame]
[taoensso.timbre :as log]
[utils.i18n :as i18n]
[utils.re-frame :as rf]))
(rf/defn save-log-level
{:events [:log-level.ui/change-log-level-confirmed]}
[{:keys [db]} log-level]
[{:keys [db] :as cofx} log-level]
(let [old-log-level (get-in db [:profile/profile :log-level])]
(when (not= old-log-level log-level)
(let [need-set-log-enabled? (or (empty? old-log-level) (empty? log-level))
log-enabled? (boolean (seq log-level))
rpc-calls (cond-> []
log-enabled?
(conj {:method "wakuext_setLogLevel"
:params [{:logLevel log-level}]
:on-error #(log/error "Failed to set log level" %)})
need-set-log-enabled?
(conj {:method "wakuext_setLogEnabled"
:params [log-enabled?]
:on-error #(log/error "Failed to set log enabled" %)}))]
{:fx [[:json-rpc/call
(conj (vec (map #(assoc % :on-success nil) (butlast rpc-calls)))
(assoc (last rpc-calls)
:on-success
#(rf/dispatch [:log-level/update-multiaccount log-level])))]]}))))
(rf/defn update-multiaccount
{:events [:log-level/update-multiaccount]}
[cofx log-level]
(multiaccounts.update/multiaccount-update
cofx
:log-level
log-level
{:on-success #(rf/dispatch [:profile/logout])}))
(multiaccounts.update/multiaccount-update
cofx
:log-level
log-level
{:on-success #(re-frame/dispatch [:profile/logout])}))))
(rf/defn show-change-log-level-confirmation
{:events [:log-level.ui/log-level-selected]}
@@ -1,13 +1,10 @@
(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]))
@@ -20,16 +17,7 @@
peer-syncing-enabled?]}]
(keep
identity
[(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
[{:size :small
:title (i18n/label :t/log-level)
:accessibility-label :log-level-settings-button
:on-press
@@ -33,9 +33,6 @@
name]]]]))
(def log-levels
"The status-go log library (zap) doesn't support the trace level, so we remove
the trace option from the UI. When trace is enabled an error will happen while
trying to login (user will see the error 'wrong password')."
[{:name "DISABLED"
:value ""}
{:name "ERROR"
@@ -45,7 +42,9 @@
{:name "INFO"
:value "INFO"}
{:name "DEBUG"
:value "DEBUG"}])
:value "DEBUG"}
{:name "TRACE"
:value "TRACE"}])
(views/defview log-level-settings
[]
-4
View File
@@ -569,7 +569,3 @@
(.createAccountFromPrivateKey ^js (account-manager)
(types/clj->json {:privateKey private-key})
callback)))
(defn intended-panic
[message]
(.intendedPanic ^js (status) message))
@@ -43,7 +43,8 @@
[]
[{:x 20
:y 108
:width (- width 40)
;; https://github.com/status-im/status-mobile/pull/20950#issuecomment-2351505926
:width (- (int width) 40)
:height 50
:borderRadius 16}])}
[rn/view
+1 -1
View File
@@ -27,7 +27,7 @@
[rn/view {:on-layout on-layout}
[hole-view/hole-view
{:holes (if options
[{:x (- container-width
[{:x (- (int container-width)
(case size
:size-24 10
:size-32 12
@@ -36,7 +36,7 @@
{:holes [{:x 0
:y 0
:height style/top-hole-view-height
:width container-width
:width (int container-width)
:borderBottomStartRadius 16
:borderBottomEndRadius 16}]
:style {:margin-top (- style/top-hole-view-height)}
@@ -14,43 +14,48 @@
(h/describe "Wallet: Summary Info"
(h/test "Type of `status-account` title renders"
(h/render-with-theme-provider [summary-info/view
{:type :status-account
:networks-to-show {:ethereum 150
:optimism 50
:arbitrum 25}
:account-props status-account-props}])
{:type :status-account
:networks? true
:values {:ethereum 150
:optimism 50
:arbitrum 25}
:account-props status-account-props}])
(h/is-truthy (h/get-by-text "Collectibles vault")))
(h/test "Type of `user` title renders"
(h/render-with-theme-provider [summary-info/view
{:type :user
:networks-to-show {:ethereum 150
:optimism 50
:arbitrum 25}
:account-props {:full-name "M L"
:status-indicator? false
:size :small
:customization-color :blue
:name "Mark Libot"
:address "0x0ah...78b"
:status-account (merge status-account-props
{:size 16})}}])
{:type :user
:networks? true
:values {:ethereum 150
:optimism 50
:arbitrum 25}
:account-props {:full-name "M L"
:status-indicator? false
:size :small
:customization-color :blue
:name "Mark Libot"
:address "0x0ah...78b"
:status-account (merge status-account-props
{:size 16})}}])
(h/is-truthy (h/get-by-text "Mark Libot"))
(h/is-truthy (h/get-by-text "Collectibles vault")))
(h/test "Networks specified render"
(h/test "Networks true render"
(h/render-with-theme-provider [summary-info/view
{:type :status-account
:networks-to-show {:ethereum 150
:optimism 50
:arbitrum 25}
:account-props status-account-props}])
(h/is-truthy (h/get-by-label-text :networks))))
{:type :status-account
:networks? true
:values {:ethereum 150
:optimism 50
:arbitrum 25}
:account-props status-account-props}])
(h/is-truthy (h/get-by-label-text :networks)))
(h/describe "Wallet: network summary info"
(h/test "Type of `network` title renders"
(h/test "Networks false render"
(h/render-with-theme-provider [summary-info/view
{:type :network
:network-props {:full-name "Ethereum"
:network-name :ethereum}}])
(h/is-truthy (h/get-by-text "Ethereum"))))
{:type :status-account
:networks? false
:values {:ethereum 150
:optimism 50
:arbitrum 25}
:account-props status-account-props}])
(h/is-null (h/query-by-label-text :networks))))
@@ -5,9 +5,9 @@
[:catn
[:props
[:map
[:type [:enum :status-account :saved-account :account :user :token :network]]
[:type [:enum :status-account :saved-account :account :user :token]]
[:account-props {:optional true} [:maybe :map]]
[:network-props {:optional true} [:maybe :map]]
[:token-props {:optional true} [:maybe :map]]
[:networks-to-show {:optional true} [:maybe :map]]]]]
[:networks? {:optional true} [:maybe :boolean]]
[:values {:optional true} [:maybe :map]]]]]
:any])
@@ -3,13 +3,13 @@
[quo.foundations.colors :as colors]))
(defn container
[networks-to-show? theme]
[networks? theme]
{:width "100%"
:height (if networks-to-show? 90 56)
:height (if networks? 90 56)
:border-radius 16
:border-width 1
:border-color (colors/theme-colors colors/neutral-10 colors/neutral-80 theme)
:margin-bottom (if networks-to-show? 4 8)})
:margin-bottom (if networks? 4 8)})
(def info-container
{:flex-direction :row
@@ -39,7 +39,3 @@
:height 32
:flex-direction :row
:align-items :center})
(def network-icon
{:width 32
:height 32})
@@ -28,35 +28,50 @@
[rn/view
{:style (style/dot-divider theme)}])])
(def ^:private default-token-symbols
{:ethereum "ETH"
:optimism "OP"
:arbitrum "ARB"
:base "ETH"})
(defn networks
[networks-to-show theme]
(->> networks-to-show
(map-indexed
(fn [i [k {:keys [amount token-symbol]}]]
(when (or (pos? amount)
(= amount "<0.01"))
[network-amount
{:network k
:amount (str amount " " (or token-symbol (get default-token-symbols k)))
:divider? (not= (dec i) (-> networks-to-show keys count))
:theme theme}])))
(remove nil?)
(into [rn/view
{:style style/networks-container
:accessibility-label :networks}])))
[values theme]
(let [{:keys [ethereum optimism arbitrum base]} values
show-optimism? (and optimism
(or (pos? (:amount optimism))
(= (:amount optimism) "<0.01")))
show-arbitrum? (and arbitrum
(or (pos? (:amount arbitrum))
(= (:amount arbitrum) "<0.01")))
show-base? (and base
(or (pos? (:amount base))
(= (:amount base) "<0.01")))]
[rn/view
{:style style/networks-container
:accessibility-label :networks}
(when (and ethereum (pos? (:amount ethereum)))
[network-amount
{:network :ethereum
:amount (str (:amount ethereum) " " (or (:token-symbol ethereum) "ETH"))
:divider? (or show-arbitrum? show-optimism?)
:theme theme}])
(when show-optimism?
[network-amount
{:network :optimism
:amount (str (:amount optimism) " " (or (:token-symbol optimism) "OETH"))
:divider? show-arbitrum?
:theme theme}])
(when show-arbitrum?
[network-amount
{:network :arbitrum
:amount (str (:amount arbitrum) " " (or (:token-symbol arbitrum) "ARB"))
:theme theme}])
(when show-base?
[network-amount
{:network :base
:amount (str (:amount base) " " (or (:token-symbol base) "ETH"))
:theme theme}])]))
(defn- view-internal
[{:keys [type account-props network-props token-props networks-to-show]}]
[{:keys [type account-props token-props networks? values]}]
(let [theme (quo.theme/use-theme)
address (or (:address account-props) (:address token-props))]
[rn/view
{:style (style/container (seq? networks-to-show) theme)}
{:style (style/container networks? theme)}
[rn/view
{:style style/info-container}
(case type
@@ -67,26 +82,16 @@
(assoc account-props
:size :size-32
:neutral? true)]
:network [rn/image
{:source (resources/get-network (:network-name network-props))
:style style/network-icon}]
[user-avatar/user-avatar account-props])
[rn/view {:style {:margin-left 8}}
(when (not (some #{type} [:account :network]))
[text/text
{:weight :semi-bold}
(or (:name account-props) (:label token-props))])
(when (= type :network)
[text/text
{:weight :semi-bold}
(:full-name network-props)])
(when (not= type :account)
[text/text {:weight :semi-bold} (or (:name account-props) (:label token-props))])
[rn/view
{:style {:flex-direction :row
:align-items :center}}
(when (= type :user)
[:<>
[rn/view {:style {:margin-right 4}}
[account-avatar/view (:status-account account-props)]]
[rn/view {:style {:margin-right 4}} [account-avatar/view (:status-account account-props)]]
[text/text
{:size :paragraph-2
:style {:color (colors/theme-colors colors/neutral-50 colors/neutral-40 theme)}}
@@ -100,10 +105,10 @@
:style {:color (when (not= type :account)
(colors/theme-colors colors/neutral-50 colors/neutral-40 theme))}}
address])]]]
(when networks-to-show
(when networks?
[:<>
[rn/view
{:style (style/line-divider theme)}]
[networks networks-to-show theme]])]))
[networks values theme]])]))
(def view (schema/instrument #'view-internal summary-info-schema/?schema))
+22 -19
View File
@@ -10,29 +10,32 @@
(defn alpha
[value opacity]
(when value
(if (string/starts-with? value "#")
(let [hex (string/replace value #"#" "")
r (js/parseInt (subs hex 0 2) 16)
g (js/parseInt (subs hex 2 4) 16)
b (js/parseInt (subs hex 4 6) 16)]
(str "rgba(" r "," g "," b "," opacity ")"))
(let [rgb (string/split value #",")]
(str (string/join "," (butlast rgb)) "," opacity ")")))))
;; https://github.com/status-im/status-mobile/pull/20950#issuecomment-2328228947
(let [opacity (if (zero? opacity) 0.002 opacity)]
(if (string/starts-with? value "#")
(let [hex (string/replace value #"#" "")
r (js/parseInt (subs hex 0 2) 16)
g (js/parseInt (subs hex 2 4) 16)
b (js/parseInt (subs hex 4 6) 16)]
(str "rgba(" r "," g "," b "," opacity ")"))
(let [rgb (string/split value #",")]
(str (string/join "," (butlast rgb)) "," opacity ")"))))))
(defn- alpha-opaque
[value opacity]
(when value
(if (string/starts-with? value "#")
(let [hex (string/replace value #"#" "")
r (- 255 (* opacity (- 255 (js/parseInt (subs hex 0 2) 16))))
g (- 255 (* opacity (- 255 (js/parseInt (subs hex 2 4) 16))))
b (- 255 (* opacity (- 255 (js/parseInt (subs hex 4 6) 16))))]
(str "rgb(" r "," g "," b ")"))
(let [rgb (string/split value #",")
r (- 255 (* opacity (- 255 (get rgb 0))))
g (- 255 (* opacity (- 255 (get rgb 1))))
b (- 255 (* opacity (- 255 (get rgb 2))))]
(str "rgb(" r "," g "," b ")")))))
(let [opacity (if (zero? opacity) 0.002 opacity)]
(if (string/starts-with? value "#")
(let [hex (string/replace value #"#" "")
r (- 255 (* opacity (- 255 (js/parseInt (subs hex 0 2) 16))))
g (- 255 (* opacity (- 255 (js/parseInt (subs hex 2 4) 16))))
b (- 255 (* opacity (- 255 (js/parseInt (subs hex 4 6) 16))))]
(str "rgb(" r "," g "," b ")"))
(let [rgb (string/split value #",")
r (- 255 (* opacity (- 255 (get rgb 0))))
g (- 255 (* opacity (- 255 (get rgb 1))))
b (- 255 (* opacity (- 255 (get rgb 2))))]
(str "rgb(" r "," g "," b ")"))))))
(def theme-alpha
(memoize
+2 -2
View File
@@ -29,7 +29,7 @@
[]
[{:x 0
:y constants/alert-banner-height
:width (:width (rn/get-window))
:width (int (:width (rn/get-window)))
:height constants/alert-banner-height
:borderRadius style/border-radius}])}
[quo/text
@@ -54,7 +54,7 @@
{:style {:padding-bottom 0.5}
:holes [{:x 0
:y (+ safe-area-top (* constants/alert-banner-height banners-count))
:width (:width (rn/get-window))
:width (int (:width (rn/get-window)))
:height constants/alert-banner-height
:borderRadius style/border-radius}]}
[rn/view {:style {:background-color colors/neutral-100}}
@@ -1,8 +0,0 @@
(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)))
@@ -1,8 +0,0 @@
(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]]}))
-10
View File
@@ -26,19 +26,9 @@
: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")
-5
View File
@@ -144,8 +144,3 @@
(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)
+1 -2
View File
@@ -275,8 +275,7 @@
{:events [:chat/unmute-chat-community]}
[{:keys [db]} chat-id]
(let [{:keys [community-id]} (get-in db [:chats chat-id])]
(when community-id
{:db (assoc-in db [:communities community-id :muted] false)})))
{:db (assoc-in db [:communities community-id :muted] false)}))
(rf/defn mute-chat-failed
{:events [:chat/mute-failed]}
+11 -17
View File
@@ -15,10 +15,10 @@
:on-press events-helper/navigate-back}]
[quo/page-top
{:title (i18n/label :t/ready-add-keypair-keycard)}]
[rn/image
{:resize-mode :contain
:style {:flex 1 :width (:width (rn/get-window))}
:source (resources/get-image :keycard-migration)}]
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}}
[rn/image
{:resize-mode :contain
:source (resources/get-image :keycard-migration)}]]
[common.view/tips]
[quo/bottom-actions
{:actions :one-action
@@ -33,11 +33,8 @@
:on-press events-helper/navigate-back}]
[quo/page-top
{:title (i18n/label :t/backup-keycard-created)}]
[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}}
[rn/view {:style {:flex 1}}]
[rn/view {:style {:padding-horizontal 20}}
[quo/button {:on-press events-helper/navigate-back}
(i18n/label :t/done)]]])
@@ -52,10 +49,7 @@
{:title (i18n/label :t/keycard-not-empty)
:description :text
:description-text (i18n/label :t/scan-empty-keycard)}]
[rn/image
{:resize-mode :contain
:style {:flex 1 :width (:width (rn/get-window))}
:source (resources/get-image :keycard-not-empty)}]
[rn/view {:style {:flex 1}}]
[common.view/tips]
[rn/view {:style {:padding-horizontal 20}}
[quo/button {:on-press on-press}
@@ -71,10 +65,10 @@
{:title (i18n/label :t/scan-empty-keycard)
:description :text
:description-text (i18n/label :t/backup-empty-keycard-only)}]
[rn/image
{:resize-mode :contain
:style {:flex 1 :width (:width (rn/get-window))}
:source (resources/get-image :check-your-keycard)}]
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}}
[rn/image
{:resize-mode :contain
:source (resources/get-image :check-your-keycard)}]]
[common.view/tips]
[quo/bottom-actions
{:actions :one-action
@@ -2,7 +2,6 @@
(: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]))
@@ -33,10 +32,9 @@
:on-press events-helper/navigate-back}]
[quo/page-top
{:title (i18n/label :t/ready-to-change-pin)}]
[rn/image
{:resize-mode :contain
:style {:flex 1 :width (:width (rn/get-window))}
:source (resources/get-image :keycard-change-pin)}]
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}}
[rn/image
{:resize-mode :contain}]]
[common.view/tips]
[quo/bottom-actions
{:actions :one-action
@@ -54,10 +52,9 @@
{:title (i18n/label :t/keycard-pin-changed)
:description :text
:description-text (i18n/label :t/keycard-pin-changed-description)}]
[rn/image
{:resize-mode :contain
:style {:flex 1 :width (:width (rn/get-window))}
:source (resources/get-image :keycard-change-pin-positive)}]
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}}
[rn/image
{:resize-mode :contain}]]
[quo/bottom-actions
{:actions :one-action
:button-one-label (i18n/label :t/done)
@@ -73,10 +70,9 @@
{:title (i18n/label :t/keycard-pin-change-failed)
:description :text
:description-text (i18n/label :t/keycard-pin-change-failed-description)}]
[rn/image
{:resize-mode :contain
:style {:flex 1 :width (:width (rn/get-window))}
:source (resources/get-image :keycard-change-pin-negative)}]
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}}
[rn/image
{:resize-mode :contain}]]
[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/image
{:resize-mode :contain
:style {:flex 1 :width (:width (rn/get-window))}
:source (resources/get-image :check-your-keycard)}]
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}}
[rn/image
{:resize-mode :contain
:source (resources/get-image :check-your-keycard)}]]
[common.view/tips]
[quo/bottom-actions
{:actions :one-action
@@ -2,7 +2,6 @@
(: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
@@ -15,11 +14,8 @@
{:title (i18n/label :t/different-keycard)
:description :text
:description-text (i18n/label :t/scan-previous-keycard)}]
[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}}
[rn/view {:style {:flex 1}}]
[rn/view {:style {:padding-horizontal 20}}
[quo/button {:on-press events-helper/navigate-back}
(i18n/label :t/try-again)]]])
+15 -26
View File
@@ -23,7 +23,6 @@
(defn view
[]
(let [error (rf/sub [:keycard/application-info-error])
logged-in? (rf/sub [:multiaccount/logged-in?])
{:keys [title description]} (get titles error)]
[:<>
[quo/page-nav
@@ -38,31 +37,21 @@
[quo/section-label
{:section (i18n/label :t/what-you-can-do) :container-style {:padding-vertical 8}}]
(if (= error :keycard/error.keycard-empty)
(if logged-in?
[quo/settings-item
{:title (i18n/label :t/use-backup-keycard)
:image :icon
:image-props :i/placeholder
:action :arrow
:description :text
:description-props {:text (i18n/label :t/create-backup-profile-keycard)}
:on-press (fn []
(rf/dispatch [:show-bottom-sheet
{:content
(fn []
[backup.view/sheet
{:on-continue
(rf/dispatch
[:keycard/backup.create-or-enter-pin])}])}]))}]
[quo/settings-item
{:title (i18n/label :t/create-new-profile)
:image :icon
:image-props :i/profile
:action :arrow
:description :text
:description-props {:text (i18n/label :t/new-key-pair-keycard)}
:on-press (fn []
(rf/dispatch [:keycard/create.get-phrase]))}])
[quo/settings-item
{:title (i18n/label :t/use-backup-keycard)
:image :icon
:image-props :i/placeholder
:action :arrow
:description :text
:description-props {:text (i18n/label :t/create-backup-profile-keycard)}
:on-press (fn []
(rf/dispatch [:show-bottom-sheet
{:content
(fn []
[backup.view/sheet
{:on-continue
(rf/dispatch
[:keycard/backup.create-or-enter-pin])}])}]))}]
[:<>
(when (or (= error :keycard/error.keycard-frozen)
(= error :keycard/error.keycard-locked))
@@ -2,7 +2,6 @@
(: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]))
@@ -49,11 +48,8 @@
{:title (i18n/label :t/keycard-reset-success)
:description :text
:description-text (i18n/label :t/keycard-empty-ready)}]
[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}}
[rn/view {:style {:flex 1}}]
[rn/view {:style {:padding-horizontal 20}}
[quo/button {:on-press events-helper/navigate-back}
(i18n/label :t/done)]]])
@@ -65,11 +61,8 @@
:on-press events-helper/navigate-back}]
[quo/page-top
{:title (i18n/label :t/keycard-reset-failed)}]
[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}}
[rn/view {:style {:flex 1}}]
[rn/view {:style {:padding-horizontal 20}}
[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/image
{:resize-mode :contain
:style {:flex 1 :width (:width (rn/get-window))}
:source (resources/get-image :keycard-migration-failed)}]
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}}
[rn/image
{:resize-mode :contain
: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/image
{:resize-mode :contain
:style {:flex 1 :width (:width (rn/get-window))}
:source (resources/get-image :keycard-migration)}]]))
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}}
[rn/image
{:resize-mode :contain
: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/image
{:resize-mode :contain
:style {:flex 1 :width (:width (rn/get-window))}
:source (resources/get-image :keycard-migration-succeeded)}]
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}}
[rn/image
{:resize-mode :contain
:source (resources/get-image :keycard-migration-succeeded)}]]
[quo/button
{:on-press #(rf/dispatch [:profile/logout])
:container-style {:margin-horizontal 20 :margin-vertical 12}}
:container-style {:margin-horizontal 20}}
(i18n/label :t/logout)]]))
@@ -23,10 +23,10 @@
:context-tag {:full-name profile-name
:profile-picture profile-picture
:customization-color customization-color}}]
[rn/image
{:resize-mode :contain
:style {:flex 1 :width (:width (rn/get-window))}
:source (resources/get-image :keycard-migration)}]
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}}
[rn/image
{:resize-mode :contain
: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/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}}
[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}}
[quo/button {:on-press events-helper/navigate-back}
(i18n/label :t/try-again)]]])
@@ -2,7 +2,6 @@
(: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]))
@@ -14,14 +13,9 @@
{:icon-name :i/close
:on-press events-helper/navigate-back}]
[quo/page-top
{: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}}
{:title (i18n/label :t/keycard-unblocked)}]
[rn/view {:style {:flex 1}}]
[rn/view {:style {:padding-horizontal 20}}
[quo/button {:on-press events-helper/navigate-back}
(i18n/label :t/done)]]])
@@ -33,10 +27,7 @@
:on-press events-helper/navigate-back}]
[quo/page-top
{:title (i18n/label :t/ready-to-unblock-keycard)}]
[rn/image
{:resize-mode :contain
:style {:flex 1 :width (:width (rn/get-window))}
:source (resources/get-image :keycard-unblock)}]
[rn/view {:style {:flex 1}}]
[common.view/tips]
[quo/bottom-actions
{:actions :one-action
@@ -12,15 +12,17 @@
:options [{:key :status-account}
{:key :user}
{:key :saved-account}
{:key :account}]}])
{:key :account}]}
{:key :networks? :type :boolean}])
(defn view
[]
(let [state (reagent/atom {:type :status-account
:networks-to-show {:ethereum {:amount 150}
:optimism {:amount 50}
:arbitrum {:amount 25}}})
(let [state (reagent/atom {:type :status-account
:networks? true
:values {:ethereum {:amount 150}
:optimism {:amount 50}
:arbitrum {:amount 25}}})
status-account-props {:customization-color :purple
:size 32
:emoji "🍑"
@@ -37,7 +37,6 @@
{: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
@@ -28,7 +28,3 @@
[theme]
{:margin-bottom 8
:color (colors/theme-colors colors/neutral-50 colors/neutral-40 theme)})
(def summary-container
{:padding-horizontal 20
:padding-bottom 16})
@@ -135,7 +135,9 @@
:saved-address :saved-account
:account :status-account
summary-type)]
[rn/view {:style style/summary-container}
[rn/view
{:style {:padding-horizontal 20
:padding-bottom 16}}
[quo/text
{:size :paragraph-2
:weight :medium
@@ -143,32 +145,17 @@
:accessibility-label accessibility-label}
label]
[quo/summary-info
{:type summary-info-type
:networks-to-show (when bridge-tx?
(send-utils/network-values-for-ui network-values))
:account-props (cond-> account-props
(and account-to? (not bridge-tx?))
(assoc
:size 32
:name (:label recipient)
:full-name (:label recipient)
:emoji (:emoji recipient)
:customization-color (:customization-color recipient)))}]]))
(defn- network-summary
[{:keys [theme label accessibility-label]}]
(let [network (rf/sub [:wallet/send-selected-network])]
(when network
[rn/view {:style style/summary-container}
[quo/text
{:size :paragraph-2
:weight :medium
:style (style/section-label theme)
:accessibility-label accessibility-label}
label]
[quo/summary-info
{:type :network
:network-props network}]])))
{:type summary-info-type
:networks? true
:values (send-utils/network-values-for-ui network-values)
:account-props (cond-> account-props
(and account-to? (not bridge-tx?))
(assoc
:size 32
:name (:label recipient)
:full-name (:label recipient)
:emoji (:emoji recipient)
:customization-color (:customization-color recipient)))}]]))
(defn- data-item
[{:keys [title subtitle]}]
@@ -313,7 +300,6 @@
:accessibility-label :summary-from-label
:label (i18n/label :t/from-capitalized)
:account-props from-account-props
:bridge-tx? (= transaction-type :tx/bridge)
:theme theme}]
[user-summary
{:summary-type (if (= transaction-type :tx/bridge)
@@ -327,8 +313,4 @@
:recipient recipient
:bridge-tx? (= transaction-type :tx/bridge)
:account-to? true
:theme theme}]
(when-not (= transaction-type :tx/bridge)
[network-summary
{:label (i18n/label :t/on-capitalized)
:theme theme}])]]]))
:theme theme}]]]]))
@@ -24,7 +24,7 @@
{:size :paragraph-2
:weight :medium
:style style/on}
(i18n/label :t/on-capitalized)]
(i18n/label :t/on-uppercase)]
[quo/context-tag
{:type :network
:network-logo (:logo-url provider)
@@ -75,13 +75,14 @@
:accessibility-label title-accessibility-label}
label]
[quo/summary-info
{:type :token
:token-props {:token token-symbol
:label (str amount " " token-symbol)
:address (when token-address
(address-utils/get-shortened-compressed-key token-address))
:size 32}
:networks-to-show (send-utils/network-values-for-ui network-values)}]]))
{:type :token
:networks? true
:values (send-utils/network-values-for-ui network-values)
:token-props {:token token-symbol
:label (str amount " " token-symbol)
:address (when token-address
(address-utils/get-shortened-compressed-key token-address))
:size 32}}]]))
(defn- pay-section
[]
-1
View File
@@ -2,7 +2,6 @@
(: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
-1
View File
@@ -12,7 +12,6 @@
(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
+3 -3
View File
@@ -164,9 +164,9 @@
theme)})
options
(when sheet?
options/sheet-options))}}]}})))
(state/navigation-state-push {:id component
:type :modal})))
options/sheet-options))}}]}})
(state/navigation-state-push {:id component
:type :modal})))))
(rf/reg-fx :open-modal-fx open-modal)
-9
View File
@@ -71,12 +71,3 @@
{:amount amount-fixed :token-symbol token-symbol})))
{}
network-values))))
(re-frame/reg-sub
:wallet/send-selected-network
:<- [:wallet/wallet-send]
(fn [{:keys [to-values-by-chain]}]
(-> to-values-by-chain
keys
first
network-utils/get-network-details)))
+9 -6
View File
@@ -123,9 +123,12 @@
(def status
(clj->js
{:intendedPanic identity
:getNodeConfig (fn [] (types/clj->json {:WakuV2Config ""}))
:addCentralizedMetric (fn [_ callback]
(callback))
:fleets (fn [] (.fleets native-status))
:startLocalNotifications identity}))
{:getNodeConfig
(fn [] (types/clj->json {:WakuV2Config ""}))
:addCentralizedMetric
(fn [_ callback]
(callback))
:fleets
(fn [] (.fleets native-status))
:startLocalNotifications
identity}))
+3 -3
View File
@@ -3,7 +3,7 @@
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
"owner": "status-im",
"repo": "status-go",
"version": "v10.8.0",
"commit-sha1": "ba8fd51958686aea45e34e684ac925a4e65927f8",
"src-sha256": "0kqn5rkfsn7aqc2n2flqvkm6cc53ssk0mc1l84f4czg0paci0717"
"version": "v10.6.0",
"commit-sha1": "c5e4eb1a56ea7641efcc7cc677be7fd5d3f92225",
"src-sha256": "0n8x03c4dqxwcl27y8x6hmn6wbfpq3llkj15hhjxc4baaqwrhy8i"
}
@@ -36,14 +36,13 @@ class TestWalletCollectibles(MultipleSharedDeviceTestCase):
'').lower()
self.receiver_short_address = self.receiver['wallet_address'].replace(self.receiver['wallet_address'][6:-3],
'').lower()
self.network_name = 'Base'
@marks.testrail_id(741839)
def test_wallet_collectibles_balance(self):
self.wallet_view.collectibles_tab.click()
self.wallet_view.set_network_in_wallet(self.network_name)
self.wallet_view.set_network_in_wallet('Base')
collectibles = {
"BVL": {"quantity": 1,
"BVL": {"quantity": 2,
"info": {"Account": "Account 1",
"Network": "Base",
"category": "Football Player",
@@ -102,23 +101,21 @@ class TestWalletCollectibles(MultipleSharedDeviceTestCase):
self.wallet_view.collectibles_tab_on_select_token_view.click()
time.sleep(5)
self.wallet_view.get_collectible_element('BVL').click()
# self.wallet_view.amount_input_increase_button.click()
# self.wallet_view.confirm_button.click()
for text in [self.account_name, self.sender_short_address]:
self.wallet_view.amount_input_increase_button.click()
self.wallet_view.confirm_button.click()
expected_text = '2 BVL #47'
for text in [self.account_name, self.sender_short_address, expected_text]:
if not self.wallet_view.from_data_container.get_child_element_by_text(text).is_element_displayed():
self.errors.append(self.wallet_view,
"Text %s is not shown inside 'From' container on the Review Send page" % text)
if not self.wallet_view.to_data_container.get_child_element_by_text(
self.receiver_short_address).is_element_displayed():
self.errors.append(self.wallet_view,
"Text %s is not shown inside 'To' container on the Review Send page" % text)
if not self.wallet_view.on_data_container.get_child_element_by_text(self.network_name).is_element_displayed():
self.errors.append(self.wallet_view,
"Text %s is not shown inside 'On' container on the Review Send page" % text)
"Text %s is not shown in 'From' container on the Review Send page" % text)
for text in [self.receiver_short_address, expected_text]:
if not self.wallet_view.to_data_container.get_child_element_by_text(text).is_element_displayed():
self.errors.append(self.wallet_view,
"Text %s is not shown in 'To' container on the Review Send page" % text)
data_to_check = {
'Est. time': ' min',
'Max fees': r"[$]\d+.\d+",
'Recipient gets': '1 '
'Recipient gets': '2 '
}
for key, expected_value in data_to_check.items():
try:
@@ -151,17 +148,15 @@ class TestWalletCollectibles(MultipleSharedDeviceTestCase):
self.wallet_view.send_from_collectible_info_button.click()
self.wallet_view.address_text_input.send_keys(self.receiver['wallet_address'])
self.wallet_view.continue_button.click()
for text in [self.account_name, self.sender_short_address]:
expected_text = '1 Glitch Punks #3422'
for text in [self.account_name, self.sender_short_address, expected_text]:
if not self.wallet_view.from_data_container.get_child_element_by_text(text).is_element_displayed():
self.errors.append(self.wallet_view,
"Text %s is not shown in 'From' container on the Review Send page" % text)
if not self.wallet_view.to_data_container.get_child_element_by_text(
self.receiver_short_address).is_element_displayed():
self.errors.append(self.wallet_view,
"Text %s is not shown in 'To' container on the Review Send page" % text)
if not self.wallet_view.on_data_container.get_child_element_by_text(self.network_name).is_element_displayed():
self.errors.append(self.wallet_view,
"Text %s is not shown inside 'On' container on the Review Send page" % text)
for text in [self.receiver_short_address, expected_text]:
if not self.wallet_view.to_data_container.get_child_element_by_text(text).is_element_displayed():
self.errors.append(self.wallet_view,
"Text %s is not shown in 'To' container on the Review Send page" % text)
data_to_check = {
'Est. time': ' min',
'Max fees': r"[$]\d+.\d+",

Some files were not shown because too many files have changed in this diff Show More