diff --git a/.env b/.env index d2afc6525f..3207bb7584 100644 --- a/.env +++ b/.env @@ -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 diff --git a/.env.e2e b/.env.e2e index 54454a0a81..ecaf10af7a 100644 --- a/.env.e2e +++ b/.env.e2e @@ -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 diff --git a/.env.jenkins b/.env.jenkins index 041440679d..d6fa80c5c5 100644 --- a/.env.jenkins +++ b/.env.jenkins @@ -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 diff --git a/.env.nightly b/.env.nightly index cf21f031e9..29b96c4f5f 100644 --- a/.env.nightly +++ b/.env.nightly @@ -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 diff --git a/.env.release b/.env.release index c34df0d0ee..e7b8c15771 100644 --- a/.env.release +++ b/.env.release @@ -2,7 +2,7 @@ DEBUG_WEBVIEW=0 ETHEREUM_DEV_CLUSTER=0 EXTENSIONS=0 GROUP_CHATS_ENABLED=1 -LOG_LEVEL= +LOG_LEVEL=error MAILSERVER_CONFIRMATIONS_ENABLED=1 MAINNET_WARNING_ENABLED=1 PFS_ENCRYPTION_ENABLED=1 @@ -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 diff --git a/ci/Jenkinsfile.android b/ci/Jenkinsfile.android index 50a57e20b3..fed3845faa 100644 --- a/ci/Jenkinsfile.android +++ b/ci/Jenkinsfile.android @@ -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 { diff --git a/ci/Jenkinsfile.combined b/ci/Jenkinsfile.combined index 4df70f6c3d..742a0e4ccf 100644 --- a/ci/Jenkinsfile.combined +++ b/ci/Jenkinsfile.combined @@ -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) } - diff --git a/ci/Jenkinsfile.e2e-nightly b/ci/Jenkinsfile.e2e-nightly index 605a1524ab..f8cc14fca6 100644 --- a/ci/Jenkinsfile.e2e-nightly +++ b/ci/Jenkinsfile.e2e-nightly @@ -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' } diff --git a/ci/Jenkinsfile.ios b/ci/Jenkinsfile.ios index dc33988d56..e0b7b984c6 100644 --- a/ci/Jenkinsfile.ios +++ b/ci/Jenkinsfile.ios @@ -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 { diff --git a/ci/Jenkinsfile.tests b/ci/Jenkinsfile.tests index f715c17f50..d44e9793d2 100644 --- a/ci/Jenkinsfile.tests +++ b/ci/Jenkinsfile.tests @@ -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() diff --git a/ci/tests/Jenkinsfile.e2e-nightly b/ci/tests/Jenkinsfile.e2e-nightly index d788fc4c59..69b13eec36 100644 --- a/ci/tests/Jenkinsfile.e2e-nightly +++ b/ci/tests/Jenkinsfile.e2e-nightly @@ -1,5 +1,5 @@ #!/usr/bin/env groovy -library 'status-jenkins-lib@v1.9.13' +library 'status-jenkins-lib@v1.9.20' pipeline { diff --git a/ci/tests/Jenkinsfile.e2e-prs b/ci/tests/Jenkinsfile.e2e-prs index c459666d78..03ff3e866f 100644 --- a/ci/tests/Jenkinsfile.e2e-prs +++ b/ci/tests/Jenkinsfile.e2e-prs @@ -1,5 +1,5 @@ #!/usr/bin/env groovy -library 'status-jenkins-lib@v1.9.13' +library 'status-jenkins-lib@v1.9.20' pipeline { diff --git a/ci/tests/Jenkinsfile.e2e-upgrade b/ci/tests/Jenkinsfile.e2e-upgrade index d78b29e054..ad2e7e7b55 100644 --- a/ci/tests/Jenkinsfile.e2e-upgrade +++ b/ci/tests/Jenkinsfile.e2e-upgrade @@ -1,5 +1,5 @@ #!/usr/bin/env groovy -library 'status-jenkins-lib@v1.9.13' +library 'status-jenkins-lib@v1.9.20' pipeline { diff --git a/ci/tools/Jenkinsfile.fastlane-clean b/ci/tools/Jenkinsfile.fastlane-clean index 9e85b08370..6cae0dc144 100644 --- a/ci/tools/Jenkinsfile.fastlane-clean +++ b/ci/tools/Jenkinsfile.fastlane-clean @@ -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' } diff --git a/ci/tools/Jenkinsfile.nix-cache b/ci/tools/Jenkinsfile.nix-cache index 94153eb1ba..ec90584ebd 100644 --- a/ci/tools/Jenkinsfile.nix-cache +++ b/ci/tools/Jenkinsfile.nix-cache @@ -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 } diff --git a/ci/tools/Jenkinsfile.playstore-meta b/ci/tools/Jenkinsfile.playstore-meta index 2bd1a19896..b6ccea3798 100644 --- a/ci/tools/Jenkinsfile.playstore-meta +++ b/ci/tools/Jenkinsfile.playstore-meta @@ -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' } diff --git a/ci/tools/Jenkinsfile.xcode-clean b/ci/tools/Jenkinsfile.xcode-clean index 7b6b13416d..25907424e8 100644 --- a/ci/tools/Jenkinsfile.xcode-clean +++ b/ci/tools/Jenkinsfile.xcode-clean @@ -1,5 +1,5 @@ #!/usr/bin/env groovy -library 'status-jenkins-lib@v1.9.13' +library 'status-jenkins-lib@v1.9.20' pipeline { agent { diff --git a/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.kt b/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.kt index 720e89f9a8..df2f2206f2 100644 --- a/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.kt +++ b/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.kt @@ -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( diff --git a/modules/react-native-status/ios/RCTStatus/RCTStatus.m b/modules/react-native-status/ios/RCTStatus/RCTStatus.m index 00842f9dea..73b9902f17 100644 --- a/modules/react-native-status/ios/RCTStatus/RCTStatus.m +++ b/modules/react-native-status/ios/RCTStatus/RCTStatus.m @@ -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:@"" diff --git a/nix/mobile/android/default.nix b/nix/mobile/android/default.nix index 371d53859d..8ddcb79477 100644 --- a/nix/mobile/android/default.nix +++ b/nix/mobile/android/default.nix @@ -8,7 +8,7 @@ rec { shell = mkShell { buildInputs = with pkgs; [ - openjdk + openjdk_headless gradle lsof # used in start-react-native.sh flock # used in nix/scripts/node_modules.sh diff --git a/nix/mobile/jsbundle/default.nix b/nix/mobile/jsbundle/default.nix index 5c7c4a4889..ee36197671 100644 --- a/nix/mobile/jsbundle/default.nix +++ b/nix/mobile/jsbundle/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation { ]; }; }; - buildInputs = with pkgs; [ clojure nodejs bash git openjdk]; + buildInputs = with pkgs; [ clojure nodejs bash git openjdk_headless ]; phases = [ "unpackPhase" "secretsPhase" "patchPhase" "configurePhase" "buildPhase" "installPhase" diff --git a/nix/overlay.nix b/nix/overlay.nix index 0e2801b45d..9c3a8c4d50 100644 --- a/nix/overlay.nix +++ b/nix/overlay.nix @@ -49,7 +49,7 @@ in { nodejs = super.nodejs_20; ruby = super.ruby_3_1; yarn = super.yarn.override { nodejs = super.nodejs_20; }; - openjdk = super.openjdk17_headless; + openjdk_headless = super.openjdk17_headless; xcodeWrapper = callPackage ./pkgs/xcodeenv/compose-xcodewrapper.nix { } { versions = ["16.0" "16.1" "16.2"]; }; diff --git a/nix/pkgs/android-sdk/shell.nix b/nix/pkgs/android-sdk/shell.nix index 364c27884d..3f1a15ab83 100644 --- a/nix/pkgs/android-sdk/shell.nix +++ b/nix/pkgs/android-sdk/shell.nix @@ -1,8 +1,8 @@ -{ mkShell, openjdk, androidPkgs }: +{ mkShell, openjdk_headless, androidPkgs }: mkShell { name = "android-sdk-shell"; - buildInputs = [ openjdk ]; + buildInputs = [ openjdk_headless ]; shellHook = '' export ANDROID_HOME="${androidPkgs.sdk}" diff --git a/nix/shells.nix b/nix/shells.nix index 19814c1a22..202748276f 100644 --- a/nix/shells.nix +++ b/nix/shells.nix @@ -19,7 +19,7 @@ let # for calling clojure targets in CI or Makefile clojure = mkShell { buildInputs = with pkgs; [ - clojure flock maven openjdk + clojure flock maven openjdk_headless # 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 apksigner ]; + buildInputs = with pkgs; [ openjdk_headless apksigner ]; }; # for targets needing 'adb', 'apkanalyzer' and other SDK/NDK tools diff --git a/nix/status-go/mobile/build.nix b/nix/status-go/mobile/build.nix index 61f22c3224..6174483a56 100644 --- a/nix/status-go/mobile/build.nix +++ b/nix/status-go/mobile/build.nix @@ -1,5 +1,5 @@ { callPackage, lib, buildGoPackage, pkgs -, androidPkgs, openjdk, gomobile, xcodeWrapper, removeReferencesTo +, androidPkgs, openjdk_headless, 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 + ] ++ optional isAndroid openjdk_headless ++ optional isIOS xcodeWrapper; ldflags = goBuildLdFlags; @@ -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 diff --git a/resources/images/ui2/keycard-backup-positive@2x.png b/resources/images/ui2/keycard-backup-positive@2x.png new file mode 100644 index 0000000000..bba9946b4a Binary files /dev/null and b/resources/images/ui2/keycard-backup-positive@2x.png differ diff --git a/resources/images/ui2/keycard-backup-positive@3x.png b/resources/images/ui2/keycard-backup-positive@3x.png new file mode 100644 index 0000000000..eef56bd23c Binary files /dev/null and b/resources/images/ui2/keycard-backup-positive@3x.png differ diff --git a/resources/images/ui2/keycard-change-pin-negative@2x.png b/resources/images/ui2/keycard-change-pin-negative@2x.png new file mode 100644 index 0000000000..a731152516 Binary files /dev/null and b/resources/images/ui2/keycard-change-pin-negative@2x.png differ diff --git a/resources/images/ui2/keycard-change-pin-negative@3x.png b/resources/images/ui2/keycard-change-pin-negative@3x.png new file mode 100644 index 0000000000..af1eccdfd4 Binary files /dev/null and b/resources/images/ui2/keycard-change-pin-negative@3x.png differ diff --git a/resources/images/ui2/keycard-change-pin-positive@2x.png b/resources/images/ui2/keycard-change-pin-positive@2x.png new file mode 100644 index 0000000000..046ea688dc Binary files /dev/null and b/resources/images/ui2/keycard-change-pin-positive@2x.png differ diff --git a/resources/images/ui2/keycard-change-pin-positive@3x.png b/resources/images/ui2/keycard-change-pin-positive@3x.png new file mode 100644 index 0000000000..f6b6335f3e Binary files /dev/null and b/resources/images/ui2/keycard-change-pin-positive@3x.png differ diff --git a/resources/images/ui2/keycard-change-pin@2x.png b/resources/images/ui2/keycard-change-pin@2x.png new file mode 100644 index 0000000000..e9c5298430 Binary files /dev/null and b/resources/images/ui2/keycard-change-pin@2x.png differ diff --git a/resources/images/ui2/keycard-change-pin@3x.png b/resources/images/ui2/keycard-change-pin@3x.png new file mode 100644 index 0000000000..afb351b5b2 Binary files /dev/null and b/resources/images/ui2/keycard-change-pin@3x.png differ diff --git a/resources/images/ui2/keycard-migration-failed.png b/resources/images/ui2/keycard-migration-failed.png deleted file mode 100644 index 437a516d07..0000000000 Binary files a/resources/images/ui2/keycard-migration-failed.png and /dev/null differ diff --git a/resources/images/ui2/keycard-migration-failed@2x.png b/resources/images/ui2/keycard-migration-failed@2x.png new file mode 100644 index 0000000000..f1822ec73f Binary files /dev/null and b/resources/images/ui2/keycard-migration-failed@2x.png differ diff --git a/resources/images/ui2/keycard-migration-failed@3x.png b/resources/images/ui2/keycard-migration-failed@3x.png new file mode 100644 index 0000000000..90625af2d3 Binary files /dev/null and b/resources/images/ui2/keycard-migration-failed@3x.png differ diff --git a/resources/images/ui2/keycard-migration-succeeded.png b/resources/images/ui2/keycard-migration-succeeded.png deleted file mode 100644 index 2e6e8c7c02..0000000000 Binary files a/resources/images/ui2/keycard-migration-succeeded.png and /dev/null differ diff --git a/resources/images/ui2/keycard-migration-succeeded@2x.png b/resources/images/ui2/keycard-migration-succeeded@2x.png new file mode 100644 index 0000000000..5ff9de6129 Binary files /dev/null and b/resources/images/ui2/keycard-migration-succeeded@2x.png differ diff --git a/resources/images/ui2/keycard-migration-succeeded@3x.png b/resources/images/ui2/keycard-migration-succeeded@3x.png new file mode 100644 index 0000000000..0fcd763c85 Binary files /dev/null and b/resources/images/ui2/keycard-migration-succeeded@3x.png differ diff --git a/resources/images/ui2/keycard-migration.png b/resources/images/ui2/keycard-migration.png deleted file mode 100644 index 0bd5ac2e40..0000000000 Binary files a/resources/images/ui2/keycard-migration.png and /dev/null differ diff --git a/resources/images/ui2/keycard-migration@2x.png b/resources/images/ui2/keycard-migration@2x.png new file mode 100644 index 0000000000..2352766f56 Binary files /dev/null and b/resources/images/ui2/keycard-migration@2x.png differ diff --git a/resources/images/ui2/keycard-migration@3x.png b/resources/images/ui2/keycard-migration@3x.png new file mode 100644 index 0000000000..28e2e08968 Binary files /dev/null and b/resources/images/ui2/keycard-migration@3x.png differ diff --git a/resources/images/ui2/keycard-not-empty@2x.png b/resources/images/ui2/keycard-not-empty@2x.png new file mode 100644 index 0000000000..c121a034c9 Binary files /dev/null and b/resources/images/ui2/keycard-not-empty@2x.png differ diff --git a/resources/images/ui2/keycard-not-empty@3x.png b/resources/images/ui2/keycard-not-empty@3x.png new file mode 100644 index 0000000000..e4f84f68ee Binary files /dev/null and b/resources/images/ui2/keycard-not-empty@3x.png differ diff --git a/resources/images/ui2/keycard-not-same@2x.png b/resources/images/ui2/keycard-not-same@2x.png new file mode 100644 index 0000000000..cf6900778f Binary files /dev/null and b/resources/images/ui2/keycard-not-same@2x.png differ diff --git a/resources/images/ui2/keycard-not-same@3x.png b/resources/images/ui2/keycard-not-same@3x.png new file mode 100644 index 0000000000..5cbd259169 Binary files /dev/null and b/resources/images/ui2/keycard-not-same@3x.png differ diff --git a/resources/images/ui2/keycard-reset-negative@2x.png b/resources/images/ui2/keycard-reset-negative@2x.png new file mode 100644 index 0000000000..94b918d230 Binary files /dev/null and b/resources/images/ui2/keycard-reset-negative@2x.png differ diff --git a/resources/images/ui2/keycard-reset-negative@3x.png b/resources/images/ui2/keycard-reset-negative@3x.png new file mode 100644 index 0000000000..0452f08341 Binary files /dev/null and b/resources/images/ui2/keycard-reset-negative@3x.png differ diff --git a/resources/images/ui2/keycard-reset-positive@2x.png b/resources/images/ui2/keycard-reset-positive@2x.png new file mode 100644 index 0000000000..47858c89a7 Binary files /dev/null and b/resources/images/ui2/keycard-reset-positive@2x.png differ diff --git a/resources/images/ui2/keycard-reset-positive@3x.png b/resources/images/ui2/keycard-reset-positive@3x.png new file mode 100644 index 0000000000..dae9c62718 Binary files /dev/null and b/resources/images/ui2/keycard-reset-positive@3x.png differ diff --git a/resources/images/ui2/keycard-unblock-positive@2x.png b/resources/images/ui2/keycard-unblock-positive@2x.png new file mode 100644 index 0000000000..d2dca95058 Binary files /dev/null and b/resources/images/ui2/keycard-unblock-positive@2x.png differ diff --git a/resources/images/ui2/keycard-unblock-positive@3x.png b/resources/images/ui2/keycard-unblock-positive@3x.png new file mode 100644 index 0000000000..b49492ceec Binary files /dev/null and b/resources/images/ui2/keycard-unblock-positive@3x.png differ diff --git a/resources/images/ui2/keycard-unblock@2x.png b/resources/images/ui2/keycard-unblock@2x.png new file mode 100644 index 0000000000..4cf3706cc3 Binary files /dev/null and b/resources/images/ui2/keycard-unblock@2x.png differ diff --git a/resources/images/ui2/keycard-unblock@3x.png b/resources/images/ui2/keycard-unblock@3x.png new file mode 100644 index 0000000000..477872877f Binary files /dev/null and b/resources/images/ui2/keycard-unblock@3x.png differ diff --git a/resources/images/ui2/not-keycard.png b/resources/images/ui2/not-keycard.png deleted file mode 100644 index a02ae5329c..0000000000 Binary files a/resources/images/ui2/not-keycard.png and /dev/null differ diff --git a/resources/images/ui2/not-keycard@2x.png b/resources/images/ui2/not-keycard@2x.png new file mode 100644 index 0000000000..34fa97a71a Binary files /dev/null and b/resources/images/ui2/not-keycard@2x.png differ diff --git a/resources/images/ui2/not-keycard@3x.png b/resources/images/ui2/not-keycard@3x.png new file mode 100644 index 0000000000..29aa10c323 Binary files /dev/null and b/resources/images/ui2/not-keycard@3x.png differ diff --git a/resources/images/ui2/preparing-status@2x.png b/resources/images/ui2/preparing-status@2x.png index b90b8947ac..a7f14e87a8 100644 Binary files a/resources/images/ui2/preparing-status@2x.png and b/resources/images/ui2/preparing-status@2x.png differ diff --git a/resources/images/ui2/preparing-status@3x.png b/resources/images/ui2/preparing-status@3x.png index 0fe535a0c5..e6dc7a52b1 100644 Binary files a/resources/images/ui2/preparing-status@3x.png and b/resources/images/ui2/preparing-status@3x.png differ diff --git a/scripts/build-android.sh b/scripts/build-android.sh index 063bf39f9d..12597ded10 100755 --- a/scripts/build-android.sh +++ b/scripts/build-android.sh @@ -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. diff --git a/shadow-cljs.edn b/shadow-cljs.edn index c53baa3ca0..67f46f9b5a 100644 --- a/shadow-cljs.edn +++ b/shadow-cljs.edn @@ -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" diff --git a/src/legacy/status_im/log_level/core.cljs b/src/legacy/status_im/log_level/core.cljs index c1538ae855..900fd343ce 100644 --- a/src/legacy/status_im/log_level/core.cljs +++ b/src/legacy/status_im/log_level/core.cljs @@ -2,19 +2,41 @@ (: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] :as cofx} log-level] + [{:keys [db]} log-level] (let [old-log-level (get-in db [:profile/profile :log-level])] (when (not= old-log-level log-level) - (multiaccounts.update/multiaccount-update - cofx - :log-level - log-level - {:on-success #(re-frame/dispatch [:profile/logout])})))) + (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])})) (rf/defn show-change-log-level-confirmation {:events [:log-level.ui/log-level-selected]} diff --git a/src/legacy/status_im/ui/screens/advanced_settings/views.cljs b/src/legacy/status_im/ui/screens/advanced_settings/views.cljs index e5e883734d..5d3e767df4 100644 --- a/src/legacy/status_im/ui/screens/advanced_settings/views.cljs +++ b/src/legacy/status_im/ui/screens/advanced_settings/views.cljs @@ -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 diff --git a/src/legacy/status_im/ui/screens/log_level_settings/views.cljs b/src/legacy/status_im/ui/screens/log_level_settings/views.cljs index 03646d691f..311b526484 100644 --- a/src/legacy/status_im/ui/screens/log_level_settings/views.cljs +++ b/src/legacy/status_im/ui/screens/log_level_settings/views.cljs @@ -33,6 +33,9 @@ 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" @@ -42,9 +45,7 @@ {:name "INFO" :value "INFO"} {:name "DEBUG" - :value "DEBUG"} - {:name "TRACE" - :value "TRACE"}]) + :value "DEBUG"}]) (views/defview log-level-settings [] diff --git a/src/native_module/core.cljs b/src/native_module/core.cljs index 33eca851bc..4f4a1e11d7 100644 --- a/src/native_module/core.cljs +++ b/src/native_module/core.cljs @@ -569,3 +569,7 @@ (.createAccountFromPrivateKey ^js (account-manager) (types/clj->json {:privateKey private-key}) callback))) + +(defn intended-panic + [message] + (.intendedPanic ^js (status) message)) diff --git a/src/quo/components/community/community_card_view.cljs b/src/quo/components/community/community_card_view.cljs index ba0aafb3c5..d19f4f72b7 100644 --- a/src/quo/components/community/community_card_view.cljs +++ b/src/quo/components/community/community_card_view.cljs @@ -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 diff --git a/src/quo/components/community/community_list_view.cljs b/src/quo/components/community/community_list_view.cljs index cf4ad50943..8e03c61df5 100644 --- a/src/quo/components/community/community_list_view.cljs +++ b/src/quo/components/community/community_list_view.cljs @@ -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 diff --git a/src/quo/components/community/community_view.cljs b/src/quo/components/community/community_view.cljs index 65c159e125..28565d2ec7 100644 --- a/src/quo/components/community/community_view.cljs +++ b/src/quo/components/community/community_view.cljs @@ -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]}] diff --git a/src/quo/components/community/style.cljs b/src/quo/components/community/style.cljs index 492d62c6cf..ec94ff9d9f 100644 --- a/src/quo/components/community/style.cljs +++ b/src/quo/components/community/style.cljs @@ -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] diff --git a/src/quo/components/wallet/summary_info/component_spec.cljs b/src/quo/components/wallet/summary_info/component_spec.cljs index aa5ed72920..6ad216ee31 100644 --- a/src/quo/components/wallet/summary_info/component_spec.cljs +++ b/src/quo/components/wallet/summary_info/component_spec.cljs @@ -14,48 +14,43 @@ (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? true - :values {:ethereum 150 - :optimism 50 - :arbitrum 25} - :account-props status-account-props}]) + {:type :status-account + :networks-to-show {: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? 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})}}]) + {: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})}}]) (h/is-truthy (h/get-by-text "Mark Libot")) (h/is-truthy (h/get-by-text "Collectibles vault"))) - (h/test "Networks true render" + (h/test "Networks specified render" (h/render-with-theme-provider [summary-info/view - {: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))) + {: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)))) - (h/test "Networks false render" +(h/describe "Wallet: network summary info" + (h/test "Type of `network` title renders" (h/render-with-theme-provider [summary-info/view - {: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)))) + {:type :network + :network-props {:full-name "Ethereum" + :network-name :ethereum}}]) + (h/is-truthy (h/get-by-text "Ethereum")))) diff --git a/src/quo/components/wallet/summary_info/schema.cljs b/src/quo/components/wallet/summary_info/schema.cljs index 7be808dbdb..107f69e3b9 100644 --- a/src/quo/components/wallet/summary_info/schema.cljs +++ b/src/quo/components/wallet/summary_info/schema.cljs @@ -5,9 +5,9 @@ [:catn [:props [:map - [:type [:enum :status-account :saved-account :account :user :token]] + [:type [:enum :status-account :saved-account :account :user :token :network]] [:account-props {:optional true} [:maybe :map]] + [:network-props {:optional true} [:maybe :map]] [:token-props {:optional true} [:maybe :map]] - [:networks? {:optional true} [:maybe :boolean]] - [:values {:optional true} [:maybe :map]]]]] + [:networks-to-show {:optional true} [:maybe :map]]]]] :any]) diff --git a/src/quo/components/wallet/summary_info/style.cljs b/src/quo/components/wallet/summary_info/style.cljs index 9854d69734..535b478de3 100644 --- a/src/quo/components/wallet/summary_info/style.cljs +++ b/src/quo/components/wallet/summary_info/style.cljs @@ -3,13 +3,13 @@ [quo.foundations.colors :as colors])) (defn container - [networks? theme] + [networks-to-show? theme] {:width "100%" - :height (if networks? 90 56) + :height (if networks-to-show? 90 56) :border-radius 16 :border-width 1 :border-color (colors/theme-colors colors/neutral-10 colors/neutral-80 theme) - :margin-bottom (if networks? 4 8)}) + :margin-bottom (if networks-to-show? 4 8)}) (def info-container {:flex-direction :row @@ -39,3 +39,7 @@ :height 32 :flex-direction :row :align-items :center}) + +(def network-icon + {:width 32 + :height 32}) diff --git a/src/quo/components/wallet/summary_info/view.cljs b/src/quo/components/wallet/summary_info/view.cljs index ac19e3189b..71fb847840 100644 --- a/src/quo/components/wallet/summary_info/view.cljs +++ b/src/quo/components/wallet/summary_info/view.cljs @@ -28,50 +28,35 @@ [rn/view {:style (style/dot-divider theme)}])]) +(def ^:private default-token-symbols + {:ethereum "ETH" + :optimism "OP" + :arbitrum "ARB" + :base "ETH"}) + (defn 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}])])) + [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}]))) (defn- view-internal - [{:keys [type account-props token-props networks? values]}] + [{:keys [type account-props network-props token-props networks-to-show]}] (let [theme (quo.theme/use-theme) address (or (:address account-props) (:address token-props))] [rn/view - {:style (style/container networks? theme)} + {:style (style/container (seq? networks-to-show) theme)} [rn/view {:style style/info-container} (case type @@ -82,16 +67,26 @@ (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= type :account) - [text/text {:weight :semi-bold} (or (:name account-props) (:label token-props))]) + (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)]) [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)}} @@ -105,10 +100,10 @@ :style {:color (when (not= type :account) (colors/theme-colors colors/neutral-50 colors/neutral-40 theme))}} address])]]] - (when networks? + (when networks-to-show [:<> [rn/view {:style (style/line-divider theme)}] - [networks values theme]])])) + [networks networks-to-show theme]])])) (def view (schema/instrument #'view-internal summary-info-schema/?schema)) diff --git a/src/status_im/common/app_monitoring/effects.cljs b/src/status_im/common/app_monitoring/effects.cljs new file mode 100644 index 0000000000..7939d6f942 --- /dev/null +++ b/src/status_im/common/app_monitoring/effects.cljs @@ -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))) diff --git a/src/status_im/common/app_monitoring/events.cljs b/src/status_im/common/app_monitoring/events.cljs new file mode 100644 index 0000000000..d66ab5c6ef --- /dev/null +++ b/src/status_im/common/app_monitoring/events.cljs @@ -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]]})) diff --git a/src/status_im/common/resources.cljs b/src/status_im/common/resources.cljs index db3137942f..1b40f652a9 100644 --- a/src/status_im/common/resources.cljs +++ b/src/status_im/common/resources.cljs @@ -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") diff --git a/src/status_im/config.cljs b/src/status_im/config.cljs index 7f76edc65e..fad0998a15 100644 --- a/src/status_im/config.cljs +++ b/src/status_im/config.cljs @@ -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) @@ -135,3 +143,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) diff --git a/src/status_im/contexts/communities/actions/leave/events.cljs b/src/status_im/contexts/communities/actions/leave/events.cljs index a95421f64c..ef73fbdefe 100644 --- a/src/status_im/contexts/communities/actions/leave/events.cljs +++ b/src/status_im/contexts/communities/actions/leave/events.cljs @@ -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]] diff --git a/src/status_im/contexts/communities/discover/view.cljs b/src/status_im/contexts/communities/discover/view.cljs index 169e8265f7..bfe6c5f5c8 100644 --- a/src/status_im/contexts/communities/discover/view.cljs +++ b/src/status_im/contexts/communities/discover/view.cljs @@ -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]])) diff --git a/src/status_im/contexts/keycard/backup/view.cljs b/src/status_im/contexts/keycard/backup/view.cljs index a9dea34058..96d864760d 100644 --- a/src/status_im/contexts/keycard/backup/view.cljs +++ b/src/status_im/contexts/keycard/backup/view.cljs @@ -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 diff --git a/src/status_im/contexts/keycard/change_pin/view.cljs b/src/status_im/contexts/keycard/change_pin/view.cljs index 80657a1956..3bd2b5a670 100644 --- a/src/status_im/contexts/keycard/change_pin/view.cljs +++ b/src/status_im/contexts/keycard/change_pin/view.cljs @@ -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 diff --git a/src/status_im/contexts/keycard/check/view.cljs b/src/status_im/contexts/keycard/check/view.cljs index a681d69adf..cf21112cbd 100644 --- a/src/status_im/contexts/keycard/check/view.cljs +++ b/src/status_im/contexts/keycard/check/view.cljs @@ -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 diff --git a/src/status_im/contexts/keycard/different_card/view.cljs b/src/status_im/contexts/keycard/different_card/view.cljs index 200405cb61..b6e1689df3 100644 --- a/src/status_im/contexts/keycard/different_card/view.cljs +++ b/src/status_im/contexts/keycard/different_card/view.cljs @@ -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)]]]) diff --git a/src/status_im/contexts/keycard/error/view.cljs b/src/status_im/contexts/keycard/error/view.cljs index c0f1618246..00905f401c 100644 --- a/src/status_im/contexts/keycard/error/view.cljs +++ b/src/status_im/contexts/keycard/error/view.cljs @@ -23,6 +23,7 @@ (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 @@ -37,21 +38,31 @@ [quo/section-label {:section (i18n/label :t/what-you-can-do) :container-style {:padding-vertical 8}}] (if (= error :keycard/error.keycard-empty) - [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])}])}]))}] + (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]))}]) [:<> (when (or (= error :keycard/error.keycard-frozen) (= error :keycard/error.keycard-locked)) diff --git a/src/status_im/contexts/keycard/factory_reset/view.cljs b/src/status_im/contexts/keycard/factory_reset/view.cljs index b3a6c1f75a..8188aac6f6 100644 --- a/src/status_im/contexts/keycard/factory_reset/view.cljs +++ b/src/status_im/contexts/keycard/factory_reset/view.cljs @@ -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)]]]) diff --git a/src/status_im/contexts/keycard/migrate/fail/view.cljs b/src/status_im/contexts/keycard/migrate/fail/view.cljs index f680ba8aaf..46f5aa6092 100644 --- a/src/status_im/contexts/keycard/migrate/fail/view.cljs +++ b/src/status_im/contexts/keycard/migrate/fail/view.cljs @@ -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)}] diff --git a/src/status_im/contexts/keycard/migrate/re_encrypting/view.cljs b/src/status_im/contexts/keycard/migrate/re_encrypting/view.cljs index bea83c3fd3..274cb5daa2 100644 --- a/src/status_im/contexts/keycard/migrate/re_encrypting/view.cljs +++ b/src/status_im/contexts/keycard/migrate/re_encrypting/view.cljs @@ -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)}]])) diff --git a/src/status_im/contexts/keycard/migrate/success/view.cljs b/src/status_im/contexts/keycard/migrate/success/view.cljs index 9be78900d7..55dc46290d 100644 --- a/src/status_im/contexts/keycard/migrate/success/view.cljs +++ b/src/status_im/contexts/keycard/migrate/success/view.cljs @@ -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)]])) diff --git a/src/status_im/contexts/keycard/migrate/view.cljs b/src/status_im/contexts/keycard/migrate/view.cljs index be4fc69794..c6da631bdc 100644 --- a/src/status_im/contexts/keycard/migrate/view.cljs +++ b/src/status_im/contexts/keycard/migrate/view.cljs @@ -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 diff --git a/src/status_im/contexts/keycard/not_keycard/view.cljs b/src/status_im/contexts/keycard/not_keycard/view.cljs index 3d3e6af3f9..bce44270af 100644 --- a/src/status_im/contexts/keycard/not_keycard/view.cljs +++ b/src/status_im/contexts/keycard/not_keycard/view.cljs @@ -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)]]]) diff --git a/src/status_im/contexts/keycard/unblock/view.cljs b/src/status_im/contexts/keycard/unblock/view.cljs index 9964c43a43..0d53bdf363 100644 --- a/src/status_im/contexts/keycard/unblock/view.cljs +++ b/src/status_im/contexts/keycard/unblock/view.cljs @@ -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 diff --git a/src/status_im/contexts/preview/quo/wallet/summary_info.cljs b/src/status_im/contexts/preview/quo/wallet/summary_info.cljs index 231245b3c7..71c7f1cdcd 100644 --- a/src/status_im/contexts/preview/quo/wallet/summary_info.cljs +++ b/src/status_im/contexts/preview/quo/wallet/summary_info.cljs @@ -12,17 +12,15 @@ :options [{:key :status-account} {:key :user} {:key :saved-account} - {:key :account}]} - {:key :networks? :type :boolean}]) + {:key :account}]}]) (defn view [] - (let [state (reagent/atom {:type :status-account - :networks? true - :values {:ethereum {:amount 150} - :optimism {:amount 50} - :arbitrum {:amount 25}}}) + (let [state (reagent/atom {:type :status-account + :networks-to-show {:ethereum {:amount 150} + :optimism {:amount 50} + :arbitrum {:amount 25}}}) status-account-props {:customization-color :purple :size 32 :emoji "🍑" diff --git a/src/status_im/contexts/profile/events.cljs b/src/status_im/contexts/profile/events.cljs index 0b32c07fb3..dea061634c 100644 --- a/src/status_im/contexts/profile/events.cljs +++ b/src/status_im/contexts/profile/events.cljs @@ -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 diff --git a/src/status_im/contexts/wallet/send/transaction_confirmation/style.cljs b/src/status_im/contexts/wallet/send/transaction_confirmation/style.cljs index 42b1042609..ffc23474b2 100644 --- a/src/status_im/contexts/wallet/send/transaction_confirmation/style.cljs +++ b/src/status_im/contexts/wallet/send/transaction_confirmation/style.cljs @@ -28,3 +28,7 @@ [theme] {:margin-bottom 8 :color (colors/theme-colors colors/neutral-50 colors/neutral-40 theme)}) + +(def summary-container + {:padding-horizontal 20 + :padding-bottom 16}) diff --git a/src/status_im/contexts/wallet/send/transaction_confirmation/view.cljs b/src/status_im/contexts/wallet/send/transaction_confirmation/view.cljs index 6872e89eea..976860a0e7 100644 --- a/src/status_im/contexts/wallet/send/transaction_confirmation/view.cljs +++ b/src/status_im/contexts/wallet/send/transaction_confirmation/view.cljs @@ -133,9 +133,7 @@ :saved-address :saved-account :account :status-account summary-type)] - [rn/view - {:style {:padding-horizontal 20 - :padding-bottom 16}} + [rn/view {:style style/summary-container} [quo/text {:size :paragraph-2 :weight :medium @@ -143,17 +141,32 @@ :accessibility-label accessibility-label} label] [quo/summary-info - {: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)))}]])) + {: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}]]))) (defn- data-item [{:keys [title subtitle]}] @@ -295,6 +308,7 @@ :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) @@ -308,4 +322,8 @@ :recipient recipient :bridge-tx? (= transaction-type :tx/bridge) :account-to? true - :theme theme}]]]])) + :theme theme}] + (when-not (= transaction-type :tx/bridge) + [network-summary + {:label (i18n/label :t/on-capitalized) + :theme theme}])]]])) diff --git a/src/status_im/contexts/wallet/sheets/buy_network_selection/view.cljs b/src/status_im/contexts/wallet/sheets/buy_network_selection/view.cljs index 427f709a77..b944d46232 100644 --- a/src/status_im/contexts/wallet/sheets/buy_network_selection/view.cljs +++ b/src/status_im/contexts/wallet/sheets/buy_network_selection/view.cljs @@ -24,7 +24,7 @@ {:size :paragraph-2 :weight :medium :style style/on} - (i18n/label :t/on-uppercase)] + (i18n/label :t/on-capitalized)] [quo/context-tag {:type :network :network-logo (:logo-url provider) diff --git a/src/status_im/contexts/wallet/swap/swap_confirmation/view.cljs b/src/status_im/contexts/wallet/swap/swap_confirmation/view.cljs index 46f6c94b26..b92367623b 100644 --- a/src/status_im/contexts/wallet/swap/swap_confirmation/view.cljs +++ b/src/status_im/contexts/wallet/swap/swap_confirmation/view.cljs @@ -74,14 +74,13 @@ :accessibility-label title-accessibility-label} label] [quo/summary-info - {: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}}]])) + {: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)}]])) (defn- pay-section [] diff --git a/src/status_im/events.cljs b/src/status_im/events.cljs index b0e983d952..e44a114cc3 100644 --- a/src/status_im/events.cljs +++ b/src/status_im/events.cljs @@ -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 diff --git a/src/status_im/feature_flags.cljs b/src/status_im/feature_flags.cljs index 1d175453fe..9afb611924 100644 --- a/src/status_im/feature_flags.cljs +++ b/src/status_im/feature_flags.cljs @@ -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 diff --git a/src/status_im/navigation/effects.cljs b/src/status_im/navigation/effects.cljs index 2ca476f2ac..b2fe251af2 100644 --- a/src/status_im/navigation/effects.cljs +++ b/src/status_im/navigation/effects.cljs @@ -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) diff --git a/src/status_im/subs/wallet/networks.cljs b/src/status_im/subs/wallet/networks.cljs index 8de1565d57..894049d313 100644 --- a/src/status_im/subs/wallet/networks.cljs +++ b/src/status_im/subs/wallet/networks.cljs @@ -71,3 +71,12 @@ {: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))) diff --git a/src/tests/test_utils.cljs b/src/tests/test_utils.cljs index 972e203751..c3253e4d4c 100644 --- a/src/tests/test_utils.cljs +++ b/src/tests/test_utils.cljs @@ -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})) diff --git a/status-go-version.json b/status-go-version.json index 341d35e1e6..574f1c508c 100644 --- a/status-go-version.json +++ b/status-go-version.json @@ -3,7 +3,7 @@ "_comment": "Instead use: scripts/update-status-go.sh ", "owner": "status-im", "repo": "status-go", - "version": "v10.6.0", - "commit-sha1": "c5e4eb1a56ea7641efcc7cc677be7fd5d3f92225", - "src-sha256": "0n8x03c4dqxwcl27y8x6hmn6wbfpq3llkj15hhjxc4baaqwrhy8i" + "version": "v10.8.0", + "commit-sha1": "ba8fd51958686aea45e34e684ac925a4e65927f8", + "src-sha256": "0kqn5rkfsn7aqc2n2flqvkm6cc53ssk0mc1l84f4czg0paci0717" } diff --git a/test/appium/tests/critical/wallet/test_collectibles.py b/test/appium/tests/critical/wallet/test_collectibles.py index fb4158e7fa..03dc4c8262 100644 --- a/test/appium/tests/critical/wallet/test_collectibles.py +++ b/test/appium/tests/critical/wallet/test_collectibles.py @@ -36,11 +36,12 @@ 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('Base') + self.wallet_view.set_network_in_wallet(self.network_name) collectibles = { "BVL": {"quantity": 2, "info": {"Account": "Account 1", @@ -103,15 +104,17 @@ class TestWalletCollectibles(MultipleSharedDeviceTestCase): self.wallet_view.get_collectible_element('BVL').click() 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]: + for text in [self.account_name, self.sender_short_address]: 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) - 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) + "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) data_to_check = { 'Est. time': ' min', 'Max fees': r"[$]\d+.\d+", @@ -148,15 +151,17 @@ 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() - expected_text = '1 Glitch Punks #3422' - for text in [self.account_name, self.sender_short_address, expected_text]: + for text in [self.account_name, self.sender_short_address]: 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) - 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) + 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) data_to_check = { 'Est. time': ' min', 'Max fees': r"[$]\d+.\d+", diff --git a/test/appium/tests/critical/wallet/test_wallet_mainnet.py b/test/appium/tests/critical/wallet/test_wallet_mainnet.py index c7fe664d61..f61b84a9c1 100644 --- a/test/appium/tests/critical/wallet/test_wallet_mainnet.py +++ b/test/appium/tests/critical/wallet/test_wallet_mainnet.py @@ -99,28 +99,32 @@ class TestWalletOneDevice(MultipleSharedDeviceTestCase): self.wallet_view.confirm_button.click() self.wallet_view.just_fyi("Checking Review Send page for %s on %s" % (asset, network)) - expected_amount = "%s %s" % (data['amount'], 'ETH' if asset == 'Ether' else 'SNT') sender_short_address = self.sender['wallet_address'].replace(self.sender['wallet_address'][6:-3], '…').lower() receiver_short_address = self.receiver['wallet_address'].replace(self.receiver['wallet_address'][6:-3], '…').lower() - for text in [self.account_name, sender_short_address, expected_amount]: + for text in [self.account_name, sender_short_address]: if not self.wallet_view.from_data_container.get_child_element_by_text(text).is_element_displayed(): self.errors.append( self.wallet_view, "%s on %s: text %s is not shown in 'From' container on the Review Send page" % ( asset, network, text)) - for text in [receiver_short_address, expected_amount]: - if not self.wallet_view.to_data_container.get_child_element_by_text(text).is_element_displayed(): - self.errors.append( - self.wallet_view, - "%s on %s: text %s is not shown in 'To' container on the Review Send page" % ( - asset, network, text)) + if not self.wallet_view.to_data_container.get_child_element_by_text( + receiver_short_address).is_element_displayed(): + self.errors.append( + self.wallet_view, + "%s on %s: text %s is not shown in 'To' container on the Review Send page" % ( + asset, network, text)) + if not self.wallet_view.on_data_container.get_child_element_by_text(network).is_element_displayed(): + self.errors.append( + self.wallet_view, + "%s on %s: network %s is not shown in 'On' container on the Review Send page" % ( + asset, network, text)) data_to_check = { 'Est. time': ' min', 'Max fees': r"[$]\d+.\d+", - 'Recipient gets': expected_amount + 'Recipient gets': "%s %s" % (data['amount'], 'ETH' if asset == 'Ether' else 'SNT') } for key, expected_value in data_to_check.items(): try: @@ -305,17 +309,6 @@ class TestWalletOneDevice(MultipleSharedDeviceTestCase): self.wallet_view, "%s to %s: Text %s is not shown in the '%s' data container on the Review Bridge screen" % (network_from, network_to, text, name)) - amount_text = container.amount_text - if name == 'from' and amount_text != amount + ' ETH': - self.errors.append( - self.wallet_view, - "%s to %s: amount %s in the 'from' data container doesn't match expected %s ETH" - % (network_from, network_to, amount_text, amount)) - if name == 'to' and not re.findall(r"0.000\d+ ETH", amount_text): - self.errors.append( - self.wallet_view, - "%s to %s: amount %s in the 'to' data container is not a number" - % (network_from, network_to, amount_text)) except TimeoutException: self.errors.append(self.wallet_view, "%s to %s: data '%s' is not shown in Review Bridge screen" % (network_from, network_to, name)) diff --git a/test/appium/views/wallet_view.py b/test/appium/views/wallet_view.py index 5e3880e9af..a36d99dbdb 100644 --- a/test/appium/views/wallet_view.py +++ b/test/appium/views/wallet_view.py @@ -81,7 +81,7 @@ class ActivityElement(BaseElement): class ConfirmationViewInfoContainer(BaseElement): def __init__(self, driver, label_name: str): - self.locator = "//*[@content-desc='summary-%s-label']/following-sibling::android.view.ViewGroup[1]" % label_name + self.locator = "//*[@text='%s']/following-sibling::android.view.ViewGroup[1]" % label_name super().__init__(driver, xpath=self.locator) @property @@ -139,8 +139,9 @@ class WalletView(BaseView): self.amount_input_increase_button = Button(self.driver, accessibility_id='amount-input-inc-button') # Review Send and Review Bridge screens - self.from_data_container = ConfirmationViewInfoContainer(self.driver, label_name='from') - self.to_data_container = ConfirmationViewInfoContainer(self.driver, label_name='to') + self.from_data_container = ConfirmationViewInfoContainer(self.driver, label_name='From') + self.to_data_container = ConfirmationViewInfoContainer(self.driver, label_name='To') + self.on_data_container = ConfirmationViewInfoContainer(self.driver, label_name='On') # Swap flow self.approve_swap_button = Button(self.driver, accessibility_id='Approve') diff --git a/translations/en.json b/translations/en.json index b907650387..19ac9038bf 100644 --- a/translations/en.json +++ b/translations/en.json @@ -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", @@ -1891,7 +1892,6 @@ "on-keycard": "On Keycard", "on-status-tree": "On Status tree", "on-the-web": "On the web", - "on-uppercase": "On", "once-enabled-share-metadata": "Once enabled, links posted in the chat may share your metadata with the site", "one-day": "One day", "one-month": "One month",