Compare commits

..
Author SHA1 Message Date
Mohamed Javid 73d5cb24f8 fix(wallet)_: Address or ENS - Paste button behaviour
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2025-03-04 17:32:03 +05:30
Mohamed JavidandYevheniia Berdnyk 614eeafde9 feat(wallet)_: Add base chain indicator (#22215)
* feat(wallet)_: Add base chain indicator

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>

* e2e: updated Base network name

---------

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
Co-authored-by: Yevheniia Berdnyk <ie.berdnyk@gmail.com>
2025-03-03 20:24:22 +00:00
Parvesh Monu 1dc4ea3a51 fix Some of the message longtap options disappear until relogin after unmuting chat (#22220) 2025-03-03 22:54:25 +05:30
dbef1c9edc Fix slide-button not resetting (#22210)
* nix: use openjdk_headless to avoid pulling GTK

This saves a whole bunch of downloading.

Signed-off-by: Jakub Sokołowski <jakub@status.im>

* 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

* nix: replace yet another openjdk with headless version

Signed-off-by: Jakub Sokołowski <jakub@status.im>

* fix: moved slide-button reset from standard-auth to quo

---------

Signed-off-by: Jakub Sokołowski <jakub@status.im>
Co-authored-by: Jakub Sokołowski <jakub@status.im>
Co-authored-by: frank <lovefree103@gmail.com>
2025-03-03 10:46:40 +00:00
Mohsen 4853cde20b [#22206] fix: swap proposal keep sending update either after clean up (#22212) 2025-03-03 10:28:20 +00:00
Volodymyr Kozieiev 4c5f3282c4 Incorporated latest changes in status-go release branch
https://github.com/status-im/status-go/compare/c5e4eb1a...595dc68e
2025-02-28 14:54:17 +00:00
frank 376493b0b3 fix_: no log file (#22201) 2025-02-27 14:33:24 +00:00
Ulises Manuel 886f7b43d1 fix(keycard): light theme on "ready to scan" sheet (#22196) 2025-02-27 13:39:34 +00:00
Volodymyr Kozieiev c8c785f136 Switched to udpated release status-go branch. Log-related changes.
https://github.com/status-im/status-go/compare/c5e4eb1a...927f0c2b
2025-02-27 12:20:24 +00:00
Volodymyr Kozieiev b2602ba15e _TEMPORARY_ enabled all logging in release for testing purposes (#22192) 2025-02-26 11:36:41 +00:00
Volodymyr Kozieiev 4b0a983d68 swtiched to status-go version v10.7.0
https://github.com/status-im/status-go/compare/c5e4eb1a...6935cf11
2025-02-26 10:35:02 +00:00
Volodymyr Kozieiev af5c613cc0 Bump version to 2.33.0 2025-02-26 09:34:52 +00: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
179 changed files with 2038 additions and 1628 deletions
+2
View File
@@ -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
+2
View File
@@ -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
+2
View File
@@ -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
+2
View File
@@ -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
+4 -2
View File
@@ -2,7 +2,7 @@ DEBUG_WEBVIEW=0
ETHEREUM_DEV_CLUSTER=0
EXTENSIONS=0
GROUP_CHATS_ENABLED=1
LOG_LEVEL=
LOG_LEVEL=debug
MAILSERVER_CONFIRMATIONS_ENABLED=1
MAINNET_WARNING_ENABLED=1
PFS_ENCRYPTION_ENABLED=1
@@ -20,4 +20,6 @@ FAST_CREATE_COMMUNITY_ENABLED=0
TEST_NETWORKS_ENABLED=0
STATUS_PROXY_STAGE_NAME=prod
FLAG_WALLET_CONNECT_ENABLED=1
API_LOGGING_ENABLED=0
API_LOGGING_ENABLED=1
SENTRY_ENABLED=1
SENTRY_ENVIRONMENT=production
+1 -1
View File
@@ -1 +1 @@
2.32.0
2.33.0
+2 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.18'
library 'status-jenkins-lib@v1.9.20'
/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()
@@ -41,6 +41,7 @@ pipeline {
BUILD_ENV = 'prod'
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
FASTLANE_DISABLE_COLORS = 1
SENTRY_PRODUCTION = "${utils.isReleaseBuild() ? 'true' : 'false'}"
}
stages {
+1 -2
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.18'
library 'status-jenkins-lib@v1.9.20'
import groovy.json.JsonBuilder
@@ -134,4 +134,3 @@ def updateBucketJSON(urls, fileName) {
writeFile(file: filePath, text: contentJson)
return s5cmd.upload(filePath)
}
+1 -1
View File
@@ -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' }
+2 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.18'
library 'status-jenkins-lib@v1.9.20'
/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()
@@ -41,6 +41,7 @@ pipeline {
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
FASTLANE_DISABLE_COLORS = 1
BUNDLE_PATH = "${HOME}/.bundle"
SENTRY_PRODUCTION = "${utils.isReleaseBuild() ? 'true' : 'false'}"
}
stages {
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.18'
library 'status-jenkins-lib@v1.9.20'
/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.13'
library 'status-jenkins-lib@v1.9.20'
pipeline {
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.13'
library 'status-jenkins-lib@v1.9.20'
pipeline {
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.13'
library 'status-jenkins-lib@v1.9.20'
pipeline {
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.13'
library 'status-jenkins-lib@v1.9.20'
pipeline {
agent { label 'macos' }
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.13'
library 'status-jenkins-lib@v1.9.20'
pipeline {
agent { label params.AGENT_LABEL }
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.13'
library 'status-jenkins-lib@v1.9.20'
pipeline {
agent { label 'linux' }
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.13'
library 'status-jenkins-lib@v1.9.20'
pipeline {
agent {
@@ -35,6 +35,11 @@ class LogManager(private val reactContext: ReactApplicationContext) : ReactConte
return File(pubDirectory, gethLogFileName)
}
private fun getPreLoginLogFile(): File {
val pubDirectory = utils.getPublicStorageDirectory()
return File(pubDirectory, preLoginLogFileName)
}
fun prepareLogsFile(context: Context): File? {
val logFile = getGethLogFile()
@@ -156,6 +161,7 @@ class LogManager(private val reactContext: ReactApplicationContext) : ReactConte
val statusLogFile = File(logsTempDir, statusLogFileName)
val gethLogFile = getGethLogFile()
val requestLogFile = getRequestLogFile()
val preLoginLogFile = getPreLoginLogFile()
try {
if (zipFile.exists() || zipFile.createNewFile()) {
@@ -175,6 +181,9 @@ class LogManager(private val reactContext: ReactApplicationContext) : ReactConte
if (requestLogFile.exists()) {
filesToZip.add(requestLogFile)
}
if (preLoginLogFile.exists()) {
filesToZip.add(preLoginLogFile)
}
val zipped = zip(filesToZip.toTypedArray(), zipFile, errorList)
if (zipped && zipFile.exists()) {
zipFile.setReadable(true, false)
@@ -205,6 +214,7 @@ class LogManager(private val reactContext: ReactApplicationContext) : ReactConte
private const val gethLogFileName = "geth.log"
private const val statusLogFileName = "Status.log"
private const val requestsLogFileName = "api.log"
private const val preLoginLogFileName = "pre_login.log"
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
fun addCentralizedMetric(request: String, callback: Callback) {
StatusBackendClient.executeStatusGoRequestWithCallback(
@@ -35,6 +35,7 @@ RCT_EXPORT_METHOD(sendLogs:(NSString *)dbJson
NSURL *mainGethLogsFile = [rootUrl URLByAppendingPathComponent:@"geth.log"];
NSURL *mainLogsFile = [logsFolderName URLByAppendingPathComponent:@"geth.log"];
NSURL *preLoginLogFile = [rootUrl URLByAppendingPathComponent:@"pre_login.log"];
NSURL *requestsLogFile = [rootUrl URLByAppendingPathComponent:@"api.log"];
@@ -46,6 +47,10 @@ RCT_EXPORT_METHOD(sendLogs:(NSString *)dbJson
if ([fileManager fileExistsAtPath:requestsLogFile.path]) {
[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];
[fileManager removeItemAtPath:logsFolderName.path error:nil];
@@ -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:@""
+15 -2
View File
@@ -6,6 +6,7 @@ readonly FOOJAY_FALLBACK="0.5.0"
readonly KOTLIN_FALLBACK="1.8.0"
readonly TOOLS_FALLBACK="3.5.4"
readonly HERMES_FALLBACK="0.73.5"
readonly GRADLE_LINT_FALLBACK="31.1.1"
GIT_ROOT=$(cd "${BASH_SOURCE%/*}" && git rev-parse --show-toplevel)
cd "${GIT_ROOT}"
@@ -25,16 +26,28 @@ get_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")
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")
hermes_version=$(get_version "./node_modules/react-native/ReactAndroid/gradle.properties" "VERSION_NAME" "$HERMES_FALLBACK")
lint_version=$(get_gradle_lint_version)
cat << EOF
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
com.android.tools.build:gradle:$tools_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
+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 ]
++ lib.optionals stdenv.isDarwin [ file gnumake ];
+1 -1
View File
@@ -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
+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 = [
"unpackPhase" "secretsPhase" "patchPhase"
"configurePhase" "buildPhase" "installPhase"
+1 -1
View File
@@ -49,7 +49,7 @@ in {
nodejs = super.nodejs_20;
ruby = super.ruby_3_1;
yarn = super.yarn.override { nodejs = super.nodejs_20; };
openjdk = super.openjdk17_headless;
openjdk_headless = super.openjdk17_headless;
xcodeWrapper = callPackage ./pkgs/xcodeenv/compose-xcodewrapper.nix { } {
versions = ["16.0" "16.1" "16.2"];
};
+1
View File
@@ -10,6 +10,7 @@ let
pname = "aapt2";
# 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";
pkgPath = "com/android/tools/build/aapt2";
+2 -2
View File
@@ -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}"
+2 -2
View File
@@ -19,7 +19,7 @@ let
# for calling clojure targets in CI or Makefile
clojure = mkShell {
buildInputs = with pkgs; [
clojure flock maven openjdk
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
+6 -2
View File
@@ -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
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'
'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.
+9 -3
View File
@@ -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"
+28 -6
View File
@@ -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]}
@@ -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
@@ -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
[]
+4
View File
@@ -569,3 +569,7 @@
(.createAccountFromPrivateKey ^js (account-manager)
(types/clj->json {:privateKey private-key})
callback)))
(defn intended-panic
[message]
(.intendedPanic ^js (status) message))
@@ -1,15 +1,15 @@
(ns quo.components.buttons.slide-button.constants)
(def track-padding 4)
(def small-dimensions
(def ^:constant small-dimensions
{:track-height 40
:thumb 32})
(def large-dimensions
(def ^:constant large-dimensions
{:track-height 48
:thumb 40})
(def disable-opacity 0.3)
(def ^:constant track-padding 4)
(def ^:constant disable-opacity 0.3)
(def ^:constant default-width 300)
(def default-width 300)
(def ^:constant reset-timeout-ms 500)
@@ -27,7 +27,8 @@
(when (and reached-end? (not sliding-complete?))
(set-sliding-complete true)
(when on-complete
(on-complete reset-fn))))))
(js/setTimeout reset-fn constants/reset-timeout-ms)
(on-complete))))))
(gesture/on-end (fn [event]
(let [x-translation (oops/oget event "translationX")
reached-end? (>= x-translation track-width)]
@@ -55,10 +56,9 @@
on-track-layout (rn/use-callback
#(set-track-width (oops/oget % "nativeEvent.layout.width")))
reset-fn (rn/use-callback
(fn [keep-at-end-after-slide?]
(fn []
(set-sliding-complete false)
(when-not keep-at-end-after-slide?
(animations/reset-track-position x-pos))))
(animations/reset-track-position x-pos)))
dimensions (rn/use-callback
(partial utils/get-dimensions
(or track-width constants/default-width)
@@ -0,0 +1,13 @@
(ns quo.components.common.new-feature-dot
(:require [quo.components.common.new-feature-gradient :as new-feature-gradient]))
(def ^:const size 8)
(defn view
[{:keys [style accessibility-label]}]
[new-feature-gradient/view
{:style (merge {:width size
:height size
:border-radius (/ size 2)}
style)
:accessibility-label accessibility-label}])
@@ -0,0 +1,16 @@
(ns quo.components.common.new-feature-gradient
(:require [quo.foundations.colors :as colors]
[quo.theme]
[react-native.linear-gradient :as linear-gradient]))
(defn view
[{:keys [style accessibility-label]}]
(let [theme (quo.theme/use-theme)]
[linear-gradient/linear-gradient
{:style style
:accessibility-label accessibility-label
:colors [(colors/resolve-color :yellow theme)
colors/new-feature-gradient-pink]
:use-angle true
:angle 78
:angle-center {:x 0.5 :y 0.5}}]))
@@ -55,7 +55,7 @@
[rn/view (style/card-view-chat-icon 48 theme)
[icon/community-icon {:images images} 48]]
(when (= status :gated)
[rn/view (style/permission-tag-styles)
[rn/view style/permission-tag-styles
[community-view/permission-tag-container
{:locked? locked?
:status status
@@ -63,10 +63,12 @@
[community-view/community-title
{:title name
:description description}]
[rn/view {:style (style/card-stats-position)}
[rn/view {:style style/card-stats-position}
[community-view/community-stats-column
{:type :card-view}]]
[rn/view {:style (style/community-tags-position)}
{:type :card-view
:members-count (:members-count community)
:active-members-count (:active-members-count community)}]]
[rn/view {:style style/community-tags-position}
[community-view/community-tags {:tags tags}]]]]]]))
(defn view
@@ -60,7 +60,7 @@
:style {:border-radius 12
:margin-left 12}}
props)
[rn/view (merge (style/membership-info-container) style)
[rn/view (merge style/membership-info-container style)
[community-icon/community-icon
{:images images} 32]
[rn/view
@@ -11,11 +11,8 @@
[react-native.gesture :as gesture]))
(defn community-stats-column
[{:keys [type members-count active-count]}]
[rn/view
(if (= type :card-view)
(style/card-stats-container)
(style/list-stats-container))
[{:keys [type members-count active-members-count]}]
[rn/view (if (= type :card-view) style/card-stats-container style/list-stats-container)
[community-stat/view
{:accessibility-label :stats-members-count
:icon :i/group
@@ -24,7 +21,7 @@
[community-stat/view
{:accessibility-label :stats-active-count
:icon :i/active-members
:value active-count}]])
:value active-members-count}]])
(defn community-tags
[{:keys [tags container-style last-item-style]}]
+12 -14
View File
@@ -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]
@@ -33,4 +33,12 @@
networks-list])
(h/is-truthy (h/query-by-label-text :network-dropdown))
(h/fire-event :press (h/query-by-label-text :network-dropdown))
(h/was-not-called on-press))))
(h/was-not-called on-press)))
(h/test "Should display new chain indicator"
(h/render [network-dropdown/view
{:state :default
:show-new-chain-indicator? true}
networks-list])
(h/is-truthy (h/query-by-label-text :network-dropdown))
(h/is-truthy (h/query-by-label-text :new-chain-indicator))))
@@ -23,3 +23,7 @@
:opacity (if (= state :disabled) 0.3 1)
:border-color (container-border-color props)
:align-items :center})
(def new-chain-indicator
{:position :absolute
:right 0})
@@ -1,12 +1,13 @@
(ns quo.components.dropdowns.network-dropdown.view
(:require
[quo.components.common.new-feature-dot :as new-feature-dot]
[quo.components.dropdowns.network-dropdown.style :as style]
[quo.components.list-items.preview-list.view :as preview-list]
[quo.theme :as quo.theme]
[react-native.core :as rn]))
(defn view
[{:keys [on-press state] :as props} networks]
[{:keys [on-press state show-new-chain-indicator?] :as props} networks]
(let [theme (quo.theme/use-theme)
[pressed? set-pressed] (rn/use-state false)
on-press-in (rn/use-callback #(set-pressed true))
@@ -18,6 +19,10 @@
:on-press on-press
:on-press-in on-press-in
:on-press-out on-press-out}
(when show-new-chain-indicator?
[new-feature-dot/view
{:style style/new-chain-indicator
:accessibility-label :new-chain-indicator}])
[preview-list/view
{:type :network
:list-size (count networks)
@@ -200,12 +200,15 @@
shown-name]]))
(defn- wallet-networks-center
[{:keys [networks networks-on-press background center-content-container-style]}]
[{:keys [networks networks-on-press show-new-chain-indicator? background
center-content-container-style]}]
[reanimated/view {:style center-content-container-style}
[network-dropdown/view
{:state :default
:on-press networks-on-press
:blur? (= background :blur)} networks]])
{:state :default
:on-press networks-on-press
:blur? (= background :blur)
:show-new-chain-indicator? show-new-chain-indicator?}
networks]])
(defn page-nav
"Props:
@@ -64,3 +64,20 @@
{:margin-top 7
:margin-bottom 2
:margin-left -1})
(def new-feature-tag-container
{:margin-left 6
:border-radius 12
:justify-content :center})
(def new-feature-tag-gradient
{:border-radius 12
:position :absolute
:left 0
:right 0
:top 0
:bottom 0})
(def new-feature-tag-text
{:color colors/white
:margin-horizontal 5})
@@ -4,6 +4,7 @@
[quo.components.avatars.icon-avatar :as icon-avatar]
[quo.components.avatars.user-avatar.view :as user-avatar]
[quo.components.buttons.button.view :as button]
[quo.components.common.new-feature-gradient :as new-feature-gradient]
[quo.components.icon :as icon]
[quo.components.list-items.preview-list.view :as preview-list]
[quo.components.markdown.text :as text]
@@ -115,7 +116,9 @@
nil)])
(defn view
[{:keys [title on-press action-props accessibility-label blur? container-style content] :as props}]
[{:keys [title show-new-feature-tag? on-press action-props accessibility-label blur? container-style
content]
:as props}]
[rn/pressable
{:style (merge style/container container-style)
:on-press (or on-press (:on-change action-props))
@@ -126,10 +129,19 @@
[rn/view {:style (style/left-sub-container props)}
[image-component props]
[rn/view {:style (style/left-container (:image props))}
[text/text
{:weight :medium
:style {:color (when blur? colors/white)}}
title]
[rn/view {:flex-direction :row}
[text/text
{:weight :medium
:style {:color (when blur? colors/white)}}
title]
(when show-new-feature-tag?
[rn/view {:style style/new-feature-tag-container}
[new-feature-gradient/view {:style style/new-feature-tag-gradient}]
[text/text
{:weight :semi-bold
:size :label
:style style/new-feature-tag-text}
(string/upper-case (i18n/label :t/new))]])]
[description-component props]
[tag-component props]]]
[rn/view {:style (style/sub-container (:alignment action-props))}
@@ -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"))))
@@ -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])
@@ -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})
@@ -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))
@@ -18,5 +18,6 @@
[:dropdown-on-press {:optional true} [:maybe fn?]]
[:networks {:optional true}
[:maybe [:sequential [:map [:source [:maybe :schema.common/image-source]]]]]]
[:dropdown-state {:optional true} [:maybe [:enum :default :disabled]]]]]]
[:dropdown-state {:optional true} [:maybe [:enum :default :disabled]]]
[:show-new-chain-indicator? {:optional true} [:maybe :boolean]]]]]
:any])
@@ -25,7 +25,7 @@
bars))
(defn- view-info-top
[{:keys [state balance networks dropdown-on-press dropdown-state]}]
[{:keys [state balance networks dropdown-on-press dropdown-state show-new-chain-indicator?]}]
(let [theme (quo.theme/use-theme)]
[rn/view {:style style/container-info-top}
(if (= state :loading)
@@ -36,9 +36,10 @@
:style (style/style-text-heading theme)}
balance])
[network-dropdown/view
{:state (or dropdown-state :default)
:blur? true
:on-press dropdown-on-press}
{:state (or dropdown-state :default)
:blur? true
:on-press dropdown-on-press
:show-new-chain-indicator? show-new-chain-indicator?}
networks]]))
(defn- view-metrics
+2
View File
@@ -315,6 +315,8 @@
networks-short-name
socials))
(def new-feature-gradient-pink "#FF33A3")
(defn hex-string?
[s]
(and (string? s) (string/starts-with? s "#")))
-129
View File
@@ -1,129 +0,0 @@
(ns status-im.app.events
(:require
[status-im.app.use-case :as uc]
[taoensso.timbre :as log]
[utils.re-frame :as rf]))
(def navigation-effects-tree
{:uc-view-saved-addresses
{:on-start [[:dispatch [:open-modal :screen/settings.saved-addresses]]]
:uc-add-saved-address {:on-start [[:dispatch [:open-modal :screen/settings.add-address-to-save]]]
:on-finish [[:dispatch [:navigate-back]]]}
:on-finish [[:dispatch [:navigate-back]]]}})
(def db-path-use-case-stack [:app :use-cases-stack])
(defn use-cases
[db]
(get-in db db-path-use-case-stack '()))
(defn current-use-case
[db]
(-> db
use-cases
first))
(defn- navigation-effects-for-key
[db last-key]
(let [path (-> db
use-cases
reverse
vec
(conj last-key))]
(tap> {:in :navigation-effects-for-key
:use-cases (use-cases db)})
(get-in navigation-effects-tree path)))
(defn start-use-case-navigation-effects
[db]
(navigation-effects-for-key db :on-start))
(defn finish-use-case-navigation-effects
[db]
(navigation-effects-for-key db :on-finish))
(rf/reg-event-fx :app/start-use-case
(fn [{:keys [db]} [use-case-id]]
(let [new-db (update-in db db-path-use-case-stack conj use-case-id)]
#_(tap> {:in :app/start-use-case
:effects (start-use-case-navigation-effects new-db)})
{:db new-db
:fx (start-use-case-navigation-effects new-db)})))
(rf/reg-event-fx :app/finish-use-case
(fn [{:keys [db]} [use-case-to-finish]]
(let [new-db (update-in db db-path-use-case-stack rest)]
(if (= (current-use-case db) use-case-to-finish)
{:db new-db
:fx (finish-use-case-navigation-effects db)}
;; TODO: kozieiev: replace with effect
(log/error "Attempt to finish use case that is not current:" use-case-to-finish)))))
(rf/reg-event-fx :app/clear-use-cases-stack
(fn [{:keys [db]}]
{:db (assoc-in db db-path-use-case-stack '())}))
(comment
(rf/dispatch [:app/start-use-case :uc-save-address])
(rf/dispatch [:app/start-use-case :uc-edit-address])
(rf/dispatch [:app/finish-use-case :uc-edit-address])
(rf/dispatch [:app/finish-use-case :uc-save-address])
(rf/dispatch [:app/clear-use-cases-stack])
(rf/sub [:app/use-case-active? :uc-edit-address])
(rf/sub [:app/use-case-active? :uc-save-address])
(rf/sub [:app/current-use-case])
(rf/dispatch [:navigate-back])
(start-use-case-navigation-effects {:app {:use-cases-stack
'(:uc-view-saved-addresses :uc-add-saved-address)}})
(finish-use-case-navigation-effects {:app {:use-cases-stack
'(:uc-view-saved-addresses :uc-add-saved-address)}})
(use-cases {:app {:use-cases-stack
'(:uc-view-saved-addresses :uc-add-saved-address)}})
(-> {:app {:use-cases-stack '(:uc-view-saved-addresses :uc-add-saved-address)}}
use-cases
reverse
vec
(conj :on-exit))
)
#_(rf/reg-event-fx
:app/notify-user
(fn [{:keys [db]} [{:keys [text type] :as message}]]
(let [notification-id (-> db
(get-in [:app :last-user-notification :id] 0)
inc)]
{;; whenever we need to publish notification we override the old and increment id
:db (assoc-in db
[:app :last-user-notification]
(merge message
{:id notification-id}))
;; TODO: toasts are part of ui layer and they shouldn't be published here. Instead some part
;; of ui should keep track of last user notification and generate toast
:fx [#_[:dispatch
[:toasts/upsert
{:type type
:text text}]]]})))
#_(comment
(rf/dispatch [:app/notify-user
{:type :positive
:text "This is a good news"}])
(rf/dispatch [:app/notify-user
{:type :negative
:text "This is a bad news"}])
(rf/dispatch [:toasts/upsert
{:type :positive
:text "This is a test notification3"}])
)
-97
View File
@@ -1,97 +0,0 @@
(ns status-im.app.use-case)
(defmulti initial-state
(fn [use-case-id]
use-case-id))
(defmethod initial-state :default
[_]
{:use-case-id :default})
(defn start
[use-case-id state-update]
(merge (initial-state use-case-id)
state-update))
(defn make-step
[current-state state-update]
(merge current-state state-update))
(defn finish
[use-case-id state-update]
(merge (initial-state use-case-id)
state-update))
;; -----------------------------------------------------
(defmethod initial-state :uc-view-saved-addresses
[_]
{:use-case-id :uc-view-saved-addresses})
(defmethod initial-state :uc-add-saved-address
[_]
{:use-case-id :uc-add-saved-address
:address nil
:ens nil
:ens? false
:name nil
:customization-color nil})
;; -----------------------------------------------------
(defmulti navigation-start
(fn [use-case-data]
(:use-case-id use-case-data)))
(defmulti navigation-step
(fn [use-case-data]
(:use-case-id use-case-data)))
(defmethod navigation-step :default
[]
nil)
(defmulti navigation-finish
(fn [use-case-data]
(:use-case-id use-case-data)))
;; -----------------------------------------------------
(defmethod navigation-start :uc-view-saved-addresses
[_]
[[:dispatch [:open-modal :screen/settings.saved-addresses]]])
(defmethod navigation-finish :uc-view-saved-addresses
[_]
[[:dispatch [:navigate-back]]])
;; -----------------------------------------------------
(defmethod navigation-start :uc-add-saved-address
[_]
[[:dispatch [:open-modal :screen/settings.add-address-to-save]]])
(defmethod navigation-step :uc-add-saved-address
[{:keys [address ens ens?] :as use-case-state}]
[[:dispatch [:open-modal :screen/settings.add-address-to-save]]])
(defmethod navigation-finish :uc-add-saved-address
[_]
[[:dispatch [:navigate-back]]])
;; -----------------------------------------------------
(comment
(initial-state :uc-add-saved-address)
(initial-state :uc-view-saved-addresses)
(initial-state :unknown)
(navigation-start {:use-case-id :uc-add-saved-address})
(navigation-finish {:use-case-id :uc-add-saved-address})
(navigation-start {:use-case-id :uc-add-saved-address})
(-> :uc-add-saved-address
initial-state
(make-step {:address "0xasdfas"})))
@@ -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")
:keycard-logo (js/require "../resources/images/ui2/keycard-logo.png")
:keycard-buy (js/require "../resources/images/ui2/keycard-buy.png")
:keycard-backup-positive (js/require "../resources/images/ui2/keycard-backup-positive.png")
:keycard-change-pin (js/require "../resources/images/ui2/keycard-change-pin.png")
:keycard-change-pin-positive (js/require "../resources/images/ui2/keycard-change-pin-positive.png")
:keycard-change-pin-negative (js/require "../resources/images/ui2/keycard-change-pin-negative.png")
:keycard-migration (js/require "../resources/images/ui2/keycard-migration.png")
:keycard-migration-failed (js/require "../resources/images/ui2/keycard-migration-failed.png")
:keycard-migration-succeeded (js/require "../resources/images/ui2/keycard-migration-succeeded.png")
:keycard-not-same (js/require "../resources/images/ui2/keycard-not-same.png")
:keycard-not-empty (js/require "../resources/images/ui2/keycard-not-empty.png")
:keycard-reset-positive (js/require "../resources/images/ui2/keycard-reset-positive.png")
:keycard-reset-negative (js/require "../resources/images/ui2/keycard-reset-negative.png")
:keycard-unblock (js/require "../resources/images/ui2/keycard-unblock.png")
:keycard-unblock-positive (js/require "../resources/images/ui2/keycard-unblock-positive.png")
:not-keycard (js/require "../resources/images/ui2/not-keycard.png")
:discover (js/require "../resources/images/ui2/discover.png")
:invite-friends (js/require "../resources/images/ui2/invite-friends.png")
@@ -26,8 +26,7 @@
:auth-button-label auth-button-label}]))
(vec (conj dependencies on-auth-success on-auth-fail)))
on-slider-complete (rn/use-callback
(fn [reset-slider-fn]
(js/setTimeout #(reset-slider-fn false) 500)
(fn []
(if (fn? on-complete)
(on-complete)
(on-complete-callback)))
+6 -7
View File
@@ -3,13 +3,12 @@
(defn outmost-transparent-container
[]
{:elevation 2
:pointer-events :box-none
:padding-top (+ (safe-area/get-top) 6)
:flex-direction :column
:justify-content :center
:align-items :center
:background-color :yellow})
{:elevation 2
:pointer-events :box-none
:padding-top (+ (safe-area/get-top) 6)
:flex-direction :column
:justify-content :center
:align-items :center})
(def each-toast-container
{:width "100%"
+16 -3
View File
@@ -26,11 +26,11 @@
(goog-define ALCHEMY_BASE_MAINNET_TOKEN "")
(goog-define ALCHEMY_BASE_SEPOLIA_TOKEN "")
(goog-define WALLET_CONNECT_PROJECT_ID "87815d72a81d739d2a7ce15c2cfdefb3")
(goog-define MIXPANEL_APP_ID "3350627")
(goog-define MIXPANEL_TOKEN "5c73bda2d36a9f688a5ee45641fb6775")
(goog-define STATUS_BUILD_ETH_RPC_PROXY_USER "")
(goog-define STATUS_BUILD_ETH_RPC_PROXY_PASSWORD "")
(goog-define STATUS_BUILD_ETH_RPC_PROXY_URL "")
(goog-define MIXPANEL_APP_ID "")
(goog-define MIXPANEL_APP_TOKEN "")
(def mainnet-rpc-url (str "https://eth-archival.rpc.grove.city/v1/" POKT_TOKEN))
(def sepolia-rpc-url (str "https://sepolia-archival.rpc.grove.city/v1/" POKT_TOKEN))
@@ -53,8 +53,16 @@
(def opensea-link "https://opensea.io")
(def opensea-tesnet-link "https://testnets.opensea.io")
;; These MixPanel values should be injected via the CI since they vary depending
;; on the environment, as we want to keep production and test/development
;; metrics separate.
;;
;; We primarily use two MixPanel projects: the production project is named
;; `status-im`, and the test project is `test.status-im`.
;;
;; During development, do not use the production app ID and token.
(def mixpanel-app-id MIXPANEL_APP_ID)
(def mixpanel-token MIXPANEL_TOKEN)
(def mixpanel-token MIXPANEL_APP_TOKEN)
(def opensea-api-key OPENSEA_API_KEY)
(def status-proxy-enabled? true)
@@ -136,3 +144,8 @@
(def re-frisk-host (get-config :RE_FRISK_HOST "localhost"))
(def re-frisk-port (get-config :RE_FRISK_PORT "4567"))
;;;; Sentry
;; Documentation: status-go/internal/sentry/README.md
(goog-define SENTRY_DSN_STATUS_GO "")
(def sentry-enabled? (enabled? (get-config :SENTRY_ENABLED "0")))
(def sentry-dsn-status-go SENTRY_DSN_STATUS_GO)

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