Compare commits

...
Author SHA1 Message Date
Yevheniia Berdnyk 767be39673 e2e: fix for collectibles tests 2025-03-04 00:09:00 +02:00
Parvesh Monu 714d966d48 fix Some of the message longtap options disappear until relogin after unmuting chat (#22220) (#22221) 2025-03-04 00:05:41 +05:30
Siddarth Kumar 11d66e5bc2 ci: fix nix-cache-job with nix-export 2025-03-03 15:39:12 +05:30
jakub 9d5f6d0b06 nix: replace yet another openjdk with headless version
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2025-02-27 14:21:18 +01:00
frank 48c83ef759 fix_: no log file (#22122)
* fix_: no log file

https://github.com/status-im/status-go/compare/c5e4eb1a...388fce10

* chore_: fix lint issue

* chore_: set error level for release build

https://github.com/status-im/status-go/compare/c5e4eb1a...ba8fd519
2025-02-27 19:46:28 +08:00
jakub c84fc71bf1 nix: use openjdk_headless to avoid pulling GTK
This saves a whole bunch of downloading.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2025-02-26 18:56:10 +01:00
AlexanderandYevheniia Berdnyk 550602db12 Update send summary to show network in a separate card (#21616) (#22067)
* Update send summary to show network in a separate card (#21616)

* Style updates

* Style updates

* Fixes; test updates

* Fixes

* Fixes

* e2e: updated send summary checks

* Spec fix

* Spec fix

* Small schema update

---------

Co-authored-by: Yevheniia Berdnyk <ie.berdnyk@gmail.com>
2025-02-25 16:20:17 +01:00
Parvesh Monu 5932f7dc99 Fix keycard login flow options while using empty keycard (#22182) 2025-02-25 17:58:48 +05:30
Icaro Motta b89dce3c2a chore(analytics): Integrate Sentry (#21682)
Integrate Sentry and implement a feature flagged feature (disabled by default)
to force crash the app using the function mobile/status.go#IntendedPanic()
provided by status-go. Because the feature is feature flagged and disabled, it
is not available in release builds.

Fixes: https://github.com/status-im/status-mobile/issues/21656

Documentation about Sentry in status-go:
https://github.com/status-im/status-go/blob/3466ac2661bb19cd0eaa27761551de3b4d31b393/internal/sentry/README.md#L60

Areas that may be impacted: Whenever a panic happens in status-go and usage data
collection is enabled we will send error data to Sentry. In theory, nothing
should change for the user, therefore nothing should be visibly different in the
app's behavior.

Steps to test:

Before following the steps below, the CI must be configured with the appropriate
SENTRY_DSN_STATUS_GO value. You can also use a free tier cloud instance to do
your own testing in case you want to play around with Sentry.

1. Login with any profile.
2. Enable usage data collection (for now, Sentry and analytics are tied to the
   same setting in status-go).
3. Go to Settings > Feature flags and enable app-monitoring > intentional-crash
4. Go to Settings > Advanced > and press on Force crash immediately

Usually you should see the error in the Sentry dashboard in a matter of seconds.
2025-02-24 19:28:38 -03:00
Parvesh Monu 8aba451be8 Update keycard Illustrations (#22171) 2025-02-24 20:00:39 +05:30
Icaro Motta 82dd805755 chore(analytics): Allow MixPanel to be configured per env (#21975)
Allows MixPanel to be configured per environment. The hardcoded MixPanel app ID
and token are removed from the code (see the parent issue for more details). The
token can be exploited and that’s by design in most analytics tools
https://developer.mixpanel.com/reference/project-token.

Fixes https://github.com/status-im/status-mobile/issues/21974

Areas that may be impacted

- Analytics
2025-02-24 00:06:59 -03:00
Ulises Manuel 6e30d9faa8 fix(communities): Add missing stats (#22143)
* fix(communities): Stats not shown in discover page
* fix issues in the discover screen related to the theme
2025-02-21 08:40:18 -06:00
Mohsen 070869b705 [#21999] fix: disable manual auto refresh as new endpoint include auto refresh (#22115)
* [#21999] fix: disable manual auto refresh as new endpoint include this logic

* [#21999] fix: move build transaction route to last step

* [#21999] fix: restart swap proposal fetch after approval confirmation

* [#21999] fix: remove redundant event

* [#21999] fix: resolve conflicts

* [#21999] fix: slide button disable issue
2025-02-21 16:39:15 +03:00
frank 9dfa1069e5 feat_: add pre login log (#21987)
* feat_: add pre login log

https://github.com/status-im/status-go/compare/1bfb0cef...7ae58a47

* fix_: pre_login log not get zipped

https://github.com/status-im/status-go/compare/1bfb0cef...c5e4eb1a
2025-02-21 18:42:23 +08:00
Volodymyr Kozieiev 99dd374c87 Quick transaction settings (#22019)
* Quick settings for sending transaction

* Moved to newer status-go, fixed mode saving

https://github.com/status-im/status-go/compare/b2cd7bd8...4b44d6d0

* Fixed non-pressable radio buttons

* Account color applied to controls

* Updated status-go version

https://github.com/status-im/status-go/compare/1bfb0cef...5a796959

* Fixed bug with not applying bridge quick tx setting
2025-02-21 09:46:31 +00:00
Siddarth Kumar bac5ace90a deps: dynamically get gradle-lint version
This commit generates the gradle-lint dependency version according to the rules specified here in hack script :
https://googlesamples.github.io/android-custom-lint-rules/api-guide.html
2025-02-21 11:32:03 +05:30
Yevheniia Berdnyk 34cb7d19e2 e2e: added tests for collectibles 2025-02-21 01:24:44 +02:00
Mohsen a98bbf6a71 [#22029] fix: bridge button when there is single account (#22031)
* [#22029] fix: bridge button when there is single account

* [#22029] fix: trigger start bridge if all condition met

* [#22029] docs: add clarification for bridge flow logic based on account selection
2025-02-19 21:58:11 +03:00
andrey 8116f7a7b1 [#21956] Biometrics are still active after profile migration to keycard 2025-02-19 17:40:27 +01:00
137 changed files with 1553 additions and 996 deletions
+2
View File
@@ -36,3 +36,5 @@ SHOW_NOT_IMPLEMENTED_FEATURES=0
ENABLE_ALERT_BANNER=0 ENABLE_ALERT_BANNER=0
FLAG_WALLET_CONNECT_ENABLED=1 FLAG_WALLET_CONNECT_ENABLED=1
API_LOGGING_ENABLED=1 API_LOGGING_ENABLED=1
SENTRY_ENABLED=0
SENTRY_ENVIRONMENT=ci-main
+2
View File
@@ -40,3 +40,5 @@ ENABLE_ALERT_BANNER=0
FLAG_WALLET_CONNECT_ENABLED=1 FLAG_WALLET_CONNECT_ENABLED=1
MOBILE_DATA_SYNCING_TOGGLE_ENABLE=0 MOBILE_DATA_SYNCING_TOGGLE_ENABLE=0
API_LOGGING_ENABLED=1 API_LOGGING_ENABLED=1
SENTRY_ENABLED=0
SENTRY_ENVIRONMENT=ci-main
+2
View File
@@ -37,3 +37,5 @@ TEST_NETWORKS_ENABLED=1
ENABLE_ALERT_BANNER=1 ENABLE_ALERT_BANNER=1
FLAG_WALLET_CONNECT_ENABLED=1 FLAG_WALLET_CONNECT_ENABLED=1
API_LOGGING_ENABLED=1 API_LOGGING_ENABLED=1
SENTRY_ENABLED=0
SENTRY_ENVIRONMENT=ci-main
+2
View File
@@ -24,3 +24,5 @@ TEST_NETWORKS_ENABLED=0
ENABLE_ALERT_BANNER=1 ENABLE_ALERT_BANNER=1
FLAG_WALLET_CONNECT_ENABLED=1 FLAG_WALLET_CONNECT_ENABLED=1
API_LOGGING_ENABLED=1 API_LOGGING_ENABLED=1
SENTRY_ENABLED=1
SENTRY_ENVIRONMENT=ci-nightly
+3 -1
View File
@@ -2,7 +2,7 @@ DEBUG_WEBVIEW=0
ETHEREUM_DEV_CLUSTER=0 ETHEREUM_DEV_CLUSTER=0
EXTENSIONS=0 EXTENSIONS=0
GROUP_CHATS_ENABLED=1 GROUP_CHATS_ENABLED=1
LOG_LEVEL= LOG_LEVEL=error
MAILSERVER_CONFIRMATIONS_ENABLED=1 MAILSERVER_CONFIRMATIONS_ENABLED=1
MAINNET_WARNING_ENABLED=1 MAINNET_WARNING_ENABLED=1
PFS_ENCRYPTION_ENABLED=1 PFS_ENCRYPTION_ENABLED=1
@@ -21,3 +21,5 @@ TEST_NETWORKS_ENABLED=0
STATUS_PROXY_STAGE_NAME=prod STATUS_PROXY_STAGE_NAME=prod
FLAG_WALLET_CONNECT_ENABLED=1 FLAG_WALLET_CONNECT_ENABLED=1
API_LOGGING_ENABLED=0 API_LOGGING_ENABLED=0
SENTRY_ENABLED=1
SENTRY_ENVIRONMENT=production
+2 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/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. */ /* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild() def isPRBuild = utils.isPRBuild()
@@ -41,6 +41,7 @@ pipeline {
BUILD_ENV = 'prod' BUILD_ENV = 'prod'
NIX_CONF_DIR = "${env.WORKSPACE}/nix" NIX_CONF_DIR = "${env.WORKSPACE}/nix"
FASTLANE_DISABLE_COLORS = 1 FASTLANE_DISABLE_COLORS = 1
SENTRY_PRODUCTION = "${utils.isReleaseBuild() ? 'true' : 'false'}"
} }
stages { stages {
+1 -2
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.18' library 'status-jenkins-lib@v1.9.20'
import groovy.json.JsonBuilder import groovy.json.JsonBuilder
@@ -134,4 +134,3 @@ def updateBucketJSON(urls, fileName) {
writeFile(file: filePath, text: contentJson) writeFile(file: filePath, text: contentJson)
return s5cmd.upload(filePath) return s5cmd.upload(filePath)
} }
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.18' library 'status-jenkins-lib@v1.9.20'
pipeline { pipeline {
agent { label 'linux' } agent { label 'linux' }
+2 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/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. */ /* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild() def isPRBuild = utils.isPRBuild()
@@ -41,6 +41,7 @@ pipeline {
NIX_CONF_DIR = "${env.WORKSPACE}/nix" NIX_CONF_DIR = "${env.WORKSPACE}/nix"
FASTLANE_DISABLE_COLORS = 1 FASTLANE_DISABLE_COLORS = 1
BUNDLE_PATH = "${HOME}/.bundle" BUNDLE_PATH = "${HOME}/.bundle"
SENTRY_PRODUCTION = "${utils.isReleaseBuild() ? 'true' : 'false'}"
} }
stages { stages {
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/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. */ /* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild() def isPRBuild = utils.isPRBuild()
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.13' library 'status-jenkins-lib@v1.9.20'
pipeline { pipeline {
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.13' library 'status-jenkins-lib@v1.9.20'
pipeline { pipeline {
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.13' library 'status-jenkins-lib@v1.9.20'
pipeline { pipeline {
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.13' library 'status-jenkins-lib@v1.9.20'
pipeline { pipeline {
agent { label 'macos' } agent { label 'macos' }
+13 -4
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.13' library 'status-jenkins-lib@v1.9.20'
pipeline { pipeline {
agent { label params.AGENT_LABEL } agent { label params.AGENT_LABEL }
@@ -109,10 +109,19 @@ pipeline {
stage('Upload') { stage('Upload') {
steps { script { steps { script {
sshagent(credentials: ['nix-cache-ssh']) { sshagent(credentials: ['nix-cache-ssh']) {
nix.shell(""" nix.shell(
"""
find /nix/store/ -mindepth 1 -maxdepth 1 -type d \ find /nix/store/ -mindepth 1 -maxdepth 1 -type d \
-not -name '*.links' -and -not -name '*-status-mobile-*' \ -not -name "*.links" -and -not -name "*-status-mobile-*" \
| xargs nix copy --to ${NIX_SSH_REMOTE} -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
""", """,
pure: false pure: false
) )
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.13' library 'status-jenkins-lib@v1.9.20'
pipeline { pipeline {
agent { label 'linux' } agent { label 'linux' }
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.13' library 'status-jenkins-lib@v1.9.20'
pipeline { pipeline {
agent { agent {
@@ -35,6 +35,11 @@ class LogManager(private val reactContext: ReactApplicationContext) : ReactConte
return File(pubDirectory, gethLogFileName) return File(pubDirectory, gethLogFileName)
} }
private fun getPreLoginLogFile(): File {
val pubDirectory = utils.getPublicStorageDirectory()
return File(pubDirectory, preLoginLogFileName)
}
fun prepareLogsFile(context: Context): File? { fun prepareLogsFile(context: Context): File? {
val logFile = getGethLogFile() val logFile = getGethLogFile()
@@ -156,6 +161,7 @@ class LogManager(private val reactContext: ReactApplicationContext) : ReactConte
val statusLogFile = File(logsTempDir, statusLogFileName) val statusLogFile = File(logsTempDir, statusLogFileName)
val gethLogFile = getGethLogFile() val gethLogFile = getGethLogFile()
val requestLogFile = getRequestLogFile() val requestLogFile = getRequestLogFile()
val preLoginLogFile = getPreLoginLogFile()
try { try {
if (zipFile.exists() || zipFile.createNewFile()) { if (zipFile.exists() || zipFile.createNewFile()) {
@@ -175,6 +181,9 @@ class LogManager(private val reactContext: ReactApplicationContext) : ReactConte
if (requestLogFile.exists()) { if (requestLogFile.exists()) {
filesToZip.add(requestLogFile) filesToZip.add(requestLogFile)
} }
if (preLoginLogFile.exists()) {
filesToZip.add(preLoginLogFile)
}
val zipped = zip(filesToZip.toTypedArray(), zipFile, errorList) val zipped = zip(filesToZip.toTypedArray(), zipFile, errorList)
if (zipped && zipFile.exists()) { if (zipped && zipFile.exists()) {
zipFile.setReadable(true, false) zipFile.setReadable(true, false)
@@ -205,6 +214,7 @@ class LogManager(private val reactContext: ReactApplicationContext) : ReactConte
private const val gethLogFileName = "geth.log" private const val gethLogFileName = "geth.log"
private const val statusLogFileName = "Status.log" private const val statusLogFileName = "Status.log"
private const val requestsLogFileName = "api.log" private const val requestsLogFileName = "api.log"
private const val preLoginLogFileName = "pre_login.log"
private const val logsZipFileName = "Status-debug-logs.zip" private const val logsZipFileName = "Status-debug-logs.zip"
} }
} }
@@ -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 @ReactMethod
fun addCentralizedMetric(request: String, callback: Callback) { fun addCentralizedMetric(request: String, callback: Callback) {
StatusBackendClient.executeStatusGoRequestWithCallback( StatusBackendClient.executeStatusGoRequestWithCallback(
@@ -35,6 +35,7 @@ RCT_EXPORT_METHOD(sendLogs:(NSString *)dbJson
NSURL *mainGethLogsFile = [rootUrl URLByAppendingPathComponent:@"geth.log"]; NSURL *mainGethLogsFile = [rootUrl URLByAppendingPathComponent:@"geth.log"];
NSURL *mainLogsFile = [logsFolderName URLByAppendingPathComponent:@"geth.log"]; NSURL *mainLogsFile = [logsFolderName URLByAppendingPathComponent:@"geth.log"];
NSURL *preLoginLogFile = [rootUrl URLByAppendingPathComponent:@"pre_login.log"];
NSURL *requestsLogFile = [rootUrl URLByAppendingPathComponent:@"api.log"]; NSURL *requestsLogFile = [rootUrl URLByAppendingPathComponent:@"api.log"];
@@ -47,6 +48,10 @@ RCT_EXPORT_METHOD(sendLogs:(NSString *)dbJson
[fileManager copyItemAtPath:requestsLogFile.path toPath:[logsFolderName URLByAppendingPathComponent:@"api.log"].path error:nil]; [fileManager copyItemAtPath:requestsLogFile.path toPath:[logsFolderName URLByAppendingPathComponent:@"api.log"].path error:nil];
} }
if ([fileManager fileExistsAtPath:preLoginLogFile.path]) {
[fileManager copyItemAtPath:preLoginLogFile.path toPath:[logsFolderName URLByAppendingPathComponent:@"pre_login.log"].path error:nil];
}
[SSZipArchive createZipFileAtPath:zipFile.path withContentsOfDirectory:logsFolderName.path]; [SSZipArchive createZipFileAtPath:zipFile.path withContentsOfDirectory:logsFolderName.path];
[fileManager removeItemAtPath:logsFolderName.path error:nil]; [fileManager removeItemAtPath:logsFolderName.path error:nil];
@@ -109,6 +109,17 @@ RCT_EXPORT_METHOD(getNodeConfig:(RCTResponseSenderBlock)callback) {
callback: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) { RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(fleets) {
return [StatusBackendClient executeStatusGoRequestWithResult:@"Fleets" return [StatusBackendClient executeStatusGoRequestWithResult:@"Fleets"
body:@"" body:@""
+15 -2
View File
@@ -6,6 +6,7 @@ readonly FOOJAY_FALLBACK="0.5.0"
readonly KOTLIN_FALLBACK="1.8.0" readonly KOTLIN_FALLBACK="1.8.0"
readonly TOOLS_FALLBACK="3.5.4" readonly TOOLS_FALLBACK="3.5.4"
readonly HERMES_FALLBACK="0.73.5" readonly HERMES_FALLBACK="0.73.5"
readonly GRADLE_LINT_FALLBACK="31.1.1"
GIT_ROOT=$(cd "${BASH_SOURCE%/*}" && git rev-parse --show-toplevel) GIT_ROOT=$(cd "${BASH_SOURCE%/*}" && git rev-parse --show-toplevel)
cd "${GIT_ROOT}" cd "${GIT_ROOT}"
@@ -25,16 +26,28 @@ get_version() {
echo "$version" echo "$version"
} }
# https://github.com/googlesamples/android-custom-lint-rules/blob/be672cd747ecf13844918e1afccadb935f856a72/docs/api-guide/example.md.html#L112-L129
get_gradle_lint_version() {
gradlePluginVersion=$(get_version "./nix/pkgs/aapt2/default.nix" "version =" $GRADLE_LINT_FALLBACK)
major=$(echo "$gradlePluginVersion" | grep -o "^[0-9]*")
# lintVersion = gradlePluginVersion + 23.0.0
major=$((major + 23))
minor=$(echo "$gradlePluginVersion" | grep -o "\.[0-9]*\." | grep -o "[0-9]*")
patch=$(echo "$gradlePluginVersion" | grep -o "[0-9]*$")
echo "$major.$minor.$patch"
}
foojay_version=$(get_version "./node_modules/@react-native/gradle-plugin/settings.gradle.kts" "foojay.*version" "$FOOJAY_FALLBACK") foojay_version=$(get_version "./node_modules/@react-native/gradle-plugin/settings.gradle.kts" "foojay.*version" "$FOOJAY_FALLBACK")
kotlin_version=$(get_version "./node_modules/@react-native/gradle-plugin/gradle/libs.versions.toml" "kotlin =" "$KOTLIN_FALLBACK") kotlin_version=$(get_version "./node_modules/@react-native/gradle-plugin/gradle/libs.versions.toml" "kotlin =" "$KOTLIN_FALLBACK")
tools_version=$(get_version "./patches/BlurView-build.gradle.patch" "gradle:" "$TOOLS_FALLBACK") tools_version=$(get_version "./patches/BlurView-build.gradle.patch" "gradle:" "$TOOLS_FALLBACK")
hermes_version=$(get_version "./node_modules/react-native/ReactAndroid/gradle.properties" "VERSION_NAME" "$HERMES_FALLBACK") hermes_version=$(get_version "./node_modules/react-native/ReactAndroid/gradle.properties" "VERSION_NAME" "$HERMES_FALLBACK")
lint_version=$(get_gradle_lint_version)
cat << EOF cat << EOF
org.gradle.toolchains.foojay-resolver-convention:org.gradle.toolchains.foojay-resolver-convention.gradle.plugin:$foojay_version org.gradle.toolchains.foojay-resolver-convention:org.gradle.toolchains.foojay-resolver-convention.gradle.plugin:$foojay_version
org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:$kotlin_version org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:$kotlin_version
com.android.tools.build:gradle:$tools_version com.android.tools.build:gradle:$tools_version
com.facebook.react:hermes-android:$hermes_version com.facebook.react:hermes-android:$hermes_version
com.android.tools.lint:lint-gradle:31.1.1 com.android.tools.lint:lint-gradle:$lint_version
EOF EOF
+1 -1
View File
@@ -71,7 +71,7 @@ in stdenv.mkDerivation rec {
}; };
}; };
buildInputs = with pkgs; [ nodejs openjdk ]; buildInputs = with pkgs; [ nodejs openjdk_headless ];
nativeBuildInputs = with pkgs; [ bash gradle unzip ] nativeBuildInputs = with pkgs; [ bash gradle unzip ]
++ lib.optionals stdenv.isDarwin [ file gnumake ]; ++ lib.optionals stdenv.isDarwin [ file gnumake ];
+1 -1
View File
@@ -8,7 +8,7 @@ rec {
shell = mkShell { shell = mkShell {
buildInputs = with pkgs; [ buildInputs = with pkgs; [
openjdk openjdk_headless
gradle gradle
lsof # used in start-react-native.sh lsof # used in start-react-native.sh
flock # used in nix/scripts/node_modules.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]; buildInputs = with pkgs; [ clojure nodejs bash git openjdk_headless ];
phases = [ phases = [
"unpackPhase" "secretsPhase" "patchPhase" "unpackPhase" "secretsPhase" "patchPhase"
"configurePhase" "buildPhase" "installPhase" "configurePhase" "buildPhase" "installPhase"
+1 -1
View File
@@ -49,7 +49,7 @@ in {
nodejs = super.nodejs_20; nodejs = super.nodejs_20;
ruby = super.ruby_3_1; ruby = super.ruby_3_1;
yarn = super.yarn.override { nodejs = super.nodejs_20; }; yarn = super.yarn.override { nodejs = super.nodejs_20; };
openjdk = super.openjdk17_headless; openjdk_headless = super.openjdk17_headless;
xcodeWrapper = callPackage ./pkgs/xcodeenv/compose-xcodewrapper.nix { } { xcodeWrapper = callPackage ./pkgs/xcodeenv/compose-xcodewrapper.nix { } {
versions = ["16.0" "16.1" "16.2"]; versions = ["16.0" "16.1" "16.2"];
}; };
+1
View File
@@ -10,6 +10,7 @@ let
pname = "aapt2"; pname = "aapt2";
# Warning: This must be the same as gradlePluginVersion android/gradle.properties # Warning: This must be the same as gradlePluginVersion android/gradle.properties
# also referenced in nix/deps/gradle/deps_hack.sh
version = "8.1.1-10154469"; version = "8.1.1-10154469";
pkgPath = "com/android/tools/build/aapt2"; pkgPath = "com/android/tools/build/aapt2";
+2 -2
View File
@@ -1,8 +1,8 @@
{ mkShell, openjdk, androidPkgs }: { mkShell, openjdk_headless, androidPkgs }:
mkShell { mkShell {
name = "android-sdk-shell"; name = "android-sdk-shell";
buildInputs = [ openjdk ]; buildInputs = [ openjdk_headless ];
shellHook = '' shellHook = ''
export ANDROID_HOME="${androidPkgs.sdk}" export ANDROID_HOME="${androidPkgs.sdk}"
+2 -2
View File
@@ -19,7 +19,7 @@ let
# for calling clojure targets in CI or Makefile # for calling clojure targets in CI or Makefile
clojure = mkShell { clojure = mkShell {
buildInputs = with pkgs; [ buildInputs = with pkgs; [
clojure flock maven openjdk clojure flock maven openjdk_headless
# lint specific utilities # lint specific utilities
babashka clj-kondo clojure-lsp ripgrep zprint babashka clj-kondo clojure-lsp ripgrep zprint
]; ];
@@ -61,7 +61,7 @@ let
# for 'scripts/generate-keystore.sh' # for 'scripts/generate-keystore.sh'
keytool = mkShell { keytool = mkShell {
buildInputs = with pkgs; [ openjdk apksigner ]; buildInputs = with pkgs; [ openjdk_headless apksigner ];
}; };
# for targets needing 'adb', 'apkanalyzer' and other SDK/NDK tools # for targets needing 'adb', 'apkanalyzer' and other SDK/NDK tools
+6 -2
View File
@@ -1,5 +1,5 @@
{ callPackage, lib, buildGoPackage, pkgs { callPackage, lib, buildGoPackage, pkgs
, androidPkgs, openjdk, gomobile, xcodeWrapper, removeReferencesTo , androidPkgs, openjdk_headless, gomobile, xcodeWrapper, removeReferencesTo
, go-bindata, mockgen, protobuf3_20, protoc-gen-go , go-bindata, mockgen, protobuf3_20, protoc-gen-go
, meta , meta
, source , source
@@ -32,7 +32,7 @@ in buildGoPackage rec {
extraSrcPaths = [ gomobile ]; extraSrcPaths = [ gomobile ];
nativeBuildInputs = [ nativeBuildInputs = [
gomobile removeReferencesTo go-bindata mockgen protoc-gen-go protobuf3_20 fakeGit gomobile removeReferencesTo go-bindata mockgen protoc-gen-go protobuf3_20 fakeGit
] ++ optional isAndroid openjdk ] ++ optional isAndroid openjdk_headless
++ optional isIOS xcodeWrapper; ++ optional isIOS xcodeWrapper;
ldflags = goBuildLdFlags; ldflags = goBuildLdFlags;
@@ -48,6 +48,10 @@ in buildGoPackage rec {
# TODO: try removing when go is upgraded to 1.22 # TODO: try removing when go is upgraded to 1.22
GODEBUG = "netdns=cgo+2"; GODEBUG = "netdns=cgo+2";
# Sentry for status-go
SENTRY_CONTEXT_NAME = "status-mobile";
SENTRY_CONTEXT_VERSION = version;
preBuild = '' preBuild = ''
echo 'Generate static files' echo 'Generate static files'
pushd go/src/$goPackagePath pushd go/src/$goPackagePath
Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 KiB

After

Width:  |  Height:  |  Size: 235 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 345 KiB

After

Width:  |  Height:  |  Size: 441 KiB

+2 -1
View File
@@ -45,8 +45,9 @@ SECRETS_ENV_VARS=(
'INFURA_TOKEN_SECRET' 'INFURA_TOKEN_SECRET'
'OPENSEA_API_KEY' 'OPENSEA_API_KEY'
'MIXPANEL_APP_ID' 'MIXPANEL_APP_ID'
'MIXPANEL_TOKEN' 'MIXPANEL_APP_TOKEN'
'POKT_TOKEN' 'POKT_TOKEN'
'SENTRY_DSN_STATUS_GO'
) )
# Secrets like this can't be passed via args or they end up in derivation. # Secrets like this can't be passed via args or they end up in derivation.
+9 -3
View File
@@ -77,8 +77,13 @@
#shadow/env "STATUS_BACKEND_SERVER_IMAGE_SERVER_URI_PREFIX" #shadow/env "STATUS_BACKEND_SERVER_IMAGE_SERVER_URI_PREFIX"
status-im.config/STATUS_BACKEND_SERVER_ROOT_DATA_DIR #shadow/env status-im.config/STATUS_BACKEND_SERVER_ROOT_DATA_DIR #shadow/env
"STATUS_BACKEND_SERVER_ROOT_DATA_DIR" "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_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/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_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/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/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_USER #shadow/env "STATUS_BUILD_PROXY_USER"
status-im.config/STATUS_BUILD_PROXY_PASSWORD #shadow/env "STATUS_BUILD_PROXY_PASSWORD" 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/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"
status-im.config/MIXPANEL_APP_ID #shadow/env "MIXPANEL_APP_ID" 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_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/RARIBLE_TESTNET_API_KEY #shadow/env "RARIBLE_TESTNET_API_KEY"
status-im.config/ALCHEMY_ETHEREUM_MAINNET_TOKEN #shadow/env "ALCHEMY_ETHEREUM_MAINNET_TOKEN" 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/INFURA_TOKEN #shadow/env "INFURA_TOKEN"
status-im.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY" 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_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_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/RARIBLE_TESTNET_API_KEY #shadow/env "RARIBLE_TESTNET_API_KEY"
status-im.config/ALCHEMY_ETHEREUM_MAINNET_TOKEN #shadow/env "ALCHEMY_ETHEREUM_MAINNET_TOKEN" status-im.config/ALCHEMY_ETHEREUM_MAINNET_TOKEN #shadow/env "ALCHEMY_ETHEREUM_MAINNET_TOKEN"
+28 -6
View File
@@ -2,19 +2,41 @@
(:require (:require
[legacy.status-im.multiaccounts.update.core :as multiaccounts.update] [legacy.status-im.multiaccounts.update.core :as multiaccounts.update]
[re-frame.core :as re-frame] [re-frame.core :as re-frame]
[taoensso.timbre :as log]
[utils.i18n :as i18n] [utils.i18n :as i18n]
[utils.re-frame :as rf])) [utils.re-frame :as rf]))
(rf/defn save-log-level (rf/defn save-log-level
{:events [:log-level.ui/change-log-level-confirmed]} {: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])] (let [old-log-level (get-in db [:profile/profile :log-level])]
(when (not= old-log-level log-level) (when (not= old-log-level log-level)
(multiaccounts.update/multiaccount-update (let [need-set-log-enabled? (or (empty? old-log-level) (empty? log-level))
cofx log-enabled? (boolean (seq log-level))
:log-level rpc-calls (cond-> []
log-level log-enabled?
{:on-success #(re-frame/dispatch [:profile/logout])})))) (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 (rf/defn show-change-log-level-confirmation
{:events [:log-level.ui/log-level-selected]} {:events [:log-level.ui/log-level-selected]}
@@ -1,10 +1,13 @@
(ns legacy.status-im.ui.screens.advanced-settings.views (ns legacy.status-im.ui.screens.advanced-settings.views
(:require (:require
[clojure.string :as string]
[legacy.status-im.ui.components.core :as components] [legacy.status-im.ui.components.core :as components]
[legacy.status-im.ui.components.list.item :as list.item] [legacy.status-im.ui.components.list.item :as list.item]
[legacy.status-im.ui.components.list.views :as list] [legacy.status-im.ui.components.list.views :as list]
[quo.core :as quo] [quo.core :as quo]
[re-frame.core :as re-frame] [re-frame.core :as re-frame]
[status-im.config :as config]
[status-im.feature-flags :as ff]
[utils.i18n :as i18n] [utils.i18n :as i18n]
[utils.re-frame :as rf]) [utils.re-frame :as rf])
(:require-macros [legacy.status-im.utils.views :as views])) (:require-macros [legacy.status-im.utils.views :as views]))
@@ -17,7 +20,16 @@
peer-syncing-enabled?]}] peer-syncing-enabled?]}]
(keep (keep
identity 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) :title (i18n/label :t/log-level)
:accessibility-label :log-level-settings-button :accessibility-label :log-level-settings-button
:on-press :on-press
@@ -33,6 +33,9 @@
name]]]])) name]]]]))
(def log-levels (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" [{:name "DISABLED"
:value ""} :value ""}
{:name "ERROR" {:name "ERROR"
@@ -42,9 +45,7 @@
{:name "INFO" {:name "INFO"
:value "INFO"} :value "INFO"}
{:name "DEBUG" {:name "DEBUG"
:value "DEBUG"} :value "DEBUG"}])
{:name "TRACE"
:value "TRACE"}])
(views/defview log-level-settings (views/defview log-level-settings
[] []
+4
View File
@@ -569,3 +569,7 @@
(.createAccountFromPrivateKey ^js (account-manager) (.createAccountFromPrivateKey ^js (account-manager)
(types/clj->json {:privateKey private-key}) (types/clj->json {:privateKey private-key})
callback))) callback)))
(defn intended-panic
[message]
(.intendedPanic ^js (status) message))
@@ -55,7 +55,7 @@
[rn/view (style/card-view-chat-icon 48 theme) [rn/view (style/card-view-chat-icon 48 theme)
[icon/community-icon {:images images} 48]] [icon/community-icon {:images images} 48]]
(when (= status :gated) (when (= status :gated)
[rn/view (style/permission-tag-styles) [rn/view style/permission-tag-styles
[community-view/permission-tag-container [community-view/permission-tag-container
{:locked? locked? {:locked? locked?
:status status :status status
@@ -63,10 +63,12 @@
[community-view/community-title [community-view/community-title
{:title name {:title name
:description description}] :description description}]
[rn/view {:style (style/card-stats-position)} [rn/view {:style style/card-stats-position}
[community-view/community-stats-column [community-view/community-stats-column
{:type :card-view}]] {:type :card-view
[rn/view {:style (style/community-tags-position)} :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}]]]]]])) [community-view/community-tags {:tags tags}]]]]]]))
(defn view (defn view
@@ -60,7 +60,7 @@
:style {:border-radius 12 :style {:border-radius 12
:margin-left 12}} :margin-left 12}}
props) props)
[rn/view (merge (style/membership-info-container) style) [rn/view (merge style/membership-info-container style)
[community-icon/community-icon [community-icon/community-icon
{:images images} 32] {:images images} 32]
[rn/view [rn/view
@@ -11,11 +11,8 @@
[react-native.gesture :as gesture])) [react-native.gesture :as gesture]))
(defn community-stats-column (defn community-stats-column
[{:keys [type members-count active-count]}] [{:keys [type members-count active-members-count]}]
[rn/view [rn/view (if (= type :card-view) style/card-stats-container style/list-stats-container)
(if (= type :card-view)
(style/card-stats-container)
(style/list-stats-container))
[community-stat/view [community-stat/view
{:accessibility-label :stats-members-count {:accessibility-label :stats-members-count
:icon :i/group :icon :i/group
@@ -24,7 +21,7 @@
[community-stat/view [community-stat/view
{:accessibility-label :stats-active-count {:accessibility-label :stats-active-count
:icon :i/active-members :icon :i/active-members
:value active-count}]]) :value active-members-count}]])
(defn community-tags (defn community-tags
[{:keys [tags container-style last-item-style]}] [{:keys [tags container-style last-item-style]}]
+12 -14
View File
@@ -17,24 +17,20 @@
(def detail-container (def detail-container
{:flex 1}) {:flex 1})
(defn card-stats-container (def card-stats-container
[]
{:flex-direction :row}) {:flex-direction :row})
(defn list-stats-container (def list-stats-container
[]
{:flex-direction :row {:flex-direction :row
:align-items :center}) :align-items :center})
(defn card-stats-position (def card-stats-position
[]
{:position :absolute {:position :absolute
:top 116 :top 116
:right 12 :right 12
:left 12}) :left 12})
(defn community-tags-position (def community-tags-position
[]
{:position :absolute {:position :absolute
:top 154 :top 154
:right 12 :right 12
@@ -68,8 +64,7 @@
colors/neutral-90 colors/neutral-90
theme)}) theme)})
(defn membership-info-container (def membership-info-container
[]
{:flex-direction :row {:flex-direction :row
:border-radius 16 :border-radius 16
:align-items :center :align-items :center
@@ -87,8 +82,7 @@
:border-top-left-radius 20 :border-top-left-radius 20
:background-color colors/primary-50-opa-20}) :background-color colors/primary-50-opa-20})
(defn permission-tag-styles (def permission-tag-styles
[]
{:position :absolute {:position :absolute
:top 8 :top 8
:right 8}) :right 8})
@@ -146,10 +140,14 @@
:background-color (colors/theme-colors colors/white colors/neutral-90 theme)}) :background-color (colors/theme-colors colors/white colors/neutral-90 theme)})
(def loading-tags-container (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 (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 (defn loading-stat-circle
[theme margin-left] [theme margin-left]
@@ -14,48 +14,43 @@
(h/describe "Wallet: Summary Info" (h/describe "Wallet: Summary Info"
(h/test "Type of `status-account` title renders" (h/test "Type of `status-account` title renders"
(h/render-with-theme-provider [summary-info/view (h/render-with-theme-provider [summary-info/view
{:type :status-account {:type :status-account
:networks? true :networks-to-show {:ethereum 150
:values {:ethereum 150 :optimism 50
:optimism 50 :arbitrum 25}
:arbitrum 25} :account-props status-account-props}])
:account-props status-account-props}])
(h/is-truthy (h/get-by-text "Collectibles vault"))) (h/is-truthy (h/get-by-text "Collectibles vault")))
(h/test "Type of `user` title renders" (h/test "Type of `user` title renders"
(h/render-with-theme-provider [summary-info/view (h/render-with-theme-provider [summary-info/view
{:type :user {:type :user
:networks? true :networks-to-show {:ethereum 150
:values {:ethereum 150 :optimism 50
:optimism 50 :arbitrum 25}
:arbitrum 25} :account-props {:full-name "M L"
:account-props {:full-name "M L" :status-indicator? false
:status-indicator? false :size :small
:size :small :customization-color :blue
:customization-color :blue :name "Mark Libot"
:name "Mark Libot" :address "0x0ah...78b"
:address "0x0ah...78b" :status-account (merge status-account-props
:status-account (merge status-account-props {:size 16})}}])
{:size 16})}}])
(h/is-truthy (h/get-by-text "Mark Libot")) (h/is-truthy (h/get-by-text "Mark Libot"))
(h/is-truthy (h/get-by-text "Collectibles vault"))) (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 (h/render-with-theme-provider [summary-info/view
{:type :status-account {:type :status-account
:networks? true :networks-to-show {:ethereum 150
:values {:ethereum 150 :optimism 50
:optimism 50 :arbitrum 25}
:arbitrum 25} :account-props status-account-props}])
:account-props status-account-props}]) (h/is-truthy (h/get-by-label-text :networks))))
(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 (h/render-with-theme-provider [summary-info/view
{:type :status-account {:type :network
:networks? false :network-props {:full-name "Ethereum"
:values {:ethereum 150 :network-name :ethereum}}])
:optimism 50 (h/is-truthy (h/get-by-text "Ethereum"))))
:arbitrum 25}
:account-props status-account-props}])
(h/is-null (h/query-by-label-text :networks))))
@@ -5,9 +5,9 @@
[:catn [:catn
[:props [:props
[:map [: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]] [:account-props {:optional true} [:maybe :map]]
[:network-props {:optional true} [:maybe :map]]
[:token-props {:optional true} [:maybe :map]] [:token-props {:optional true} [:maybe :map]]
[:networks? {:optional true} [:maybe :boolean]] [:networks-to-show {:optional true} [:maybe :map]]]]]
[:values {:optional true} [:maybe :map]]]]]
:any]) :any])
@@ -3,13 +3,13 @@
[quo.foundations.colors :as colors])) [quo.foundations.colors :as colors]))
(defn container (defn container
[networks? theme] [networks-to-show? theme]
{:width "100%" {:width "100%"
:height (if networks? 90 56) :height (if networks-to-show? 90 56)
:border-radius 16 :border-radius 16
:border-width 1 :border-width 1
:border-color (colors/theme-colors colors/neutral-10 colors/neutral-80 theme) :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 (def info-container
{:flex-direction :row {:flex-direction :row
@@ -39,3 +39,7 @@
:height 32 :height 32
:flex-direction :row :flex-direction :row
:align-items :center}) :align-items :center})
(def network-icon
{:width 32
:height 32})
@@ -28,50 +28,35 @@
[rn/view [rn/view
{:style (style/dot-divider theme)}])]) {:style (style/dot-divider theme)}])])
(def ^:private default-token-symbols
{:ethereum "ETH"
:optimism "OP"
:arbitrum "ARB"
:base "ETH"})
(defn networks (defn networks
[values theme] [networks-to-show theme]
(let [{:keys [ethereum optimism arbitrum base]} values (->> networks-to-show
show-optimism? (and optimism (map-indexed
(or (pos? (:amount optimism)) (fn [i [k {:keys [amount token-symbol]}]]
(= (:amount optimism) "<0.01"))) (when (or (pos? amount)
show-arbitrum? (and arbitrum (= amount "<0.01"))
(or (pos? (:amount arbitrum)) [network-amount
(= (:amount arbitrum) "<0.01"))) {:network k
show-base? (and base :amount (str amount " " (or token-symbol (get default-token-symbols k)))
(or (pos? (:amount base)) :divider? (not= (dec i) (-> networks-to-show keys count))
(= (:amount base) "<0.01")))] :theme theme}])))
[rn/view (remove nil?)
{:style style/networks-container (into [rn/view
:accessibility-label :networks} {:style style/networks-container
(when (and ethereum (pos? (:amount ethereum))) :accessibility-label :networks}])))
[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 (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) (let [theme (quo.theme/use-theme)
address (or (:address account-props) (:address token-props))] address (or (:address account-props) (:address token-props))]
[rn/view [rn/view
{:style (style/container networks? theme)} {:style (style/container (seq? networks-to-show) theme)}
[rn/view [rn/view
{:style style/info-container} {:style style/info-container}
(case type (case type
@@ -82,16 +67,26 @@
(assoc account-props (assoc account-props
:size :size-32 :size :size-32
:neutral? true)] :neutral? true)]
:network [rn/image
{:source (resources/get-network (:network-name network-props))
:style style/network-icon}]
[user-avatar/user-avatar account-props]) [user-avatar/user-avatar account-props])
[rn/view {:style {:margin-left 8}} [rn/view {:style {:margin-left 8}}
(when (not= type :account) (when (not (some #{type} [:account :network]))
[text/text {:weight :semi-bold} (or (:name account-props) (:label token-props))]) [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 [rn/view
{:style {:flex-direction :row {:style {:flex-direction :row
:align-items :center}} :align-items :center}}
(when (= type :user) (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 [text/text
{:size :paragraph-2 {:size :paragraph-2
:style {:color (colors/theme-colors colors/neutral-50 colors/neutral-40 theme)}} :style {:color (colors/theme-colors colors/neutral-50 colors/neutral-40 theme)}}
@@ -105,10 +100,10 @@
:style {:color (when (not= type :account) :style {:color (when (not= type :account)
(colors/theme-colors colors/neutral-50 colors/neutral-40 theme))}} (colors/theme-colors colors/neutral-50 colors/neutral-40 theme))}}
address])]]] address])]]]
(when networks? (when networks-to-show
[:<> [:<>
[rn/view [rn/view
{:style (style/line-divider theme)}] {:style (style/line-divider theme)}]
[networks values theme]])])) [networks networks-to-show theme]])]))
(def view (schema/instrument #'view-internal summary-info-schema/?schema)) (def view (schema/instrument #'view-internal summary-info-schema/?schema))
@@ -0,0 +1,8 @@
(ns status-im.common.app-monitoring.effects
(:require
[native-module.core :as native-module]
[utils.re-frame :as rf]))
(rf/reg-fx :effects.app-monitoring/intended-panic
(fn [message]
(native-module/intended-panic message)))
@@ -0,0 +1,8 @@
(ns status-im.common.app-monitoring.events
(:require
status-im.common.app-monitoring.effects
[utils.re-frame :as rf]))
(rf/reg-event-fx :app-monitoring/intended-panic
(fn [_ [message]]
{:fx [[:effects.app-monitoring/intended-panic message]]}))
+10
View File
@@ -26,9 +26,19 @@
:qr-code (js/require "../resources/images/ui2/qr-code.png") :qr-code (js/require "../resources/images/ui2/qr-code.png")
:keycard-logo (js/require "../resources/images/ui2/keycard-logo.png") :keycard-logo (js/require "../resources/images/ui2/keycard-logo.png")
:keycard-buy (js/require "../resources/images/ui2/keycard-buy.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 (js/require "../resources/images/ui2/keycard-migration.png")
:keycard-migration-failed (js/require "../resources/images/ui2/keycard-migration-failed.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-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") :not-keycard (js/require "../resources/images/ui2/not-keycard.png")
:discover (js/require "../resources/images/ui2/discover.png") :discover (js/require "../resources/images/ui2/discover.png")
:invite-friends (js/require "../resources/images/ui2/invite-friends.png") :invite-friends (js/require "../resources/images/ui2/invite-friends.png")
+16 -3
View File
@@ -26,11 +26,11 @@
(goog-define ALCHEMY_BASE_MAINNET_TOKEN "") (goog-define ALCHEMY_BASE_MAINNET_TOKEN "")
(goog-define ALCHEMY_BASE_SEPOLIA_TOKEN "") (goog-define ALCHEMY_BASE_SEPOLIA_TOKEN "")
(goog-define WALLET_CONNECT_PROJECT_ID "87815d72a81d739d2a7ce15c2cfdefb3") (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_USER "")
(goog-define STATUS_BUILD_ETH_RPC_PROXY_PASSWORD "") (goog-define STATUS_BUILD_ETH_RPC_PROXY_PASSWORD "")
(goog-define STATUS_BUILD_ETH_RPC_PROXY_URL "") (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 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)) (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-link "https://opensea.io")
(def opensea-tesnet-link "https://testnets.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-app-id MIXPANEL_APP_ID)
(def mixpanel-token MIXPANEL_TOKEN) (def mixpanel-token MIXPANEL_APP_TOKEN)
(def opensea-api-key OPENSEA_API_KEY) (def opensea-api-key OPENSEA_API_KEY)
(def status-proxy-enabled? true) (def status-proxy-enabled? true)
@@ -136,3 +144,8 @@
(def re-frisk-host (get-config :RE_FRISK_HOST "localhost")) (def re-frisk-host (get-config :RE_FRISK_HOST "localhost"))
(def re-frisk-port (get-config :RE_FRISK_PORT "4567")) (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)
+3
View File
@@ -443,7 +443,10 @@
(def ^:const wallet-account-name-max-length 20) (def ^:const wallet-account-name-max-length 20)
(def ^:const gas-rate-low 0)
(def ^:const gas-rate-medium 1) (def ^:const gas-rate-medium 1)
(def ^:const gas-rate-high 2)
(def ^:const gas-rate-custom 3)
(def ^:const send-type-transfer 0) (def ^:const send-type-transfer 0)
(def ^:const send-type-bridge 5) (def ^:const send-type-bridge 5)
(def ^:const send-type-erc-721-transfer 6) (def ^:const send-type-erc-721-transfer 6)
+2 -1
View File
@@ -275,7 +275,8 @@
{:events [:chat/unmute-chat-community]} {:events [:chat/unmute-chat-community]}
[{:keys [db]} chat-id] [{:keys [db]} chat-id]
(let [{:keys [community-id]} (get-in db [:chats chat-id])] (let [{:keys [community-id]} (get-in db [:chats chat-id])]
{:db (assoc-in db [:communities community-id :muted] false)})) (when community-id
{:db (assoc-in db [:communities community-id :muted] false)})))
(rf/defn mute-chat-failed (rf/defn mute-chat-failed
{:events [:chat/mute-failed]} {:events [:chat/mute-failed]}
@@ -18,7 +18,9 @@
:params [{:id request-to-join-id}] :params [{:id request-to-join-id}]
:on-success #(rf/dispatch [:communities/cancel-request-to-join-success %]) :on-success #(rf/dispatch [:communities/cancel-request-to-join-success %])
:js-response true :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 (rf/reg-event-fx :communities/left
(fn [_ [response-js]] (fn [_ [response-js]]
@@ -34,8 +34,7 @@
(defn screen-title (defn screen-title
[] []
[rn/view [rn/view {:style (style/screen-title-container (safe-area/get-top))}
{:style (style/screen-title-container (safe-area/get-top))}
[quo/text [quo/text
{:accessibility-label :communities-screen-title {:accessibility-label :communities-screen-title
:weight :semi-bold :weight :semi-bold
@@ -95,14 +94,14 @@
(defn featured-list (defn featured-list
[communities view-type] [communities view-type]
(let [view-size (reagent/atom 0) (let [view-size (reagent/atom 0)
loaded? (and communities (pos? (count communities)))] set-view-size (fn [e]
(reset! view-size (- (oops/oget e "nativeEvent.layout.width") 40)))
loaded? (and communities (pos? (count communities)))]
(fn [] (fn []
[rn/view [rn/view
{:style style/featured-list-container {:style style/featured-list-container
:on-layout #(swap! view-size :on-layout set-view-size}
(fn [_]
(- (oops/oget % "nativeEvent.layout.width") 40)))}
(when-not (= @view-size 0) (when-not (= @view-size 0)
[rn/flat-list [rn/flat-list
{:key-fn :id {:key-fn :id
@@ -132,32 +131,29 @@
[discover-communities-segments selected-tab false]]) [discover-communities-segments selected-tab false]])
(defn other-communities-list (defn other-communities-list
[{:keys [communities communities-ids view-type]}] [{:keys [communities view-type]}]
[rn/view {:style style/other-communities-container} [rn/view {:style style/other-communities-container}
(if (and communities (pos? (count communities))) (if (seq communities)
(map-indexed (map-indexed (fn [inner-index {community-id :id :as community}]
(fn [inner-index item] (let [cover {:uri (-> community :images :banner :uri)}]
(let [community-id (when communities-ids item) [rn/view
community (if communities {:key (str inner-index community-id)
item :style {:margin-bottom 16}}
(rf/sub [:communities/home-item community-id])) (if (= view-type :card-view)
cover {:uri (get-in (:images item) [:banner :uri])}] [quo/community-card-view-item
[rn/view {:community (assoc community
{:key (str inner-index (:id community)) :cover cover
:margin-bottom 16} :members-count (count (:members community)))
(if (= view-type :card-view) :on-press #(rf/dispatch [:communities/navigate-to-community-overview
[quo/community-card-view-item community-id])}]
{:community (assoc community :cover cover) [quo/community-list
:on-press #(rf/dispatch [:communities/navigate-to-community-overview (:id community)])}] {:on-press (fn []
(rf/dispatch [:dismiss-keyboard])
[quo/community-list (rf/dispatch [:communities/navigate-to-community-overview
{:on-press (fn [] community-id]))
(rf/dispatch [:dismiss-keyboard]) :on-long-press #(js/alert "TODO: to be implemented")}
(rf/dispatch [:communities/navigate-to-community-overview community])]))
(:id community)])) communities)
:on-long-press #(js/alert "TODO: to be implemented")}
community])]))
(if communities communities communities-ids))
[:<> [:<>
[rn/view {:margin-bottom 16} [quo/community-card-view-item {:loading? true}]] [rn/view {:margin-bottom 16} [quo/community-card-view-item {:loading? true}]]
[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}} [rn/view {:style {:flex 1}}
(case @selected-tab (case @selected-tab
:all :all
(other-communities-list {:communities (rf/sub [:communities/other-contract-communities]) [other-communities-list
:view-type view-type}) {:communities (rf/sub [:communities/other-contract-communities])
:view-type view-type}]
:open :open
[:<>] [:<>]
@@ -183,60 +180,55 @@
(i18n/label :t/error)])]) (i18n/label :t/error)])])
(defn render-communities (defn render-communities
[selected-tab [{:keys [selected-tab featured-communities-count featured-communities view-type]}]
featured-communities-count [rn/view
featured-communities [discover-communities-header
view-type] {:selected-tab selected-tab
(fn [] :view-type view-type
[rn/view :featured-communities-count featured-communities-count
[discover-communities-header :featured-communities featured-communities}]
{:selected-tab selected-tab [communities-lists selected-tab view-type]])
:view-type view-type
:featured-communities-count featured-communities-count
:featured-communities featured-communities}]
[communities-lists selected-tab view-type]]))
(defn render-sticky-header (defn render-sticky-header
[{:keys [selected-tab scroll-height]}] [{:keys [selected-tab scroll-height]}]
(fn [] (when (> @scroll-height 360)
(when (> @scroll-height 360) [rn/view
[rn/view {:style (style/blur-tabs-header (safe-area/get-top))}
{:style (style/blur-tabs-header (safe-area/get-top))} [discover-communities-segments selected-tab true]]))
[discover-communities-segments selected-tab true]])))
(defn discover-screen-content (defn discover-screen-content
[featured-communities theme] []
(let [view-type (reagent/atom :card-view) (let [view-type (reagent/atom :card-view)
selected-tab (reagent/atom :all) selected-tab (reagent/atom :all)
scroll-height (reagent/atom 0) scroll-height (reagent/atom 0)]
featured-communities-count (count featured-communities)]
(fn [] (fn []
[scroll-page/scroll-page (let [theme (quo.theme/use-theme)
{:on-scroll #(reset! scroll-height %) featured-communities (rf/sub [:communities/featured-contract-communities])
:page-nav-props {:background :blur} featured-communities-count (count featured-communities)]
:navigate-back? :true [scroll-page/scroll-page
:height (if (> @scroll-height 360) {:on-scroll #(reset! scroll-height %)
208 :page-nav-props {:background :blur}
148) :navigate-back? :true
:background-color (colors/theme-colors colors/white colors/neutral-95 theme) :height (if (> @scroll-height 360)
:sticky-header [render-sticky-header 208
{:selected-tab selected-tab 148)
:scroll-height scroll-height}]} :background-color (colors/theme-colors colors/white colors/neutral-95 theme)
:sticky-header [render-sticky-header
[render-communities {:selected-tab selected-tab
selected-tab :scroll-height scroll-height}]}
featured-communities-count [render-communities
featured-communities {:selected-tab selected-tab
@view-type]]))) :featured-communities-count featured-communities-count
:featured-communities featured-communities
:view-type @view-type}]]))))
(defn view (defn view
[] []
(let [theme (quo.theme/use-theme) (let [theme (quo.theme/use-theme)]
featured-communities (rf/sub [:communities/featured-contract-communities])]
(rn/use-mount #(rf/dispatch [:fetch-contract-communities])) (rn/use-mount #(rf/dispatch [:fetch-contract-communities]))
[rn/view [rn/view
{:style (style/discover-screen-container (colors/theme-colors {:style (style/discover-screen-container (colors/theme-colors
colors/white colors/white
colors/neutral-95 colors/neutral-95
theme))} theme))}
[discover-screen-content featured-communities theme]])) [discover-screen-content]]))
+17 -11
View File
@@ -15,10 +15,10 @@
:on-press events-helper/navigate-back}] :on-press events-helper/navigate-back}]
[quo/page-top [quo/page-top
{:title (i18n/label :t/ready-add-keypair-keycard)}] {:title (i18n/label :t/ready-add-keypair-keycard)}]
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}} [rn/image
[rn/image {:resize-mode :contain
{:resize-mode :contain :style {:flex 1 :width (:width (rn/get-window))}
:source (resources/get-image :keycard-migration)}]] :source (resources/get-image :keycard-migration)}]
[common.view/tips] [common.view/tips]
[quo/bottom-actions [quo/bottom-actions
{:actions :one-action {:actions :one-action
@@ -33,8 +33,11 @@
:on-press events-helper/navigate-back}] :on-press events-helper/navigate-back}]
[quo/page-top [quo/page-top
{:title (i18n/label :t/backup-keycard-created)}] {:title (i18n/label :t/backup-keycard-created)}]
[rn/view {:style {:flex 1}}] [rn/image
[rn/view {:style {:padding-horizontal 20}} {: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} [quo/button {:on-press events-helper/navigate-back}
(i18n/label :t/done)]]]) (i18n/label :t/done)]]])
@@ -49,7 +52,10 @@
{:title (i18n/label :t/keycard-not-empty) {:title (i18n/label :t/keycard-not-empty)
:description :text :description :text
:description-text (i18n/label :t/scan-empty-keycard)}] :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] [common.view/tips]
[rn/view {:style {:padding-horizontal 20}} [rn/view {:style {:padding-horizontal 20}}
[quo/button {:on-press on-press} [quo/button {:on-press on-press}
@@ -65,10 +71,10 @@
{:title (i18n/label :t/scan-empty-keycard) {:title (i18n/label :t/scan-empty-keycard)
:description :text :description :text
:description-text (i18n/label :t/backup-empty-keycard-only)}] :description-text (i18n/label :t/backup-empty-keycard-only)}]
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}} [rn/image
[rn/image {:resize-mode :contain
{:resize-mode :contain :style {:flex 1 :width (:width (rn/get-window))}
:source (resources/get-image :check-your-keycard)}]] :source (resources/get-image :check-your-keycard)}]
[common.view/tips] [common.view/tips]
[quo/bottom-actions [quo/bottom-actions
{:actions :one-action {:actions :one-action
@@ -2,6 +2,7 @@
(:require [quo.core :as quo] (:require [quo.core :as quo]
[react-native.core :as rn] [react-native.core :as rn]
[status-im.common.events-helper :as events-helper] [status-im.common.events-helper :as events-helper]
[status-im.common.resources :as resources]
[status-im.contexts.keycard.common.view :as common.view] [status-im.contexts.keycard.common.view :as common.view]
[utils.i18n :as i18n] [utils.i18n :as i18n]
[utils.re-frame :as rf])) [utils.re-frame :as rf]))
@@ -32,9 +33,10 @@
:on-press events-helper/navigate-back}] :on-press events-helper/navigate-back}]
[quo/page-top [quo/page-top
{:title (i18n/label :t/ready-to-change-pin)}] {:title (i18n/label :t/ready-to-change-pin)}]
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}} [rn/image
[rn/image {:resize-mode :contain
{:resize-mode :contain}]] :style {:flex 1 :width (:width (rn/get-window))}
:source (resources/get-image :keycard-change-pin)}]
[common.view/tips] [common.view/tips]
[quo/bottom-actions [quo/bottom-actions
{:actions :one-action {:actions :one-action
@@ -52,9 +54,10 @@
{:title (i18n/label :t/keycard-pin-changed) {:title (i18n/label :t/keycard-pin-changed)
:description :text :description :text
:description-text (i18n/label :t/keycard-pin-changed-description)}] :description-text (i18n/label :t/keycard-pin-changed-description)}]
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}} [rn/image
[rn/image {:resize-mode :contain
{:resize-mode :contain}]] :style {:flex 1 :width (:width (rn/get-window))}
:source (resources/get-image :keycard-change-pin-positive)}]
[quo/bottom-actions [quo/bottom-actions
{:actions :one-action {:actions :one-action
:button-one-label (i18n/label :t/done) :button-one-label (i18n/label :t/done)
@@ -70,9 +73,10 @@
{:title (i18n/label :t/keycard-pin-change-failed) {:title (i18n/label :t/keycard-pin-change-failed)
:description :text :description :text
:description-text (i18n/label :t/keycard-pin-change-failed-description)}] :description-text (i18n/label :t/keycard-pin-change-failed-description)}]
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}} [rn/image
[rn/image {:resize-mode :contain
{:resize-mode :contain}]] :style {:flex 1 :width (:width (rn/get-window))}
:source (resources/get-image :keycard-change-pin-negative)}]
[common.view/tips] [common.view/tips]
[quo/bottom-actions [quo/bottom-actions
{:actions :one-action {:actions :one-action
@@ -42,10 +42,10 @@
{:title (i18n/label :t/check-keycard) {:title (i18n/label :t/check-keycard)
:description :text :description :text
:description-text (i18n/label :t/see-keycard-ready)}] :description-text (i18n/label :t/see-keycard-ready)}]
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}} [rn/image
[rn/image {:resize-mode :contain
{:resize-mode :contain :style {:flex 1 :width (:width (rn/get-window))}
:source (resources/get-image :check-your-keycard)}]] :source (resources/get-image :check-your-keycard)}]
[common.view/tips] [common.view/tips]
[quo/bottom-actions [quo/bottom-actions
{:actions :one-action {:actions :one-action
@@ -2,6 +2,7 @@
(:require [quo.core :as quo] (:require [quo.core :as quo]
[react-native.core :as rn] [react-native.core :as rn]
[status-im.common.events-helper :as events-helper] [status-im.common.events-helper :as events-helper]
[status-im.common.resources :as resources]
[utils.i18n :as i18n])) [utils.i18n :as i18n]))
(defn view (defn view
@@ -14,8 +15,11 @@
{:title (i18n/label :t/different-keycard) {:title (i18n/label :t/different-keycard)
:description :text :description :text
:description-text (i18n/label :t/scan-previous-keycard)}] :description-text (i18n/label :t/scan-previous-keycard)}]
[rn/view {:style {:flex 1}}] [rn/image
[rn/view {:style {:padding-horizontal 20}} {: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} [quo/button {:on-press events-helper/navigate-back}
(i18n/label :t/try-again)]]]) (i18n/label :t/try-again)]]])
+26 -15
View File
@@ -23,6 +23,7 @@
(defn view (defn view
[] []
(let [error (rf/sub [:keycard/application-info-error]) (let [error (rf/sub [:keycard/application-info-error])
logged-in? (rf/sub [:multiaccount/logged-in?])
{:keys [title description]} (get titles error)] {:keys [title description]} (get titles error)]
[:<> [:<>
[quo/page-nav [quo/page-nav
@@ -37,21 +38,31 @@
[quo/section-label [quo/section-label
{:section (i18n/label :t/what-you-can-do) :container-style {:padding-vertical 8}}] {:section (i18n/label :t/what-you-can-do) :container-style {:padding-vertical 8}}]
(if (= error :keycard/error.keycard-empty) (if (= error :keycard/error.keycard-empty)
[quo/settings-item (if logged-in?
{:title (i18n/label :t/use-backup-keycard) [quo/settings-item
:image :icon {:title (i18n/label :t/use-backup-keycard)
:image-props :i/placeholder :image :icon
:action :arrow :image-props :i/placeholder
:description :text :action :arrow
:description-props {:text (i18n/label :t/create-backup-profile-keycard)} :description :text
:on-press (fn [] :description-props {:text (i18n/label :t/create-backup-profile-keycard)}
(rf/dispatch [:show-bottom-sheet :on-press (fn []
{:content (rf/dispatch [:show-bottom-sheet
(fn [] {:content
[backup.view/sheet (fn []
{:on-continue [backup.view/sheet
(rf/dispatch {:on-continue
[:keycard/backup.create-or-enter-pin])}])}]))}] (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) (when (or (= error :keycard/error.keycard-frozen)
(= error :keycard/error.keycard-locked)) (= error :keycard/error.keycard-locked))
@@ -2,6 +2,7 @@
(:require [quo.core :as quo] (:require [quo.core :as quo]
[react-native.core :as rn] [react-native.core :as rn]
[status-im.common.events-helper :as events-helper] [status-im.common.events-helper :as events-helper]
[status-im.common.resources :as resources]
[utils.i18n :as i18n] [utils.i18n :as i18n]
[utils.re-frame :as rf])) [utils.re-frame :as rf]))
@@ -48,8 +49,11 @@
{:title (i18n/label :t/keycard-reset-success) {:title (i18n/label :t/keycard-reset-success)
:description :text :description :text
:description-text (i18n/label :t/keycard-empty-ready)}] :description-text (i18n/label :t/keycard-empty-ready)}]
[rn/view {:style {:flex 1}}] [rn/image
[rn/view {:style {:padding-horizontal 20}} {: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} [quo/button {:on-press events-helper/navigate-back}
(i18n/label :t/done)]]]) (i18n/label :t/done)]]])
@@ -61,8 +65,11 @@
:on-press events-helper/navigate-back}] :on-press events-helper/navigate-back}]
[quo/page-top [quo/page-top
{:title (i18n/label :t/keycard-reset-failed)}] {:title (i18n/label :t/keycard-reset-failed)}]
[rn/view {:style {:flex 1}}] [rn/image
[rn/view {:style {:padding-horizontal 20}} {: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} [quo/button {:on-press events-helper/navigate-back}
(i18n/label :t/try-again)]]]) (i18n/label :t/try-again)]]])
@@ -19,10 +19,10 @@
:profile-picture profile-picture :profile-picture profile-picture
:customization-color customization-color} :customization-color customization-color}
:container-style {:margin-top constants/page-nav-height}}] :container-style {:margin-top constants/page-nav-height}}]
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}} [rn/image
[rn/image {:resize-mode :contain
{:resize-mode :contain :style {:flex 1 :width (:width (rn/get-window))}
:source (resources/get-image :keycard-migration-failed)}]] :source (resources/get-image :keycard-migration-failed)}]
[quo/divider-label (i18n/label :t/what-you-can-do)] [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-1)}]
[quo/markdown-list {:description (i18n/label :t/keycard-migration-failed-instruction-2)}] [quo/markdown-list {:description (i18n/label :t/keycard-migration-failed-instruction-2)}]
@@ -27,5 +27,7 @@
:callback :callback
(fn [{:keys [error]}] (fn [{:keys [error]}]
(if (string/blank? error) (if (string/blank? error)
(rf/dispatch [:navigate-to :screen/keycard.migrate.success]) (do
(rf/dispatch [:biometric/disable])
(rf/dispatch [:navigate-to :screen/keycard.migrate.success]))
(rf/dispatch [:navigate-to :screen/keycard.migrate.fail])))}]]}))) (rf/dispatch [:navigate-to :screen/keycard.migrate.fail])))}]]})))
@@ -21,7 +21,7 @@
:container-style {:margin-top constants/page-nav-height}}] :container-style {:margin-top constants/page-nav-height}}]
[quo/text {:style {:padding-horizontal 20}} [quo/text {:style {:padding-horizontal 20}}
(i18n/label :t/do-not-quit)] (i18n/label :t/do-not-quit)]
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}} [rn/image
[rn/image {:resize-mode :contain
{:resize-mode :contain :style {:flex 1 :width (:width (rn/get-window))}
:source (resources/get-image :keycard-migration)}]]])) :source (resources/get-image :keycard-migration)}]]))
@@ -21,11 +21,11 @@
:container-style {:margin-top constants/page-nav-height}}] :container-style {:margin-top constants/page-nav-height}}]
[quo/text {:style {:padding-horizontal 20}} [quo/text {:style {:padding-horizontal 20}}
(i18n/label :t/use-keycard-for-status)] (i18n/label :t/use-keycard-for-status)]
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}} [rn/image
[rn/image {:resize-mode :contain
{:resize-mode :contain :style {:flex 1 :width (:width (rn/get-window))}
:source (resources/get-image :keycard-migration-succeeded)}]] :source (resources/get-image :keycard-migration-succeeded)}]
[quo/button [quo/button
{:on-press #(rf/dispatch [:profile/logout]) {:on-press #(rf/dispatch [:profile/logout])
:container-style {:margin-horizontal 20}} :container-style {:margin-horizontal 20 :margin-vertical 12}}
(i18n/label :t/logout)]])) (i18n/label :t/logout)]]))
@@ -23,10 +23,10 @@
:context-tag {:full-name profile-name :context-tag {:full-name profile-name
:profile-picture profile-picture :profile-picture profile-picture
:customization-color customization-color}}] :customization-color customization-color}}]
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}} [rn/image
[rn/image {:resize-mode :contain
{:resize-mode :contain :style {:flex 1 :width (:width (rn/get-window))}
:source (resources/get-image :keycard-migration)}]] :source (resources/get-image :keycard-migration)}]
[common.view/tips] [common.view/tips]
[quo/bottom-actions [quo/bottom-actions
{:actions :one-action {:actions :one-action
@@ -15,10 +15,10 @@
{:title (i18n/label :t/oops-not-keycard) {:title (i18n/label :t/oops-not-keycard)
:description :text :description :text
:description-text (i18n/label :t/make-sure-keycard)}] :description-text (i18n/label :t/make-sure-keycard)}]
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}} [rn/image
[rn/image {:resize-mode :contain
{:resize-mode :contain :style {:flex 1 :width (:width (rn/get-window))}
:source (resources/get-image :not-keycard)}]] :source (resources/get-image :not-keycard)}]
[rn/view {:style {:padding-horizontal 20}} [rn/view {:style {:padding-horizontal 20 :padding-vertical 12}}
[quo/button {:on-press events-helper/navigate-back} [quo/button {:on-press events-helper/navigate-back}
(i18n/label :t/try-again)]]]) (i18n/label :t/try-again)]]])
@@ -2,6 +2,7 @@
(:require [quo.core :as quo] (:require [quo.core :as quo]
[react-native.core :as rn] [react-native.core :as rn]
[status-im.common.events-helper :as events-helper] [status-im.common.events-helper :as events-helper]
[status-im.common.resources :as resources]
[status-im.contexts.keycard.common.view :as common.view] [status-im.contexts.keycard.common.view :as common.view]
[utils.i18n :as i18n] [utils.i18n :as i18n]
[utils.re-frame :as rf])) [utils.re-frame :as rf]))
@@ -13,9 +14,14 @@
{:icon-name :i/close {:icon-name :i/close
:on-press events-helper/navigate-back}] :on-press events-helper/navigate-back}]
[quo/page-top [quo/page-top
{:title (i18n/label :t/keycard-unblocked)}] {:title (i18n/label :t/keycard-unblocked)
[rn/view {:style {:flex 1}}] :description :text
[rn/view {:style {:padding-horizontal 20}} :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} [quo/button {:on-press events-helper/navigate-back}
(i18n/label :t/done)]]]) (i18n/label :t/done)]]])
@@ -27,7 +33,10 @@
:on-press events-helper/navigate-back}] :on-press events-helper/navigate-back}]
[quo/page-top [quo/page-top
{:title (i18n/label :t/ready-to-unblock-keycard)}] {: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] [common.view/tips]
[quo/bottom-actions [quo/bottom-actions
{:actions :one-action {:actions :one-action
@@ -12,17 +12,15 @@
:options [{:key :status-account} :options [{:key :status-account}
{:key :user} {:key :user}
{:key :saved-account} {:key :saved-account}
{:key :account}]} {:key :account}]}])
{:key :networks? :type :boolean}])
(defn view (defn view
[] []
(let [state (reagent/atom {:type :status-account (let [state (reagent/atom {:type :status-account
:networks? true :networks-to-show {:ethereum {:amount 150}
:values {:ethereum {:amount 150} :optimism {:amount 50}
:optimism {:amount 50} :arbitrum {:amount 25}}})
:arbitrum {:amount 25}}})
status-account-props {:customization-color :purple status-account-props {:customization-color :purple
:size 32 :size 32
:emoji "🍑" :emoji "🍑"

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