Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0151bb20f7 |
@@ -35,4 +35,3 @@ FAST_CREATE_COMMUNITY_ENABLED=1
|
||||
TEST_NETWORKS_ENABLED=1
|
||||
SHOW_NOT_IMPLEMENTED_FEATURES=0
|
||||
ENABLE_ALERT_BANNER=0
|
||||
FLAG_WALLET_CONNECT_ENABLED=1
|
||||
|
||||
@@ -38,5 +38,4 @@ SHOW_NOT_IMPLEMENTED_FEATURES=1
|
||||
DELETE_MESSAGE_FOR_ME_UNDO_TIME_LIMIT=10000
|
||||
DELETE_MESSAGE_UNDO_TIME_LIMIT=10000
|
||||
ENABLE_ALERT_BANNER=0
|
||||
FLAG_WALLET_CONNECT_ENABLED=1
|
||||
MOBILE_DATA_SYNCING_TOGGLE_ENABLE=0
|
||||
|
||||
@@ -36,4 +36,3 @@ LOCAL_PAIRING_ENABLED=1
|
||||
FAST_CREATE_COMMUNITY_ENABLED=1
|
||||
TEST_NETWORKS_ENABLED=1
|
||||
ENABLE_ALERT_BANNER=1
|
||||
FLAG_WALLET_CONNECT_ENABLED=1
|
||||
|
||||
@@ -23,4 +23,3 @@ DELETE_MESSAGE_ENABLED=1
|
||||
FAST_CREATE_COMMUNITY_ENABLED=0
|
||||
TEST_NETWORKS_ENABLED=0
|
||||
ENABLE_ALERT_BANNER=1
|
||||
FLAG_WALLET_CONNECT_ENABLED=1
|
||||
|
||||
@@ -19,4 +19,3 @@ MAX_IMAGES_BATCH=1
|
||||
DELETE_MESSAGE_ENABLED=1
|
||||
FAST_CREATE_COMMUNITY_ENABLED=0
|
||||
TEST_NETWORKS_ENABLED=0
|
||||
FLAG_WALLET_CONNECT_ENABLED=1
|
||||
|
||||
@@ -436,11 +436,10 @@ android-clean: ##@prepare Clean Gradle state
|
||||
rm -rf ~/.gradle
|
||||
|
||||
|
||||
android-ports: export FLOWSTORM_PORT ?= 7722
|
||||
android-ports: export FLOWSTORM_PORT := 7722
|
||||
android-ports: export TARGET := android-sdk
|
||||
android-ports: export RCT_METRO_PORT ?= 8081
|
||||
android-ports: ##@other Add proxies to Android Device/Simulator
|
||||
adb reverse tcp:$(RCT_METRO_PORT) tcp:$(RCT_METRO_PORT) && \
|
||||
adb reverse tcp:8081 tcp:8081 && \
|
||||
adb reverse tcp:3449 tcp:3449 && \
|
||||
adb reverse tcp:4567 tcp:4567 && \
|
||||
adb reverse tcp:$(FLOWSTORM_PORT) tcp:$(FLOWSTORM_PORT) && \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.4'
|
||||
library 'status-jenkins-lib@v1.9.3'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.4'
|
||||
library 'status-jenkins-lib@v1.9.3'
|
||||
|
||||
import groovy.json.JsonBuilder
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.4'
|
||||
library 'status-jenkins-lib@v1.9.3'
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux' }
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.4'
|
||||
library 'status-jenkins-lib@v1.9.3'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.4'
|
||||
library 'status-jenkins-lib@v1.9.3'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.4'
|
||||
library 'status-jenkins-lib@v1.9.3'
|
||||
|
||||
pipeline {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.4'
|
||||
library 'status-jenkins-lib@v1.9.3'
|
||||
|
||||
pipeline {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.4'
|
||||
library 'status-jenkins-lib@v1.9.3'
|
||||
|
||||
pipeline {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.4'
|
||||
library 'status-jenkins-lib@v1.9.3'
|
||||
|
||||
pipeline {
|
||||
agent { label 'macos' }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.4'
|
||||
library 'status-jenkins-lib@v1.9.3'
|
||||
|
||||
pipeline {
|
||||
agent { label params.AGENT_LABEL }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.4'
|
||||
library 'status-jenkins-lib@v1.9.3'
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux' }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.4'
|
||||
library 'status-jenkins-lib@v1.9.3'
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
|
||||
-5
@@ -62,11 +62,6 @@ public class EncryptionUtils extends ReactContextBaseJavaModule {
|
||||
return Statusgo.encodeTransfer(to, value);
|
||||
}
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
public String encodeFunctionCall(final String method, final String paramsJSON) {
|
||||
return Statusgo.encodeFunctionCall(method, paramsJSON);
|
||||
}
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
public String decodeParameters(final String decodeParamJSON) {
|
||||
return Statusgo.decodeParameters(decodeParamJSON);
|
||||
|
||||
+460
-317
File diff suppressed because it is too large
Load Diff
@@ -45,6 +45,7 @@ androidx.core:core-splashscreen:1.0.0
|
||||
androidx.core:core:1.0.0
|
||||
androidx.core:core:1.1.0
|
||||
androidx.core:core:1.1.0-rc01
|
||||
androidx.core:core:1.2.0
|
||||
androidx.core:core:1.6.0
|
||||
androidx.core:core:1.9.0
|
||||
androidx.cursoradapter:cursoradapter:1.0.0
|
||||
@@ -67,6 +68,7 @@ androidx.documentfile:documentfile:1.0.0
|
||||
androidx.drawerlayout:drawerlayout:1.0.0
|
||||
androidx.emoji2:emoji2-views-helper:1.2.0
|
||||
androidx.emoji2:emoji2:1.2.0
|
||||
androidx.exifinterface:exifinterface:1.0.0
|
||||
androidx.exifinterface:exifinterface:1.1.0-beta01
|
||||
androidx.exifinterface:exifinterface:1.1.0-rc01
|
||||
androidx.exifinterface:exifinterface:1.2.0
|
||||
@@ -516,7 +518,15 @@ com.googlecode.javaewah:JavaEWAH:1.1.12
|
||||
com.googlecode.javaewah:JavaEWAH:1.1.13
|
||||
com.googlecode.json-simple:json-simple:1.1
|
||||
com.googlecode.juniversalchardet:juniversalchardet:1.0.3
|
||||
com.google.android.datatransport:transport-api:2.2.1
|
||||
com.google.android.datatransport:transport-backend-cct:2.3.3
|
||||
com.google.android.datatransport:transport-runtime:2.2.6
|
||||
com.google.android.gms:play-services-basement:18.0.0
|
||||
com.google.android.gms:play-services-base:18.0.1
|
||||
com.google.android.gms:play-services-mlkit-barcode-scanning:18.0.0
|
||||
com.google.android.gms:play-services-tasks:18.0.1
|
||||
com.google.android.material:material:1.2.0-alpha03
|
||||
com.google.android.odml:image:1.0.0-beta1
|
||||
com.google.android:annotations:4.1.1.4
|
||||
com.google.api.grpc:proto-google-common-protos:1.12.0
|
||||
com.google.api.grpc:proto-google-common-protos:2.0.1
|
||||
@@ -543,6 +553,10 @@ com.google.errorprone:error_prone_annotations:2.3.4
|
||||
com.google.errorprone:error_prone_annotations:2.4.0
|
||||
com.google.errorprone:error_prone_annotations:2.9.0
|
||||
com.google.errorprone:error_prone_annotations:2.11.0
|
||||
com.google.firebase:firebase-annotations:16.0.0
|
||||
com.google.firebase:firebase-components:16.1.0
|
||||
com.google.firebase:firebase-encoders-json:17.1.0
|
||||
com.google.firebase:firebase-encoders:16.1.0
|
||||
com.google.flatbuffers:flatbuffers-java:1.12.0
|
||||
com.google.guava:failureaccess:1.0.1
|
||||
com.google.guava:guava:17.0
|
||||
@@ -558,6 +572,11 @@ com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
|
||||
com.google.j2objc:j2objc-annotations:1.1
|
||||
com.google.j2objc:j2objc-annotations:1.3
|
||||
com.google.jimfs:jimfs:1.1
|
||||
com.google.mlkit:barcode-scanning-common:17.0.0
|
||||
com.google.mlkit:barcode-scanning:17.0.2
|
||||
com.google.mlkit:common:18.0.0
|
||||
com.google.mlkit:vision-common:17.0.0
|
||||
com.google.mlkit:vision-interfaces:16.0.0
|
||||
com.google.prefab:cli:2.0.0
|
||||
com.google.protobuf:protobuf-java-util:3.4.0
|
||||
com.google.protobuf:protobuf-java-util:3.10.0
|
||||
@@ -572,7 +591,6 @@ com.google.testing.platform:core-proto:0.0.8-alpha04
|
||||
com.google.testing.platform:core-proto:0.0.8-alpha07
|
||||
com.google.testing.platform:core-proto:0.0.8-alpha08
|
||||
com.google.test.platform:core-proto:0.0.2-dev
|
||||
com.google.zxing:core:3.4.1
|
||||
com.ibm.icu:icu4j:53.1
|
||||
com.intellij:annotations:12.0
|
||||
com.parse.bolts:bolts-tasks:1.4.0
|
||||
|
||||
+44
-35
@@ -87,6 +87,7 @@ https://dl.google.com/dl/android/maven2/androidx/documentfile/documentfile/1.0.0
|
||||
https://dl.google.com/dl/android/maven2/androidx/drawerlayout/drawerlayout/1.0.0/drawerlayout-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/emoji2/emoji2-views-helper/1.2.0/emoji2-views-helper-1.2.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/emoji2/emoji2/1.2.0/emoji2-1.2.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/exifinterface/exifinterface/1.0.0/exifinterface-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/exifinterface/exifinterface/1.1.0-beta01/exifinterface-1.1.0-beta01.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/exifinterface/exifinterface/1.1.0-rc01/exifinterface-1.1.0-rc01.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/exifinterface/exifinterface/1.2.0/exifinterface-1.2.0.pom
|
||||
@@ -480,8 +481,26 @@ https://dl.google.com/dl/android/maven2/com/android/zipflinger/7.0.4/zipflinger-
|
||||
https://dl.google.com/dl/android/maven2/com/android/zipflinger/7.2.1/zipflinger-7.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/zipflinger/7.3.1/zipflinger-7.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/zipflinger/8.1.1/zipflinger-8.1.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/android/datatransport/transport-api/2.2.1/transport-api-2.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/android/datatransport/transport-backend-cct/2.3.3/transport-backend-cct-2.3.3.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/android/datatransport/transport-runtime/2.2.5/transport-runtime-2.2.5.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/android/datatransport/transport-runtime/2.2.6/transport-runtime-2.2.6.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-basement/18.0.0/play-services-basement-18.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-base/18.0.1/play-services-base-18.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-mlkit-barcode-scanning/18.0.0/play-services-mlkit-barcode-scanning-18.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-tasks/18.0.1/play-services-tasks-18.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/android/material/material/1.0.0/material-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/android/material/material/1.2.0-alpha03/material-1.2.0-alpha03.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/android/odml/image/1.0.0-beta1/image-1.0.0-beta1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-annotations/16.0.0/firebase-annotations-16.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-components/16.1.0/firebase-components-16.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-encoders-json/17.1.0/firebase-encoders-json-17.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-encoders/16.1.0/firebase-encoders-16.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/mlkit/barcode-scanning-common/17.0.0/barcode-scanning-common-17.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/mlkit/barcode-scanning/17.0.2/barcode-scanning-17.0.2.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/mlkit/common/18.0.0/common-18.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/mlkit/vision-common/17.0.0/vision-common-17.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/mlkit/vision-interfaces/16.0.0/vision-interfaces-16.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/prefab/cli/2.0.0/cli-2.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/testing/platform/core-proto/0.0.8-alpha04/core-proto-0.0.8-alpha04.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/testing/platform/core-proto/0.0.8-alpha07/core-proto-0.0.8-alpha07.pom
|
||||
@@ -504,12 +523,12 @@ https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.6/commons-cod
|
||||
https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.9/commons-codec-1.9.pom
|
||||
https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.10/commons-codec-1.10.pom
|
||||
https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.11/commons-codec-1.11.pom
|
||||
https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.17.1/commons-codec-1.17.1.pom
|
||||
https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.17.0/commons-codec-1.17.0.pom
|
||||
https://repo.maven.apache.org/maven2/commons-io/commons-io/2.4/commons-io-2.4.pom
|
||||
https://repo.maven.apache.org/maven2/commons-io/commons-io/2.16.1/commons-io-2.16.1.pom
|
||||
https://repo.maven.apache.org/maven2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.pom
|
||||
https://repo.maven.apache.org/maven2/commons-logging/commons-logging/1.2/commons-logging-1.2.pom
|
||||
https://repo.maven.apache.org/maven2/commons-logging/commons-logging/1.3.3/commons-logging-1.3.3.pom
|
||||
https://repo.maven.apache.org/maven2/commons-logging/commons-logging/1.3.2/commons-logging-1.3.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/adobe/xmp/xmpcore/6.1.11/xmpcore-6.1.11.pom
|
||||
https://repo.maven.apache.org/maven2/com/afollestad/material-dialogs/commons/0.9.6.0/commons-0.9.6.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/afollestad/material-dialogs/core/0.9.6.0/core-0.9.6.0.pom
|
||||
@@ -609,22 +628,22 @@ https://repo.maven.apache.org/maven2/com/facebook/soloader/soloader/0.10.1/soloa
|
||||
https://repo.maven.apache.org/maven2/com/facebook/soloader/soloader/0.10.5/soloader-0.10.5.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/yoga/proguard-annotations/1.19.0/proguard-annotations-1.19.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.11.1/jackson-annotations-2.11.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.17.2/jackson-annotations-2.17.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.17.1/jackson-annotations-2.17.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-core/2.11.1/jackson-core-2.11.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-core/2.17.2/jackson-core-2.17.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-core/2.17.1/jackson-core-2.17.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.11.1/jackson-databind-2.11.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.17.2/jackson-databind-2.17.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.17.1/jackson-databind-2.17.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-xml/2.11.1/jackson-dataformat-xml-2.11.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-base/2.11.1/jackson-base-2.11.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-base/2.17.2/jackson-base-2.17.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-base/2.17.1/jackson-base-2.17.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-bom/2.11.1/jackson-bom-2.11.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-bom/2.17.2/jackson-bom-2.17.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-bom/2.17.1/jackson-bom-2.17.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-parent/2.11/jackson-parent-2.11.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-parent/2.17/jackson-parent-2.17.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-modules-base/2.11.1/jackson-modules-base-2.11.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-modules-base/2.17.2/jackson-modules-base-2.17.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-modules-base/2.17.1/jackson-modules-base-2.17.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.11.1/jackson-module-jaxb-annotations-2.11.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.17.2/jackson-module-jaxb-annotations-2.17.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.17.1/jackson-module-jaxb-annotations-2.17.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-module-kotlin/2.11.1/jackson-module-kotlin-2.11.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/oss-parent/38/oss-parent-38.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/oss-parent/58/oss-parent-58.pom
|
||||
@@ -693,7 +712,7 @@ https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotatio
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.10.0/error_prone_annotations-2.10.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.11.0/error_prone_annotations-2.11.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.27.0/error_prone_annotations-2.27.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.29.2/error_prone_annotations-2.29.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.28.0/error_prone_annotations-2.28.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.0.18/error_prone_parent-2.0.18.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.2.0/error_prone_parent-2.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.3.1/error_prone_parent-2.3.1.pom
|
||||
@@ -706,7 +725,7 @@ https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.10.0/error_prone_parent-2.10.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.11.0/error_prone_parent-2.11.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.27.0/error_prone_parent-2.27.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.29.2/error_prone_parent-2.29.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.28.0/error_prone_parent-2.28.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/flatbuffers/flatbuffers-java/1.12.0/flatbuffers-java-1.12.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/google/1/google-1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.pom
|
||||
@@ -751,7 +770,7 @@ https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-bom/3.13.0/pro
|
||||
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-bom/3.17.2/protobuf-bom-3.17.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-bom/3.19.2/protobuf-bom-3.19.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-bom/3.19.3/protobuf-bom-3.19.3.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-bom/4.28.0-RC1/protobuf-bom-4.28.0-RC1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-bom/4.27.0/protobuf-bom-4.27.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-javalite/3.17.2/protobuf-javalite-3.17.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-javalite/3.19.2/protobuf-javalite-3.19.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java-util/3.4.0/protobuf-java-util-3.4.0.pom
|
||||
@@ -768,7 +787,7 @@ https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.13.0/pr
|
||||
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.17.2/protobuf-java-3.17.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.19.2/protobuf-java-3.19.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.19.3/protobuf-java-3.19.3.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/4.28.0-RC1/protobuf-java-4.28.0-RC1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/4.27.0/protobuf-java-4.27.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-lite/3.0.1/protobuf-lite-3.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/3.0.0/protobuf-parent-3.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/3.4.0/protobuf-parent-3.4.0.pom
|
||||
@@ -779,11 +798,9 @@ https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/3.13.0/
|
||||
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/3.17.2/protobuf-parent-3.17.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/3.19.2/protobuf-parent-3.19.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/3.19.3/protobuf-parent-3.19.3.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/4.28.0-RC1/protobuf-parent-4.28.0-RC1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/truth/truth-parent/1.4.4/truth-parent-1.4.4.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/truth/truth/1.4.4/truth-1.4.4.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/zxing/core/3.4.1/core-3.4.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/zxing/zxing-parent/3.4.1/zxing-parent-3.4.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/4.27.0/protobuf-parent-4.27.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/truth/truth-parent/1.4.2/truth-parent-1.4.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/truth/truth/1.4.2/truth-1.4.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/ibm/icu/icu4j/53.1/icu4j-53.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/intellij/annotations/12.0/annotations-12.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/parse/bolts/bolts-tasks/1.4.0/bolts-tasks-1.4.0.pom
|
||||
@@ -954,11 +971,9 @@ https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-agent/1.14.15/byte
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-parent/1.11.13/byte-buddy-parent-1.11.13.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-parent/1.11.19/byte-buddy-parent-1.11.19.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-parent/1.14.15/byte-buddy-parent-1.14.15.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-parent/1.14.17/byte-buddy-parent-1.14.17.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy/1.11.13/byte-buddy-1.11.13.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy/1.11.19/byte-buddy-1.11.19.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy/1.14.15/byte-buddy-1.14.15.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy/1.14.17/byte-buddy-1.14.17.pom
|
||||
https://repo.maven.apache.org/maven2/net/java/dev/jna/jna-platform/5.6.0/jna-platform-5.6.0.pom
|
||||
https://repo.maven.apache.org/maven2/net/java/dev/jna/jna/5.6.0/jna-5.6.0.pom
|
||||
https://repo.maven.apache.org/maven2/net/java/jvnet-parent/1/jvnet-parent-1.pom
|
||||
@@ -1003,7 +1018,6 @@ https://repo.maven.apache.org/maven2/org/apache/apache/18/apache-18.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/apache/21/apache-21.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/apache/23/apache-23.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/apache/31/apache-31.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/apache/32/apache-32.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/commons/commons-compress/1.12/commons-compress-1.12.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/commons/commons-compress/1.20/commons-compress-1.20.pom
|
||||
@@ -1023,7 +1037,6 @@ https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/42/common
|
||||
https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/48/commons-parent-48.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/52/commons-parent-52.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/69/commons-parent-69.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/71/commons-parent-71.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.1.1/httpclient-4.1.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.2.6/httpclient-4.2.6.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.5.2/httpclient-4.5.2.pom
|
||||
@@ -1078,7 +1091,7 @@ https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/2.8.1/che
|
||||
https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/2.11.1/checker-qual-2.11.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/3.5.0/checker-qual-3.5.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/3.12.0/checker-qual-3.12.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/3.45.0/checker-qual-3.45.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/3.44.0/checker-qual-3.44.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/codehaus-parent/4/codehaus-parent-4.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy-xml/3.0.9/groovy-xml-3.0.9.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy-xml/3.0.10/groovy-xml-3.0.10.pom
|
||||
@@ -1088,21 +1101,21 @@ https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-annotation
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.17/animal-sniffer-annotations-1.17.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.18/animal-sniffer-annotations-1.18.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.19/animal-sniffer-annotations-1.19.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.24/animal-sniffer-annotations-1.24.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.23/animal-sniffer-annotations-1.23.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-parent/1.14/animal-sniffer-parent-1.14.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-parent/1.17/animal-sniffer-parent-1.17.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-parent/1.18/animal-sniffer-parent-1.18.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-parent/1.19/animal-sniffer-parent-1.19.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-parent/1.24/animal-sniffer-parent-1.24.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-parent/1.23/animal-sniffer-parent-1.23.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/mojo-parent/34/mojo-parent-34.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/mojo-parent/40/mojo-parent-40.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/mojo-parent/50/mojo-parent-50.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/mojo-parent/84/mojo-parent-84.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/mojo-parent/74/mojo-parent-74.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/woodstox/stax2-api/4.2.1/stax2-api-4.2.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/easymock/easymockclassextension/3.2/easymockclassextension-3.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/easymock/easymock-parent/3.2/easymock-parent-3.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/easymock/easymock-parent/5.3.0/easymock-parent-5.3.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/easymock/easymock/5.3.0/easymock-5.3.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/easymock/easymock-parent/5.2.0/easymock-parent-5.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/easymock/easymock/5.2.0/easymock-5.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/eclipse/angus/angus-activation-project/2.0.2/angus-activation-project-2.0.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/eclipse/angus/angus-activation/2.0.2/angus-activation-2.0.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/eclipse/ee4j/project/1.0.2/project-1.0.2.pom
|
||||
@@ -1133,10 +1146,9 @@ https://repo.maven.apache.org/maven2/org/glassfish/jaxb/txw2/2.3.1/txw2-2.3.1.po
|
||||
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/txw2/2.3.2/txw2-2.3.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/txw2/4.0.5/txw2-4.0.5.pom
|
||||
https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/3.0-rc1/hamcrest-core-3.0-rc1.pom
|
||||
https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/2.2/hamcrest-core-2.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-parent/1.3/hamcrest-parent-1.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest/2.2/hamcrest-2.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest/3.0-rc1/hamcrest-3.0-rc1.pom
|
||||
https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.build/0.7.4.201502262128/org.jacoco.build-0.7.4.201502262128.pom
|
||||
https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.build/0.8.12/org.jacoco.build-0.8.12.pom
|
||||
https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.core/0.7.4.201502262128/org.jacoco.core-0.7.4.201502262128.pom
|
||||
@@ -1236,7 +1248,7 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.6.10/
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.6.20/kotlin-reflect-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.7.22/kotlin-reflect-1.7.22.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.8.20-RC2/kotlin-reflect-1.8.20-RC2.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/2.0.20-Beta2/kotlin-reflect-2.0.20-Beta2.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/2.0.0/kotlin-reflect-2.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-scripting-common/1.6.20/kotlin-scripting-common-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-scripting-common/1.7.22/kotlin-scripting-common-1.7.22.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-scripting-common/1.8.0/kotlin-scripting-common-1.8.0.pom
|
||||
@@ -1341,7 +1353,7 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.8.20-R
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.8.21/kotlin-stdlib-1.8.21.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.9.0/kotlin-stdlib-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.9.21/kotlin-stdlib-1.9.21.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/2.0.20-Beta2/kotlin-stdlib-2.0.20-Beta2.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/2.0.0/kotlin-stdlib-2.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-tooling-core/1.7.22/kotlin-tooling-core-1.7.22.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-tooling-core/1.8.0/kotlin-tooling-core-1.8.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-tooling-core/1.9.0/kotlin-tooling-core-1.9.0.pom
|
||||
@@ -1360,7 +1372,6 @@ https://repo.maven.apache.org/maven2/org/jetbrains/trove4j/trove4j/20160824/trov
|
||||
https://repo.maven.apache.org/maven2/org/json/json/20180813/json-20180813.pom
|
||||
https://repo.maven.apache.org/maven2/org/json/json/20240303/json-20240303.pom
|
||||
https://repo.maven.apache.org/maven2/org/jsoup/jsoup/1.13.1/jsoup-1.13.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/jspecify/jspecify/1.0.0/jspecify-1.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/junit/junit-bom/5.11.0-M2/junit-bom-5.11.0-M2.pom
|
||||
https://repo.maven.apache.org/maven2/org/jvnet/staxex/stax-ex/1.7.7/stax-ex-1.7.7.pom
|
||||
https://repo.maven.apache.org/maven2/org/jvnet/staxex/stax-ex/1.8.1/stax-ex-1.8.1.pom
|
||||
@@ -1372,10 +1383,8 @@ https://repo.maven.apache.org/maven2/org/mockito/mockito-core/5.12.0/mockito-cor
|
||||
https://repo.maven.apache.org/maven2/org/mockito/mockito-inline/4.0.0/mockito-inline-4.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/objenesis/objenesis-parent/3.2/objenesis-parent-3.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/objenesis/objenesis-parent/3.3/objenesis-parent-3.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/objenesis/objenesis-parent/3.4/objenesis-parent-3.4.pom
|
||||
https://repo.maven.apache.org/maven2/org/objenesis/objenesis/3.2/objenesis-3.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/objenesis/objenesis/3.3/objenesis-3.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/objenesis/objenesis/3.4/objenesis-3.4.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/5.0.3/asm-analysis-5.0.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/5.1/asm-analysis-5.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/6.0/asm-analysis-6.0.pom
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
hermesEnabled ? lib.getEnvWithDefault "ORG_GRADLE_PROJECT_hermesEnabled" "true",
|
||||
buildUrl ? lib.getEnvWithDefault "ORG_GRADLE_PROJECT_buildUrl" null,
|
||||
statusGoSrcOverride ? lib.getEnvWithDefault "STATUS_GO_SRC_OVERRIDE" null,
|
||||
reactMetroPort ? lib.getEnvWithDefault "RCT_METRO_PORT" 8081,
|
||||
# If APKs should be split based on architectures
|
||||
androidAbiSplit ? lib.getEnvWithDefault "ANDROID_ABI_SPLIT" "true",
|
||||
# Android architectures to build for
|
||||
@@ -159,7 +158,6 @@ in stdenv.mkDerivation rec {
|
||||
--no-build-cache \
|
||||
--parallel \
|
||||
-Dmaven.repo.local='${deps.gradle}' \
|
||||
-PreactNativeDevServerPort=${toString reactMetroPort} \
|
||||
assemble${gradleBuildType}
|
||||
'';
|
||||
in
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@
|
||||
"react-native-background-timer": "^2.1.1",
|
||||
"react-native-biometrics": "^3.0.1",
|
||||
"react-native-blob-util": "^0.13.18",
|
||||
"react-native-camera-kit": "git+https://github.com/status-im/react-native-camera-kit.git#refs/tags/v14.0.0-beta15-status-v1",
|
||||
"react-native-camera-kit": "14.0.0-beta13",
|
||||
"react-native-config": "^1.5.0",
|
||||
"react-native-dialogs": "1.1.2",
|
||||
"react-native-draggable-flatlist": "4.0.1",
|
||||
|
||||
@@ -6,7 +6,7 @@ if pgrep -f 'shadow-cljs watch mobile' > /dev/null; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if pgrep -f "react-native start --port=${RCT_METRO_PORT:-8081}" > /dev/null; then
|
||||
if pgrep -f 'react-native start' > /dev/null; then
|
||||
echo "Error: make run-metro is already running in another terminal" >&2
|
||||
echo "Please close that terminal before running this command." >&2
|
||||
exit 1
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if pgrep -f "react-native start --port=${RCT_METRO_PORT:-8081}" > /dev/null; then
|
||||
if pgrep -f 'react-native start' > /dev/null; then
|
||||
echo "Info: metro is already running in another terminal"
|
||||
else
|
||||
echo "Info: starting a new metro terminal"
|
||||
react-native start --port=${RCT_METRO_PORT:-8081} --reset-cache
|
||||
react-native start --reset-cache
|
||||
fi
|
||||
|
||||
@@ -4,7 +4,7 @@ set -euo pipefail
|
||||
TIMEOUT=10 # Metro should not take this long to start.
|
||||
|
||||
while [ "${TIMEOUT}" -gt 0 ]; do
|
||||
if ! lsof -i:"${RCT_METRO_PORT:-8081}" &> /dev/null; then
|
||||
if ! lsof -i:8081 &> /dev/null; then
|
||||
echo "."
|
||||
sleep 1
|
||||
((TIMEOUT--))
|
||||
|
||||
@@ -67,8 +67,6 @@
|
||||
:closure-defines
|
||||
{status-im.config/POKT_TOKEN #shadow/env "POKT_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_PASSWORD #shadow/env "STATUS_BUILD_PROXY_PASSWORD"
|
||||
status-im.config/MIXPANEL_APP_ID #shadow/env "MIXPANEL_APP_ID"
|
||||
status-im.config/MIXPANEL_TOKEN #shadow/env "MIXPANEL_TOKEN"
|
||||
status-im.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"
|
||||
@@ -105,8 +103,6 @@
|
||||
{:closure-defines
|
||||
{status-im.config/POKT_TOKEN #shadow/env "POKT_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_PASSWORD #shadow/env "STATUS_BUILD_PROXY_PASSWORD"
|
||||
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"
|
||||
|
||||
@@ -98,16 +98,16 @@
|
||||
(update :categories <-categories-rpc)
|
||||
(assoc :role-permissions?
|
||||
(->> community
|
||||
:token-permissions
|
||||
:tokenPermissions
|
||||
vals
|
||||
(some role-permission?)))
|
||||
(assoc :membership-permissions?
|
||||
(->> community
|
||||
:token-permissions
|
||||
:tokenPermissions
|
||||
vals
|
||||
(some membership-permission?)))
|
||||
(assoc :token-images
|
||||
(reduce (fn [acc {sym :symbol image :image}]
|
||||
(assoc acc sym image))
|
||||
{}
|
||||
(:tokens-metadata community))))))
|
||||
(:communityTokensMetadata community))))))
|
||||
|
||||
@@ -102,7 +102,8 @@
|
||||
(let [current-theme-type (get-in cofx [:db :profile/profile :appearance])]
|
||||
(when (and (multiaccounts.model/logged-in? db)
|
||||
(= current-theme-type status-im.constants/theme-type-system))
|
||||
{:dispatch [:theme/switch]})))
|
||||
{:profile.settings/switch-theme-fx
|
||||
[(get-in db [:profile/profile :appearance]) (:view-id db)]})))
|
||||
|
||||
(defn- on-biometric-auth-fail
|
||||
[{:keys [code]}]
|
||||
|
||||
@@ -13,17 +13,19 @@
|
||||
(native-module/logout)))
|
||||
|
||||
(rf/defn initialize-app-db
|
||||
[{{:keys [keycard initials-avatar-font-file biometrics]
|
||||
:network/keys [type status expensive?]}
|
||||
[{{:keys [keycard initials-avatar-font-file biometrics]
|
||||
:network/keys [type status expensive?]
|
||||
:wallet-connect/keys [web3-wallet]}
|
||||
:db}]
|
||||
{:db (assoc db/app-db
|
||||
:network/type type
|
||||
:network/status status
|
||||
:network/expensive? expensive?
|
||||
:initials-avatar-font-file initials-avatar-font-file
|
||||
:keycard (dissoc keycard :secrets :pin :application-info)
|
||||
:biometrics biometrics
|
||||
:syncing nil)})
|
||||
:network/type type
|
||||
:network/status status
|
||||
:network/expensive? expensive?
|
||||
:initials-avatar-font-file initials-avatar-font-file
|
||||
:keycard (dissoc keycard :secrets :pin :application-info)
|
||||
:biometrics biometrics
|
||||
:syncing nil
|
||||
:wallet-connect/web3-wallet web3-wallet)})
|
||||
|
||||
(rf/defn logout-method
|
||||
{:events [::logout-method]}
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
|
||||
(views/defview sync-settings
|
||||
[]
|
||||
(views/letsubs [{:keys [backup-enabled?
|
||||
(views/letsubs [{:keys [syncing-on-mobile-network?
|
||||
backup-enabled?
|
||||
default-sync-period
|
||||
use-mailservers?]}
|
||||
[:profile/profile]
|
||||
@@ -26,6 +27,16 @@
|
||||
:on-press #(rf/dispatch [:navigate-back])}]
|
||||
[react/scroll-view
|
||||
[components/list-header (i18n/label :t/data-syncing)]
|
||||
[list.item/list-item
|
||||
{:size :small
|
||||
:title (i18n/label :t/mobile-network-settings)
|
||||
:accessibility-label :notifications-button
|
||||
:on-press #(re-frame/dispatch [:navigate-to :mobile-network-settings])
|
||||
:chevron true
|
||||
:accessory :text
|
||||
:accessory-text (if syncing-on-mobile-network?
|
||||
(i18n/label :t/mobile-network-use-mobile)
|
||||
(i18n/label :t/mobile-network-use-wifi))}]
|
||||
[list.item/list-item
|
||||
{:size :small
|
||||
:title (i18n/label :t/backup-settings)
|
||||
|
||||
@@ -333,7 +333,7 @@
|
||||
[flag]
|
||||
(log/debug "[native-module] set-blank-preview-flag")
|
||||
;; Sometimes the app crashes during logout because `flag` is nil.
|
||||
(when-not (nil? flag)
|
||||
(when flag
|
||||
(.setBlankPreviewFlag ^js (encryption) flag)))
|
||||
|
||||
(defn get-device-model-info
|
||||
@@ -387,11 +387,6 @@
|
||||
(log/debug "[native-module] encode-transfer")
|
||||
(.encodeTransfer ^js (encryption) to-norm amount-hex))
|
||||
|
||||
(defn encode-function-call
|
||||
[method params]
|
||||
(log/debug "[native-module] encode-function-call")
|
||||
(.encodeFunctionCall ^js (encryption) method (types/clj->json params)))
|
||||
|
||||
(defn decode-parameters
|
||||
[bytes-string types]
|
||||
(log/debug "[native-module] decode-parameters")
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
(ns status-im.common.theme.effects
|
||||
(:require
|
||||
[status-im.common.theme.core :as theme]
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
(rf/reg-fx :theme/legacy-theme-fx
|
||||
(fn [theme]
|
||||
(theme/set-legacy-theme theme)))
|
||||
@@ -1,8 +1,7 @@
|
||||
(ns status-im.common.theme.events
|
||||
(:require
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.common.theme.core :as theme]
|
||||
[status-im.common.theme.utils :as utils]))
|
||||
[status-im.common.theme.core :as theme]))
|
||||
|
||||
(re-frame/reg-fx
|
||||
:theme/init-theme
|
||||
@@ -11,16 +10,5 @@
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
:theme/switch
|
||||
(fn [{db :db} [{:keys [theme view-id theme-type]}]]
|
||||
"Switches the theme and triggers related effects.
|
||||
Parameters:
|
||||
- theme: Optional theme keyword to apply. If not provided, defaults to the theme determined by theme-type.
|
||||
- theme-type: Optional theme type to determine the theme. If not provided, defaults to the theme type from the user's profile.
|
||||
- view-id: Optional view ID for updating status color. If not provided, uses the current view ID from the database."
|
||||
(let [theme-type (or theme-type (get-in db [:profile/profile :appearance]))
|
||||
theme (or theme (utils/theme-type->theme-value theme-type))]
|
||||
{:db (assoc db :theme theme)
|
||||
:fx [[:theme/legacy-theme-fx theme]
|
||||
[:dispatch
|
||||
[:reload-status-nav-color
|
||||
(or view-id (:view-id db))]]]})))
|
||||
(fn [{db :db} [theme]]
|
||||
{:db (assoc db :theme theme)}))
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
(ns status-im.common.theme.utils
|
||||
(:require
|
||||
[status-im.common.theme.core :as theme]
|
||||
[status-im.constants :as constants]))
|
||||
|
||||
(defn theme-type->theme-value
|
||||
"Converts theme type identifier to a theme keyword.
|
||||
Returns `:light` or `:dark` based on `theme-type`:
|
||||
- `theme-type-light` (1): Light theme.
|
||||
- `theme-type-dark` (2): Dark theme.
|
||||
- `theme-type-system` (0): Uses system preference."
|
||||
[theme-type]
|
||||
(condp = theme-type
|
||||
constants/theme-type-dark :dark
|
||||
constants/theme-type-light :light
|
||||
constants/theme-type-system (if (theme/device-theme-dark?) :dark :light)
|
||||
:dark))
|
||||
@@ -12,8 +12,6 @@
|
||||
|
||||
(goog-define INFURA_TOKEN "")
|
||||
(goog-define POKT_TOKEN "3ef2018191814b7e1009b8d9")
|
||||
(goog-define STATUS_BUILD_PROXY_USER "")
|
||||
(goog-define STATUS_BUILD_PROXY_PASSWORD "")
|
||||
(goog-define OPENSEA_API_KEY "")
|
||||
(goog-define RARIBLE_MAINNET_API_KEY "")
|
||||
(goog-define RARIBLE_TESTNET_API_KEY "")
|
||||
@@ -47,7 +45,6 @@
|
||||
(def mixpanel-token MIXPANEL_TOKEN)
|
||||
|
||||
(def opensea-api-key OPENSEA_API_KEY)
|
||||
(def status-proxy-enabled? true)
|
||||
(def bootnodes-settings-enabled? (enabled? (get-config :BOOTNODES_SETTINGS_ENABLED "1")))
|
||||
(def mailserver-confirmations-enabled? (enabled? (get-config :MAILSERVER_CONFIRMATIONS_ENABLED)))
|
||||
(def pairing-popup-disabled? (enabled? (get-config :PAIRING_POPUP_DISABLED "0")))
|
||||
|
||||
@@ -554,14 +554,6 @@
|
||||
(def ^:const send-type-erc-721-transfer 6)
|
||||
(def ^:const send-type-erc-1155-transfer 7)
|
||||
|
||||
(def ^:const multi-transaction-type-send 0)
|
||||
(def ^:const multi-transaction-type-approve 1)
|
||||
(def ^:const multi-transaction-type-bridge 2)
|
||||
(def ^:const multi-transaction-type-swap 3)
|
||||
(def ^:const multi-transaction-type-unknown 255)
|
||||
|
||||
(def ^:const contract-function-signature-erc20-approve "approve(address,uint256)")
|
||||
|
||||
(def ^:const bridge-name-transfer "Transfer")
|
||||
(def ^:const bridge-name-erc-721-transfer "ERC721Transfer")
|
||||
(def ^:const bridge-name-erc-1155-transfer "ERC1155Transfer")
|
||||
|
||||
@@ -46,10 +46,6 @@
|
||||
(when (show-confirmation-modal? db)
|
||||
{:fx [[:dispatch
|
||||
[:show-bottom-sheet
|
||||
{:content (fn [] [modal-view])
|
||||
;; When in the profiles screen do biometric auth after the metrics sheet is dismissed
|
||||
;; https://github.com/status-im/status-mobile/issues/20932
|
||||
:on-close (when (= (:view-id db) :screen/profile.profiles)
|
||||
#(rf/dispatch [:profile.login/login-with-biometric-if-available
|
||||
(get-in db [:profile/login :key-uid])]))
|
||||
:shell? true}]]]})))
|
||||
{:content (fn [] [modal-view])
|
||||
:shell? true}]]]})))
|
||||
|
||||
|
||||
@@ -3,61 +3,37 @@
|
||||
[legacy.status-im.utils.build :as build]
|
||||
[react-native.platform :as platform]))
|
||||
|
||||
(defn key-value-event
|
||||
[event-name val-key value]
|
||||
{:metric
|
||||
{:eventName event-name
|
||||
:platform platform/os
|
||||
:appVersion build/app-short-version
|
||||
:eventValue {val-key value}}})
|
||||
|
||||
(defn user-journey-event
|
||||
[action]
|
||||
(key-value-event "user-journey" :action action))
|
||||
|
||||
(defn navigation-event
|
||||
[view-id]
|
||||
(key-value-event "navigation" :viewId view-id))
|
||||
{:metric
|
||||
{:eventName "user-journey"
|
||||
:platform platform/os
|
||||
:appVersion build/app-short-version
|
||||
:eventValue {:action action}}})
|
||||
|
||||
(def ^:const app-started-event "app-started")
|
||||
|
||||
(def ^:const view-ids-to-track
|
||||
#{;; Tabs
|
||||
:communities-stack
|
||||
:chats-stack
|
||||
:wallet-stack
|
||||
|
||||
;; Onboarding
|
||||
:screen/onboarding.intro
|
||||
:screen/onboarding.new-to-status
|
||||
:screen/onboarding.sync-or-recover-profile
|
||||
:screen/onboarding.enter-seed-phrase
|
||||
:screen/onboarding.create-profile
|
||||
:screen/onboarding.create-profile-password
|
||||
:screen/onboarding.enable-biometrics
|
||||
:screen/onboarding.generating-keys
|
||||
:screen/onboarding.enable-notifications
|
||||
:screen/onboarding.sign-in-intro
|
||||
:screen/onboarding.sign-in
|
||||
:screen/onboarding.syncing-progress
|
||||
:screen/onboarding.syncing-progress-intro
|
||||
:screen/onboarding.syncing-results
|
||||
:screen/onboarding.welcome})
|
||||
(def ^:const navigate-to-create-profile-event "navigate-to-create-profile")
|
||||
(def ^:const communities-tab-clicked "communities-tab-clicked")
|
||||
(def ^:const wallet-tab-clicked "wallet-tab-clicked")
|
||||
(def ^:const chats-tab-clicked "chats-tab-clicked")
|
||||
|
||||
(defn track-view-id-event
|
||||
[view-id]
|
||||
(when (contains? view-ids-to-track view-id)
|
||||
(navigation-event (name view-id))))
|
||||
(case view-id
|
||||
:communities-stack (user-journey-event communities-tab-clicked)
|
||||
:chats-stack (user-journey-event chats-tab-clicked)
|
||||
:wallet-stack (user-journey-event wallet-tab-clicked)
|
||||
nil))
|
||||
|
||||
(defn tracked-event
|
||||
[[event-name second-parameter]]
|
||||
(case event-name
|
||||
:onboarding/navigate-to-create-profile
|
||||
(user-journey-event navigate-to-create-profile-event)
|
||||
|
||||
:profile/get-profiles-overview-success
|
||||
(user-journey-event app-started-event)
|
||||
|
||||
:centralized-metrics/toggle-centralized-metrics
|
||||
(key-value-event "events.metrics-enabled" :enabled second-parameter)
|
||||
|
||||
:set-view-id
|
||||
(track-view-id-event second-parameter)
|
||||
|
||||
|
||||
@@ -5,75 +5,31 @@
|
||||
[react-native.platform :as platform]
|
||||
[status-im.contexts.centralized-metrics.tracking :as tracking]))
|
||||
|
||||
(def platform-os platform/os)
|
||||
(def app-version build/app-short-version)
|
||||
|
||||
(deftest key-value-event-test
|
||||
(testing "creates correct key-value event"
|
||||
(let [event-name "test-event"
|
||||
val-key :test-key
|
||||
value "test-value"
|
||||
expected {:metric
|
||||
{:eventName event-name
|
||||
:platform platform-os
|
||||
:appVersion app-version
|
||||
:eventValue {val-key value}}}]
|
||||
(is (= expected (tracking/key-value-event event-name val-key value))))))
|
||||
|
||||
(deftest user-journey-event-test
|
||||
(testing "creates correct user journey event"
|
||||
(let [action "test-action"
|
||||
expected {:metric
|
||||
{:eventName "user-journey"
|
||||
:platform platform-os
|
||||
:appVersion app-version
|
||||
:eventValue {:action action}}}]
|
||||
(testing "creates correct metric event"
|
||||
(let [action "some-action"
|
||||
expected {:metric {:eventName "user-journey"
|
||||
:platform platform/os
|
||||
:appVersion build/app-short-version
|
||||
:eventValue {:action action}}}]
|
||||
(is (= expected (tracking/user-journey-event action))))))
|
||||
|
||||
(deftest navigation-event-test
|
||||
(testing "creates correct navigation event"
|
||||
(let [view-id :test-view-id
|
||||
expected {:metric
|
||||
{:eventName "navigation"
|
||||
:platform platform-os
|
||||
:appVersion app-version
|
||||
:eventValue {:viewId view-id}}}]
|
||||
(is (= expected (tracking/navigation-event view-id))))))
|
||||
|
||||
(deftest track-view-id-event-test
|
||||
(testing "returns correct navigation event for view-id"
|
||||
(is (= {:metric
|
||||
{:eventName "navigation"
|
||||
:platform platform-os
|
||||
:appVersion app-version
|
||||
:eventValue {:viewId "communities-stack"}}}
|
||||
(testing "returns correct event for view-id"
|
||||
(is (= (tracking/user-journey-event tracking/communities-tab-clicked)
|
||||
(tracking/track-view-id-event :communities-stack)))
|
||||
(is (= {:metric
|
||||
{:eventName "navigation"
|
||||
:platform platform-os
|
||||
:appVersion app-version
|
||||
:eventValue {:viewId "onboarding.create-profile"}}}
|
||||
(tracking/track-view-id-event :screen/onboarding.create-profile)))
|
||||
(is (= (tracking/user-journey-event tracking/chats-tab-clicked)
|
||||
(tracking/track-view-id-event :chats-stack)))
|
||||
(is (= (tracking/user-journey-event tracking/wallet-tab-clicked)
|
||||
(tracking/track-view-id-event :wallet-stack)))
|
||||
(is (nil? (tracking/track-view-id-event :unknown-stack)))))
|
||||
|
||||
(deftest tracked-event-test
|
||||
(testing "returns correct event for given inputs"
|
||||
(is (= {:metric
|
||||
{:eventName "user-journey"
|
||||
:platform platform-os
|
||||
:appVersion app-version
|
||||
:eventValue {:action tracking/app-started-event}}}
|
||||
(is (= (tracking/user-journey-event tracking/navigate-to-create-profile-event)
|
||||
(tracking/tracked-event [:onboarding/navigate-to-create-profile])))
|
||||
(is (= (tracking/user-journey-event tracking/app-started-event)
|
||||
(tracking/tracked-event [:profile/get-profiles-overview-success])))
|
||||
(is (= {:metric
|
||||
{:eventName "events.metrics-enabled"
|
||||
:platform platform-os
|
||||
:appVersion app-version
|
||||
:eventValue {:enabled true}}}
|
||||
(tracking/tracked-event [:centralized-metrics/toggle-centralized-metrics true])))
|
||||
(is (= {:metric
|
||||
{:eventName "navigation"
|
||||
:platform platform-os
|
||||
:appVersion app-version
|
||||
:eventValue {:viewId "wallet-stack"}}}
|
||||
(is (= (tracking/track-view-id-event :wallet-stack)
|
||||
(tracking/tracked-event [:set-view-id :wallet-stack])))
|
||||
(is (nil? (tracking/tracked-event [:unknown-event])))))
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
[react-native.core :as rn]
|
||||
[react-native.gesture :as gesture]
|
||||
[react-native.safe-area :as safe-area]
|
||||
[reagent.core :as reagent]
|
||||
[status-im.common.contact-list-item.view :as contact-list-item]
|
||||
[status-im.common.contact-list.view :as contact-list]
|
||||
[status-im.common.home.actions.view :as actions]
|
||||
@@ -28,26 +27,28 @@
|
||||
|
||||
(defn add-member-contact-item-render
|
||||
[{:keys [public-key] :as item} _ _ {:keys [group admin? current-pk]}]
|
||||
(let [{:keys [contacts]} group
|
||||
member? (contains? contacts public-key)
|
||||
checked? (reagent/atom member?)]
|
||||
(if (or (= current-pk public-key) (and (not admin?) member?))
|
||||
(fn []
|
||||
(let [{:keys [contacts]} group
|
||||
member? (contains? contacts public-key)
|
||||
selected? (or member? (rf/sub [:contacts/is-participant-selected? public-key]))
|
||||
[checked? set-checked] (rn/use-state selected?)
|
||||
disabled? (or (= current-pk public-key) (and (not admin?) member?))]
|
||||
(let [on-toggle (fn []
|
||||
(set-checked (not checked?))
|
||||
(group-chat-member-toggle member? (not checked?) public-key))]
|
||||
(if disabled?
|
||||
[contact-list-item/contact-list-item
|
||||
{:disabled? true
|
||||
:accessory {:disabled? true
|
||||
:type :checkbox
|
||||
:checked? @checked?}}
|
||||
item])
|
||||
(fn []
|
||||
(let [on-toggle #(group-chat-member-toggle member? (swap! checked? not) public-key)]
|
||||
[contact-list-item/contact-list-item
|
||||
{:on-press on-toggle
|
||||
:allow-multiple-presses? true
|
||||
:accessory {:type :checkbox
|
||||
:checked? @checked?
|
||||
:on-check on-toggle}}
|
||||
item])))))
|
||||
:checked? checked?}}
|
||||
item]
|
||||
[contact-list-item/contact-list-item
|
||||
{:disabled? (or disabled? (and admin? member?))
|
||||
:on-press (when-not disabled? on-toggle)
|
||||
:accessory {:type :checkbox
|
||||
:checked? checked?
|
||||
:on-check on-toggle}}
|
||||
item]))))
|
||||
|
||||
(defn add-manage-members
|
||||
[{:keys [scroll-enabled? on-scroll]}]
|
||||
@@ -144,7 +145,10 @@
|
||||
{:content (fn [] [actions/group-details-actions
|
||||
group])}])}]
|
||||
:icon-name :i/arrow-left
|
||||
:on-press #(rf/dispatch [:navigate-back])}]
|
||||
:on-press (fn []
|
||||
(rf/dispatch [:group/clear-added-participants])
|
||||
(rf/dispatch [:group/clear-removed-members])
|
||||
(rf/dispatch [:navigate-back]))}]
|
||||
[quo/page-top
|
||||
{:title chat-name
|
||||
:avatar {:group? true
|
||||
|
||||
@@ -66,7 +66,8 @@
|
||||
:network/on-network-type-change
|
||||
(fn [{:keys [db]} [network-type expensive?]]
|
||||
{:db (assoc db :network/type network-type)
|
||||
:fx [[:effects.network/notify-status-go network-type expensive?]]}))
|
||||
:fx [[:effects.network/notify-status-go network-type expensive?]
|
||||
[:dispatch [:network/on-network-status-change]]]}))
|
||||
|
||||
(rf/reg-event-fx
|
||||
:network/on-network-status-change
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
:icon-name :i/close
|
||||
:right-side [{:icon-name (if light? :i/dark :i/light)
|
||||
:on-press #(if light?
|
||||
(rf/dispatch [:theme/switch {:theme :dark}])
|
||||
(rf/dispatch [:theme/switch {:theme :light}]))}]
|
||||
(rf/dispatch [:theme/switch :dark])
|
||||
(rf/dispatch [:theme/switch :light]))}]
|
||||
:on-press #(if (or logged-in? (not= (rf/sub [:view-id]) :quo-preview))
|
||||
(rf/dispatch [:navigate-back])
|
||||
(do
|
||||
(rf/dispatch [:theme/switch {:theme :dark}])
|
||||
(rf/dispatch [:theme/switch :dark])
|
||||
(rf/dispatch [:init-root root])))}]))
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
(fn []
|
||||
(rn/use-effect (fn []
|
||||
(when @blur?
|
||||
(rf/dispatch [:theme/switch {:theme :dark}])))
|
||||
(rf/dispatch [:theme/switch :dark])))
|
||||
[@blur?])
|
||||
[preview/preview-container {:state state :descriptor descriptor}
|
||||
[rn/view
|
||||
|
||||
@@ -377,8 +377,8 @@
|
||||
(rn/use-effect (fn []
|
||||
(when blur-dark-only?
|
||||
(if blur?
|
||||
(rf/dispatch [:theme/switch {:theme :dark}])
|
||||
(rf/dispatch [:theme/switch {:theme :light}]))))
|
||||
(rf/dispatch [:theme/switch :dark])
|
||||
(rf/dispatch [:theme/switch :light]))))
|
||||
[blur? blur-dark-only?])
|
||||
[rn/view
|
||||
{:style {:top (safe-area/get-top)
|
||||
|
||||
@@ -9,26 +9,21 @@
|
||||
(defn login
|
||||
[]
|
||||
{;; Temporary fix until https://github.com/status-im/status-go/issues/3024 is resolved
|
||||
:wakuV2Nameserver "8.8.8.8"
|
||||
:statusProxyEnabled config/status-proxy-enabled?
|
||||
:statusProxyMarketUser config/STATUS_BUILD_PROXY_USER
|
||||
:statusProxyMarketPassword config/STATUS_BUILD_PROXY_PASSWORD
|
||||
:statusProxyBlockchainUser config/STATUS_BUILD_PROXY_USER
|
||||
:statusProxyBlockchainPassword config/STATUS_BUILD_PROXY_PASSWORD
|
||||
:openseaAPIKey config/opensea-api-key
|
||||
:poktToken config/POKT_TOKEN
|
||||
:infuraToken config/INFURA_TOKEN
|
||||
:raribleMainnetAPIKey config/RARIBLE_MAINNET_API_KEY
|
||||
:raribleTestnetAPIKey config/RARIBLE_TESTNET_API_KEY
|
||||
:alchemyEthereumMainnetToken config/ALCHEMY_ETHEREUM_MAINNET_TOKEN
|
||||
:alchemyEthereumGoerliToken config/ALCHEMY_ETHEREUM_GOERLI_TOKEN
|
||||
:alchemyEthereumSepoliaToken config/ALCHEMY_ETHEREUM_SEPOLIA_TOKEN
|
||||
:alchemyOptimismMainnetToken config/ALCHEMY_OPTIMISM_MAINNET_TOKEN
|
||||
:alchemyOptimismGoerliToken config/ALCHEMY_OPTIMISM_GOERLI_TOKEN
|
||||
:alchemyOptimismSepoliaToken config/ALCHEMY_OPTIMISM_SEPOLIA_TOKEN
|
||||
:alchemyArbitrumMainnetToken config/ALCHEMY_ARBITRUM_MAINNET_TOKEN
|
||||
:alchemyArbitrumGoerliToken config/ALCHEMY_ARBITRUM_GOERLI_TOKEN
|
||||
:alchemyArbitrumSepoliaToken config/ALCHEMY_ARBITRUM_SEPOLIA_TOKEN})
|
||||
:wakuV2Nameserver "8.8.8.8"
|
||||
:openseaAPIKey config/opensea-api-key
|
||||
:poktToken config/POKT_TOKEN
|
||||
:infuraToken config/INFURA_TOKEN
|
||||
:raribleMainnetAPIKey config/RARIBLE_MAINNET_API_KEY
|
||||
:raribleTestnetAPIKey config/RARIBLE_TESTNET_API_KEY
|
||||
:alchemyEthereumMainnetToken config/ALCHEMY_ETHEREUM_MAINNET_TOKEN
|
||||
:alchemyEthereumGoerliToken config/ALCHEMY_ETHEREUM_GOERLI_TOKEN
|
||||
:alchemyEthereumSepoliaToken config/ALCHEMY_ETHEREUM_SEPOLIA_TOKEN
|
||||
:alchemyOptimismMainnetToken config/ALCHEMY_OPTIMISM_MAINNET_TOKEN
|
||||
:alchemyOptimismGoerliToken config/ALCHEMY_OPTIMISM_GOERLI_TOKEN
|
||||
:alchemyOptimismSepoliaToken config/ALCHEMY_OPTIMISM_SEPOLIA_TOKEN
|
||||
:alchemyArbitrumMainnetToken config/ALCHEMY_ARBITRUM_MAINNET_TOKEN
|
||||
:alchemyArbitrumGoerliToken config/ALCHEMY_ARBITRUM_GOERLI_TOKEN
|
||||
:alchemyArbitrumSepoliaToken config/ALCHEMY_ARBITRUM_SEPOLIA_TOKEN})
|
||||
|
||||
(defn create
|
||||
[]
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
(update :profile/login #(select-profile % key-uid)))
|
||||
db-with-settings)
|
||||
:fx [[:dispatch [:init-root :screen/profile.profiles]]
|
||||
(when (and key-uid userConfirmed)
|
||||
(when key-uid
|
||||
[:effects.biometric/check-if-available
|
||||
{:key-uid key-uid
|
||||
:on-success (fn [auth-method]
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
[native-module.core :as native-module]
|
||||
[status-im.common.keychain.events :as keychain]
|
||||
[status-im.config :as config]
|
||||
[status-im.constants :as constants]
|
||||
status-im.contexts.profile.login.effects
|
||||
[status-im.contexts.profile.rpc :as profile.rpc]
|
||||
[status-im.feature-flags :as ff]
|
||||
@@ -79,7 +80,11 @@
|
||||
[[:dispatch [:onboarding/finalize-setup]]]
|
||||
|
||||
:else
|
||||
[[:dispatch [:init-root :shell-stack]]
|
||||
[[:profile.settings/switch-theme-fx
|
||||
[(or (:appearance settings)
|
||||
constants/theme-type-dark)
|
||||
:shell-stack]]
|
||||
[:dispatch [:init-root :shell-stack]]
|
||||
[:dispatch [:profile/show-testnet-mode-banner-if-enabled]]]))})))
|
||||
|
||||
;; login phase 2: we want to load and show chats faster, so we split login into 2 phases
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
(ns status-im.contexts.profile.settings.effects
|
||||
(:require [native-module.core :as native-module]
|
||||
[re-frame.core :as re-frame]
|
||||
[react-native.platform :as platform]))
|
||||
[react-native.platform :as platform]
|
||||
[status-im.common.theme.core :as theme]
|
||||
[status-im.constants :as constants]
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
(re-frame/reg-fx
|
||||
:profile.settings/blank-preview-flag-changed
|
||||
@@ -13,3 +16,15 @@
|
||||
(fn [value]
|
||||
(when platform/android?
|
||||
(native-module/toggle-webview-debug value))))
|
||||
|
||||
(re-frame/reg-fx
|
||||
:profile.settings/switch-theme-fx
|
||||
(fn [[theme-type view-id]]
|
||||
(let [theme (if (or (= theme-type constants/theme-type-dark)
|
||||
(and (= theme-type constants/theme-type-system)
|
||||
(theme/device-theme-dark?)))
|
||||
:dark
|
||||
:light)]
|
||||
(theme/set-legacy-theme theme)
|
||||
(rf/dispatch [:theme/switch theme])
|
||||
(rf/dispatch [:reload-status-nav-color view-id]))))
|
||||
|
||||
@@ -95,7 +95,14 @@
|
||||
(rf/reg-event-fx :profile.settings/change-appearance
|
||||
(fn [_ [theme]]
|
||||
{:fx [[:dispatch [:profile.settings/profile-update :appearance theme]]
|
||||
[:dispatch [:theme/switch {:theme-type theme}]]]}))
|
||||
[:profile.settings/switch-theme-fx [theme :appearance]]]}))
|
||||
|
||||
(rf/reg-event-fx :profile.settings/switch-theme
|
||||
(fn [{:keys [db]} [theme view-id]]
|
||||
(let [theme (or theme
|
||||
(get-in db [:profile/profile :appearance])
|
||||
constants/theme-type-dark)]
|
||||
{:fx [[:profile.settings/switch-theme-fx [theme view-id]]]})))
|
||||
|
||||
(rf/reg-fx :profile.settings/get-profile-picture
|
||||
(fn [key-uid]
|
||||
|
||||
@@ -1,47 +1,33 @@
|
||||
(ns status-im.contexts.shell.qr-reader.sheets.scanned-wallet-address
|
||||
(:require
|
||||
[quo.core :as quo]
|
||||
[react-native.clipboard :as clipboard]
|
||||
[status-im.contexts.wallet.common.utils :as utils]
|
||||
[status-im.contexts.wallet.common.utils.networks :as network-utils]
|
||||
[status-im.feature-flags :as ff]
|
||||
[utils.i18n :as i18n]
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
(defn- copy-address
|
||||
[address]
|
||||
(clipboard/set-string address)
|
||||
(rf/dispatch [:toasts/upsert
|
||||
{:type :positive
|
||||
:text (i18n/label :t/address-copied)}]))
|
||||
|
||||
#_(defn- send-to-address
|
||||
[address]
|
||||
(let [[_ split-address] (network-utils/split-network-full-address address)]
|
||||
(rf/dispatch
|
||||
[:wallet/select-send-address
|
||||
{:address address
|
||||
:recipient {:recipient-type :address
|
||||
:label (utils/get-shortened-address split-address)}
|
||||
:stack-id :wallet-select-address
|
||||
:start-flow? true}])))
|
||||
|
||||
(defn view
|
||||
[address]
|
||||
[:<>
|
||||
[quo/drawer-top {:title address :type :address}]
|
||||
[quo/action-drawer
|
||||
[[{:icon :i/copy
|
||||
:accessibility-label :send-asset
|
||||
:label (i18n/label :t/copy-address)
|
||||
:on-press #(copy-address address)}
|
||||
;; Originally, the flow went to the send flow, but it has been removed to avoid bugs,
|
||||
;; please check https://github.com/status-im/status-mobile/issues/20972 for more context
|
||||
;; The previous code has been commented out to be reintroduced in the future easily.
|
||||
#_{:icon :i/send
|
||||
(let [[_ splitted-address] (network-utils/split-network-full-address address)]
|
||||
[:<>
|
||||
[quo/drawer-top
|
||||
{:title address
|
||||
:type :address}]
|
||||
[quo/action-drawer
|
||||
[[{:icon :i/send
|
||||
:accessibility-label :send-asset
|
||||
:label (i18n/label :t/send-to-this-address)
|
||||
:on-press #(send-to-address address)}
|
||||
(when (ff/enabled? :ff/wallet.saved-addresses)
|
||||
{:icon :i/save
|
||||
:accessibility-label :save-address
|
||||
:label (i18n/label :t/save-address)
|
||||
:on-press #(js/alert "feature not implemented")})]]]])
|
||||
:on-press (fn []
|
||||
(rf/dispatch [:wallet/select-send-address
|
||||
{:address address
|
||||
:recipient {:recipient-type :address
|
||||
:label (utils/get-shortened-address
|
||||
splitted-address)}
|
||||
:stack-id :wallet-select-address
|
||||
:start-flow? true}]))}
|
||||
(when (ff/enabled? :ff/wallet.saved-addresses)
|
||||
{:icon :i/save
|
||||
:accessibility-label :save-address
|
||||
:label (i18n/label :t/save-address)
|
||||
:on-press #(js/alert "feature not implemented")})]]]]))
|
||||
|
||||
@@ -6,12 +6,11 @@
|
||||
|
||||
(defn collectible-balance
|
||||
[collectible]
|
||||
(let [balance (-> collectible
|
||||
:ownership
|
||||
first
|
||||
:balance
|
||||
js/parseInt)]
|
||||
(if (js/Number.isNaN balance) 0 balance)))
|
||||
(-> collectible
|
||||
:ownership
|
||||
first
|
||||
:balance
|
||||
js/parseInt))
|
||||
|
||||
(def supported-collectible-types
|
||||
#{"image/jpeg"
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
[status-im.contexts.wallet.sheets.buy-token.view :as buy-token]
|
||||
[status-im.feature-flags :as ff]
|
||||
[utils.i18n :as i18n]
|
||||
[utils.money :as money]
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
(defn- action-buy
|
||||
@@ -22,7 +21,6 @@
|
||||
{:icon :i/send
|
||||
:accessibility-label :send
|
||||
:label (i18n/label :t/send)
|
||||
:disabled? (:disabled? send-params)
|
||||
:on-press (fn []
|
||||
(rf/dispatch [:hide-bottom-sheet])
|
||||
(rf/dispatch [:wallet/clean-send-data])
|
||||
@@ -71,35 +69,31 @@
|
||||
|
||||
(defn token-value-drawer
|
||||
[token watch-only? entry-point]
|
||||
(let [token-symbol (:token token)
|
||||
token-data (first (rf/sub [:wallet/current-viewing-account-tokens-filtered
|
||||
token-symbol]))
|
||||
fiat-unformatted-value (get-in token [:values :fiat-unformatted-value])
|
||||
has-balance? (money/greater-than fiat-unformatted-value (money/bignumber "0"))
|
||||
selected-account? (rf/sub [:wallet/current-viewing-account-address])
|
||||
token-owners (rf/sub [:wallet/operable-addresses-with-token-symbol token-symbol])
|
||||
send-params (if selected-account?
|
||||
{:token token-data
|
||||
:stack-id :screen/wallet.accounts
|
||||
:disabled? (not has-balance?)
|
||||
:start-flow? true
|
||||
:owners token-owners}
|
||||
{:token-symbol token-symbol
|
||||
:stack-id :wallet-stack
|
||||
:start-flow? true
|
||||
:owners token-owners})
|
||||
bridge-params (if selected-account?
|
||||
{:token token-data
|
||||
:bridge-disabled? (or (not has-balance?)
|
||||
(send-utils/bridge-disabled? token-symbol))
|
||||
:stack-id :screen/wallet.accounts
|
||||
:start-flow? true
|
||||
:owners token-owners}
|
||||
{:token-symbol token-symbol
|
||||
:bridge-disabled? (send-utils/bridge-disabled? token-symbol)
|
||||
:stack-id :wallet-stack
|
||||
:start-flow? true
|
||||
:owners token-owners})]
|
||||
(let [token-symbol (:token token)
|
||||
token-data (first (rf/sub [:wallet/current-viewing-account-tokens-filtered
|
||||
token-symbol]))
|
||||
selected-account? (rf/sub [:wallet/current-viewing-account-address])
|
||||
token-owners (rf/sub [:wallet/operable-addresses-with-token-symbol token-symbol])
|
||||
send-params (if selected-account?
|
||||
{:token token-data
|
||||
:stack-id :screen/wallet.accounts
|
||||
:start-flow? true
|
||||
:owners token-owners}
|
||||
{:token-symbol token-symbol
|
||||
:stack-id :wallet-stack
|
||||
:start-flow? true
|
||||
:owners token-owners})
|
||||
bridge-params (if selected-account?
|
||||
{:token token-data
|
||||
:bridge-disabled? (send-utils/bridge-disabled? token-symbol)
|
||||
:stack-id :screen/wallet.accounts
|
||||
:start-flow? true
|
||||
:owners token-owners}
|
||||
{:token-symbol token-symbol
|
||||
:bridge-disabled? (send-utils/bridge-disabled? token-symbol)
|
||||
:stack-id :wallet-stack
|
||||
:start-flow? true
|
||||
:owners token-owners})]
|
||||
[quo/action-drawer
|
||||
[(cond->> [(when (ff/enabled? ::ff/wallet.assets-modal-manage-tokens)
|
||||
(action-manage-tokens watch-only?))
|
||||
|
||||
@@ -213,7 +213,8 @@
|
||||
[new-path]
|
||||
(let [bonder-fees (:tx-bonder-fees new-path)
|
||||
token-fees (+ (money/wei->ether bonder-fees)
|
||||
(money/wei->ether (:tx-token-fees new-path)))]
|
||||
(money/wei->ether
|
||||
(:tx-token-fees new-path)))]
|
||||
{:from (:from-chain new-path)
|
||||
:amount-in-locked (:amount-in-locked new-path)
|
||||
:amount-in (:amount-in new-path)
|
||||
|
||||
@@ -274,7 +274,7 @@
|
||||
(rf/reg-event-fx :wallet/get-keypairs get-keypairs)
|
||||
|
||||
(rf/reg-event-fx :wallet/bridge-select-token
|
||||
(fn [{:keys [db]} [{:keys [token token-symbol stack-id start-flow?]}]]
|
||||
(fn [{:keys [db]} [{:keys [token token-symbol stack-id]}]]
|
||||
(let [missing-recipient? (-> db :wallet :ui :send :to-address nil?)
|
||||
to-address (-> db :wallet :current-viewing-account-address)]
|
||||
{:db (cond-> db
|
||||
@@ -285,7 +285,7 @@
|
||||
:fx [[:dispatch
|
||||
[:wallet/wizard-navigate-forward
|
||||
{:current-screen stack-id
|
||||
:start-flow? start-flow?
|
||||
:start-flow? true
|
||||
:flow-id :wallet-bridge-flow}]]]})))
|
||||
|
||||
(rf/reg-event-fx :wallet/start-bridge
|
||||
|
||||
@@ -21,13 +21,12 @@
|
||||
:label (i18n/label :t/add-account)
|
||||
:sub-label (i18n/label :t/add-account-description)
|
||||
:on-press #(rf/dispatch [:navigate-to :screen/wallet.create-account])}
|
||||
(when (ff/enabled? ::ff/wallet.add-watched-address)
|
||||
{:icon :i/reveal
|
||||
:accessibility-label :add-a-contact
|
||||
:label (i18n/label :t/add-address-to-watch)
|
||||
:sub-label (i18n/label :t/add-address-to-watch-description)
|
||||
:on-press #(rf/dispatch [:navigate-to :screen/wallet.add-address-to-watch])
|
||||
:add-divider? true})]]])
|
||||
{:icon :i/reveal
|
||||
:accessibility-label :add-a-contact
|
||||
:label (i18n/label :t/add-address-to-watch)
|
||||
:sub-label (i18n/label :t/add-address-to-watch-description)
|
||||
:on-press #(rf/dispatch [:navigate-to :screen/wallet.add-address-to-watch])
|
||||
:add-divider? true}]]])
|
||||
|
||||
(defn- new-account-card-data
|
||||
[]
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
[status-im.contexts.wallet.send.utils :as send-utils]
|
||||
[taoensso.timbre :as log]
|
||||
[utils.address :as address]
|
||||
[utils.hex :as utils.hex]
|
||||
[utils.money :as money]
|
||||
[utils.number]
|
||||
[utils.re-frame :as rf]))
|
||||
@@ -77,11 +76,11 @@
|
||||
:token-networks-ids token-networks-ids
|
||||
:tx-type tx-type
|
||||
:receiver? true})
|
||||
(cond->
|
||||
(->
|
||||
(send-utils/reset-loading-network-amounts-to-zero
|
||||
receiver-network-values)
|
||||
|
||||
(not= tx-type :tx/bridge) (conj {:type :edit})))
|
||||
vec
|
||||
(conj {:type :edit})))
|
||||
network-links (when routes-available?
|
||||
(send-utils/network-links chosen-route
|
||||
sender-network-values
|
||||
@@ -105,7 +104,9 @@
|
||||
cleaned-receiver-network-values (-> (get-in db [:wallet :ui :send :receiver-network-values])
|
||||
(send-utils/reset-loading-network-amounts-to-zero))]
|
||||
{:db (-> db
|
||||
(update-in [:wallet :ui :send] dissoc :route)
|
||||
(update-in [:wallet :ui :send]
|
||||
dissoc
|
||||
:route)
|
||||
(assoc-in [:wallet :ui :send :sender-network-values] cleaned-sender-network-values)
|
||||
(assoc-in [:wallet :ui :send :receiver-network-values] cleaned-receiver-network-values)
|
||||
(assoc-in [:wallet :ui :send :loading-suggested-routes?] false)
|
||||
@@ -205,7 +206,7 @@
|
||||
{:db (cond-> db
|
||||
:always (update-in [:wallet :ui :send]
|
||||
#(-> %
|
||||
(dissoc :collectible :tx-type)
|
||||
(dissoc :collectible)
|
||||
(assoc :token-not-supported-in-receiver-networks?
|
||||
unsupported-token?)))
|
||||
token-symbol (assoc-in [:wallet :ui :send :token-symbol] token-symbol)
|
||||
@@ -217,11 +218,6 @@
|
||||
entry-point (assoc-in [:wallet :ui :send :entry-point] entry-point))
|
||||
:fx [[:dispatch [:wallet/clean-suggested-routes]]
|
||||
[:dispatch
|
||||
;; ^:flush-dom allows us to make sure the re-frame DB state is always synced
|
||||
;; before the navigation occurs, so the new screen is always rendered with
|
||||
;; the DB state set by this event. By adding the metadata we are omitting
|
||||
;; a 1-frame blink when the screen is mounted.
|
||||
^:flush-dom
|
||||
[:wallet/wizard-navigate-forward
|
||||
{:current-screen stack-id
|
||||
:start-flow? start-flow?
|
||||
@@ -406,11 +402,11 @@
|
||||
receiver-networks)))
|
||||
network-chain-ids))
|
||||
from-locked-amount (update-vals from-locked-amounts to-hex)
|
||||
send-type (case tx-type
|
||||
:tx/collectible-erc-721 constants/send-type-erc-721-transfer
|
||||
:tx/collectible-erc-1155 constants/send-type-erc-1155-transfer
|
||||
:tx/bridge constants/send-type-bridge
|
||||
constants/send-type-transfer)
|
||||
transaction-type (case tx-type
|
||||
:tx/collectible-erc-721 constants/send-type-erc-721-transfer
|
||||
:tx/collectible-erc-1155 constants/send-type-erc-1155-transfer
|
||||
:tx/bridge constants/send-type-bridge
|
||||
constants/send-type-transfer)
|
||||
balances-per-chain (when token (:balances-per-chain token))
|
||||
sender-token-available-networks-for-suggested-routes
|
||||
(when token
|
||||
@@ -451,7 +447,7 @@
|
||||
:tx-type tx-type
|
||||
:receiver? true}))
|
||||
params [{:uuid (str (random-uuid))
|
||||
:sendType send-type
|
||||
:sendType transaction-type
|
||||
:addrFrom from-address
|
||||
:addrTo to-address
|
||||
:amountIn amount-in
|
||||
@@ -494,48 +490,24 @@
|
||||
{:event :wallet/stop-get-suggested-routes
|
||||
:error error}))}]}))
|
||||
|
||||
(defn- bridge-amount-greater-than-bonder-fees?
|
||||
[{{token-decimals :decimals} :from-token
|
||||
bonder-fees :tx-bonder-fees
|
||||
amount-in :amount-in}]
|
||||
(let [bonder-fees (utils.money/token->unit bonder-fees token-decimals)
|
||||
amount-to-bridge (utils.money/token->unit amount-in token-decimals)]
|
||||
(> amount-to-bridge bonder-fees)))
|
||||
|
||||
(defn- remove-multichain-routes
|
||||
[routes]
|
||||
(if (> (count routes) 1)
|
||||
[] ;; if route is multichain, we remove it
|
||||
routes))
|
||||
|
||||
(defn- remove-invalid-bonder-fees-routes
|
||||
[routes]
|
||||
(filter bridge-amount-greater-than-bonder-fees? routes))
|
||||
|
||||
(defn- ->old-route-paths
|
||||
[routes]
|
||||
(map data-store/new->old-route-path routes))
|
||||
|
||||
(rf/reg-event-fx
|
||||
:wallet/handle-suggested-routes
|
||||
(rf/reg-event-fx :wallet/handle-suggested-routes
|
||||
(fn [_ data]
|
||||
(if-let [{:keys [code details]} (-> data :ErrorResponse first)]
|
||||
(let [error-message (if (= code "0") "An error occurred" details)]
|
||||
(if-let [error (some-> data
|
||||
first
|
||||
:ErrorResponse
|
||||
(#(if (= (:code %) "0") "An error occurred" (:details %))))]
|
||||
(do
|
||||
(log/error "failed to get suggested routes (async)"
|
||||
{:event :wallet/handle-suggested-routes
|
||||
:error error-message})
|
||||
{:fx [[:dispatch [:wallet/suggested-routes-error error-message]]]})
|
||||
(let [best-routes-fix (comp ->old-route-paths
|
||||
remove-invalid-bonder-fees-routes
|
||||
remove-multichain-routes)
|
||||
candidates-fix (comp ->old-route-paths
|
||||
remove-invalid-bonder-fees-routes)
|
||||
routes (-> data
|
||||
(first)
|
||||
(data-store/rpc->suggested-routes)
|
||||
(update :best best-routes-fix)
|
||||
(update :candidates candidates-fix))]
|
||||
{:fx [[:dispatch [:wallet/suggested-routes-success routes]]]}))))
|
||||
:error error})
|
||||
{:fx [[:dispatch [:wallet/suggested-routes-error error]]]})
|
||||
(let [suggested-routes-new-data (data-store/rpc->suggested-routes data)
|
||||
suggested-routes (-> suggested-routes-new-data
|
||||
first
|
||||
(update :best #(map data-store/new->old-route-path %))
|
||||
(update :candidates #(map data-store/new->old-route-path %)))]
|
||||
{:fx [[:dispatch
|
||||
[:wallet/suggested-routes-success suggested-routes]]]}))))
|
||||
|
||||
(rf/reg-event-fx :wallet/add-authorized-transaction
|
||||
(fn [{:keys [db]} [transaction]]
|
||||
@@ -609,29 +581,6 @@
|
||||
:gwei
|
||||
gas-price))))))
|
||||
|
||||
(defn- approval-path
|
||||
[{:keys [route from-address to-address token-address]}]
|
||||
(let [{:keys [from]} route
|
||||
from-chain-id (:chain-id from)
|
||||
approval-amount-required (:approval-amount-required route)
|
||||
approval-amount-required-sanitized (-> approval-amount-required
|
||||
(utils.hex/normalize-hex)
|
||||
(native-module/hex-to-number))
|
||||
approval-contract-address (:approval-contract-address route)
|
||||
data (native-module/encode-function-call
|
||||
constants/contract-function-signature-erc20-approve
|
||||
[approval-contract-address
|
||||
approval-amount-required-sanitized])
|
||||
tx-data (transaction-data {:from-address from-address
|
||||
:to-address to-address
|
||||
:token-address token-address
|
||||
:route route
|
||||
:data data
|
||||
:eth-transfer? false})]
|
||||
{:BridgeName constants/bridge-name-transfer
|
||||
:ChainID from-chain-id
|
||||
:TransferTx tx-data}))
|
||||
|
||||
(defn- transaction-path
|
||||
[{:keys [from-address to-address token-id token-address route data eth-transfer?]}]
|
||||
(let [{:keys [bridge-name amount-in bonder-fees from
|
||||
@@ -668,8 +617,7 @@
|
||||
(= bridge-name constants/bridge-name-hop)
|
||||
(assoc :HopTx
|
||||
(assoc tx-data
|
||||
:ChainID from-chain-id
|
||||
:ChainIDTo to-chain-id
|
||||
:ChainID to-chain-id
|
||||
:Symbol token-id
|
||||
:Recipient to-address
|
||||
:Amount amount-in
|
||||
@@ -686,14 +634,14 @@
|
||||
:Amount amount-in)))))
|
||||
|
||||
(defn- multi-transaction-command
|
||||
[{:keys [from-address to-address from-asset to-asset amount-out multi-transaction-type]
|
||||
:or {multi-transaction-type constants/multi-transaction-type-unknown}}]
|
||||
[{:keys [from-address to-address from-asset to-asset amount-out transfer-type]
|
||||
:or {transfer-type constants/send-type-transfer}}]
|
||||
{:fromAddress from-address
|
||||
:toAddress to-address
|
||||
:fromAsset from-asset
|
||||
:toAsset to-asset
|
||||
:fromAmount amount-out
|
||||
:type multi-transaction-type})
|
||||
:type transfer-type})
|
||||
|
||||
(rf/reg-event-fx :wallet/send-transaction
|
||||
(fn [{:keys [db]} [sha3-pwd]]
|
||||
@@ -701,9 +649,11 @@
|
||||
first-route (first routes)
|
||||
from-address (get-in db [:wallet :current-viewing-account-address])
|
||||
transaction-type (get-in db [:wallet :ui :send :tx-type])
|
||||
multi-transaction-type (if (= :tx/bridge transaction-type)
|
||||
constants/multi-transaction-type-bridge
|
||||
constants/multi-transaction-type-send)
|
||||
transaction-type-param (case transaction-type
|
||||
:tx/collectible-erc-721 constants/send-type-erc-721-transfer
|
||||
:tx/collectible-erc-1155 constants/send-type-erc-1155-transfer
|
||||
:tx/bridge constants/send-type-bridge
|
||||
constants/send-type-transfer)
|
||||
token (get-in db [:wallet :ui :send :token])
|
||||
collectible (get-in db [:wallet :ui :send :collectible])
|
||||
first-route-from-chain-id (get-in first-route [:from :chain-id])
|
||||
@@ -718,41 +668,30 @@
|
||||
erc20-transfer?
|
||||
(get-in token [:balances-per-chain first-route-from-chain-id :address]))
|
||||
to-address (get-in db [:wallet :ui :send :to-address])
|
||||
transaction-paths (into []
|
||||
(mapcat
|
||||
(fn [route]
|
||||
(let [approval-required? (:approval-required route)
|
||||
data (when erc20-transfer?
|
||||
(native-module/encode-transfer
|
||||
(address/normalized-hex to-address)
|
||||
(:amount-in route)))
|
||||
base-path (transaction-path
|
||||
{:to-address to-address
|
||||
:from-address from-address
|
||||
:route route
|
||||
:token-address token-address
|
||||
:token-id (if collectible
|
||||
(money/to-hex
|
||||
(js/parseInt token-id))
|
||||
token-id)
|
||||
:data data
|
||||
:eth-transfer? eth-transfer?})]
|
||||
(if approval-required?
|
||||
[(approval-path {:route route
|
||||
:token-address token-address
|
||||
:from-address from-address
|
||||
:to-address to-address})
|
||||
base-path]
|
||||
[base-path]))))
|
||||
transaction-paths (mapv (fn [route]
|
||||
(let [data (when erc20-transfer?
|
||||
(native-module/encode-transfer
|
||||
(address/normalized-hex to-address)
|
||||
(:amount-in route)))]
|
||||
(transaction-path {:to-address to-address
|
||||
:from-address from-address
|
||||
:route route
|
||||
:token-address token-address
|
||||
:token-id (if collectible
|
||||
(money/to-hex (js/parseInt
|
||||
token-id))
|
||||
token-id)
|
||||
:data data
|
||||
:eth-transfer? eth-transfer?})))
|
||||
routes)
|
||||
request-params
|
||||
[(multi-transaction-command
|
||||
{:from-address from-address
|
||||
:to-address to-address
|
||||
:from-asset token-id
|
||||
:to-asset token-id
|
||||
:amount-out (if eth-transfer? (:amount-out first-route) "0x0")
|
||||
:multi-transaction-type multi-transaction-type})
|
||||
{:from-address from-address
|
||||
:to-address to-address
|
||||
:from-asset token-id
|
||||
:to-asset token-id
|
||||
:amount-out (if eth-transfer? (:amount-out first-route) "0x0")
|
||||
:transfer-type transaction-type-param})
|
||||
transaction-paths
|
||||
sha3-pwd]]
|
||||
(log/info "multi transaction called")
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
(ns status-im.contexts.wallet.send.events-test
|
||||
(:require
|
||||
[cljs.test :refer-macros [is testing run-tests]]
|
||||
matcher-combinators.test
|
||||
[cljs.test :refer-macros [is testing]]
|
||||
[re-frame.db :as rf-db]
|
||||
[status-im.contexts.wallet.common.utils.networks :as network-utils]
|
||||
status-im.contexts.wallet.send.events
|
||||
@@ -15,10 +14,7 @@
|
||||
:description
|
||||
"dogs are cute and this one is the cutestdogs are cute and this one is the cutest"
|
||||
:ownership [{:address "0x01"
|
||||
:balance balance}]
|
||||
:id {:contract-id {:address "0x11"
|
||||
:chain-id 1}
|
||||
:token-id "some-id"}})
|
||||
:balance balance}]})
|
||||
|
||||
(h/deftest-event :wallet/update-receiver-networks
|
||||
[event-id dispatch]
|
||||
@@ -174,14 +170,13 @@
|
||||
:networks #{{:chain-id 421614}
|
||||
{:chain-id 11155420}
|
||||
{:chain-id 11155111}}}
|
||||
receiver-networks [421614 11155420]
|
||||
expected-db {:wallet {:ui {:other-props :value}}}]
|
||||
receiver-networks [421614 11155420]]
|
||||
(reset! rf-db/app-db
|
||||
{:wallet {:ui {:send {:token-display-name token-symbol
|
||||
:token token
|
||||
:receiver-networks receiver-networks}
|
||||
:other-props :value}}})
|
||||
(is (match-strict? expected-db (:db (dispatch [event-id]))))))
|
||||
(is (not (contains? (get-in (dispatch [event-id]) [:db :wallet :ui]) :send)))))
|
||||
|
||||
(h/deftest-event :wallet/select-address-tab
|
||||
[event-id dispatch]
|
||||
@@ -192,37 +187,38 @@
|
||||
|
||||
(h/deftest-event :wallet/clean-send-address
|
||||
[event-id dispatch]
|
||||
(let [expected-db {:wallet {:ui {:send {:other-props :value}}}}]
|
||||
(reset! rf-db/app-db
|
||||
{:wallet {:ui {:send {:to-address "0x01"
|
||||
:recipient {:recipient-type :saved-address
|
||||
:label "label"}
|
||||
:other-props :value}}}})
|
||||
(is (match-strict? expected-db (:db (dispatch [event-id]))))))
|
||||
(reset! rf-db/app-db
|
||||
{:wallet {:ui {:send {:to-address "0x01"
|
||||
:recipient {:recipient-type :saved-address
|
||||
:label "label"}
|
||||
:other-props :value}}}})
|
||||
(is (not (contains? (get-in (dispatch [event-id]) [:db :wallet :ui :send]) :to-address)))
|
||||
(is (not (contains? (get-in (dispatch [event-id]) [:db :wallet :ui :send]) :recipient)))
|
||||
(is (contains? (get-in (dispatch [event-id]) [:db :wallet :ui :send]) :other-props)))
|
||||
|
||||
(h/deftest-event :wallet/clean-send-amount
|
||||
[event-id dispatch]
|
||||
(let [expected-db {:wallet {:ui {:send {:other-props :value}}}}]
|
||||
(reset! rf-db/app-db
|
||||
{:wallet {:ui {:send {:amount 10
|
||||
:other-props :value}}}})
|
||||
(is (match-strict? expected-db (:db (dispatch [event-id]))))))
|
||||
(reset! rf-db/app-db
|
||||
{:wallet {:ui {:send {:amount 10
|
||||
:other-props :value}}}})
|
||||
(is (not (contains? (get-in (dispatch [event-id]) [:db :wallet :ui :send]) :amount)))
|
||||
(is (contains? (get-in (dispatch [event-id]) [:db :wallet :ui :send]) :other-props)))
|
||||
|
||||
(h/deftest-event :wallet/clean-disabled-from-networks
|
||||
[event-id dispatch]
|
||||
(let [expected-db {:wallet {:ui {:send {:other-props :value}}}}]
|
||||
(reset! rf-db/app-db
|
||||
{:wallet {:ui {:send {:disabled-from-chain-ids [:optimism]
|
||||
:other-props :value}}}})
|
||||
(is (match-strict? expected-db (:db (dispatch [event-id]))))))
|
||||
(reset! rf-db/app-db
|
||||
{:wallet {:ui {:send {:disabled-from-chain-ids [:optimism]
|
||||
:other-props :value}}}})
|
||||
(is (not (contains? (get-in (dispatch [event-id]) [:db :wallet :ui :send]) :disabled-from-chain-ids)))
|
||||
(is (contains? (get-in (dispatch [event-id]) [:db :wallet :ui :send]) :other-props)))
|
||||
|
||||
(h/deftest-event :wallet/clean-from-locked-amounts
|
||||
[event-id dispatch]
|
||||
(let [expected-db {:wallet {:ui {:send {:other-props :value}}}}]
|
||||
(reset! rf-db/app-db
|
||||
{:wallet {:ui {:send {:from-locked-amounts "value"
|
||||
:other-props :value}}}})
|
||||
(is (match-strict? expected-db (:db (dispatch [event-id]))))))
|
||||
(reset! rf-db/app-db
|
||||
{:wallet {:ui {:send {:from-locked-amounts "value"
|
||||
:other-props :value}}}})
|
||||
(is (not (contains? (get-in (dispatch [event-id]) [:db :wallet :ui :send]) :from-locked-amounts)))
|
||||
(is (contains? (get-in (dispatch [event-id]) [:db :wallet :ui :send]) :other-props)))
|
||||
|
||||
(h/deftest-event :wallet/disable-from-networks
|
||||
[event-id dispatch]
|
||||
@@ -251,42 +247,55 @@
|
||||
|
||||
(h/deftest-event :wallet/clean-selected-token
|
||||
[event-id dispatch]
|
||||
(let [expected-db {:wallet {:ui {:send {:other-props :value}}}}]
|
||||
(reset! rf-db/app-db
|
||||
{:wallet {:ui {:send {:other-props :value
|
||||
:token "ETH"
|
||||
:token-display-name "ETH"
|
||||
:tx-type :tx/collectible-erc-721}}}})
|
||||
(is (match-strict? expected-db (:db (dispatch [event-id]))))))
|
||||
(reset! rf-db/app-db
|
||||
{:wallet {:ui {:send {:other-props :value
|
||||
:token "ETH"
|
||||
:token-display-name "ETH"
|
||||
:tx-type :tx/collectible-erc-721}}}})
|
||||
(is (not (contains? (get-in (dispatch [event-id]) [:db :wallet :ui :send]) :token)))
|
||||
(is (not (contains? (get-in (dispatch [event-id]) [:db :wallet :ui :send]) :token-display-name)))
|
||||
(is (not (contains? (get-in (dispatch [event-id]) [:db :wallet :ui :send]) :tx-type)))
|
||||
(is (contains? (get-in (dispatch [event-id]) [:db :wallet :ui :send]) :other-props)))
|
||||
|
||||
(h/deftest-event :wallet/clean-selected-collectible
|
||||
[event-id dispatch]
|
||||
(let [expected-db {:wallet {:ui {:send {:other-props :value}}}}]
|
||||
(reset! rf-db/app-db
|
||||
{:wallet {:ui {:send {:other-props :value
|
||||
:collectible "ETH"
|
||||
:token-display-name "ETH"
|
||||
:amount 10}}}})
|
||||
(is (match-strict? expected-db (:db (dispatch [event-id]))))))
|
||||
(reset! rf-db/app-db
|
||||
{:wallet {:ui {:send {:other-props :value
|
||||
:collectible "ETH"
|
||||
:token-display-name "ETH"
|
||||
:amount 10}}}})
|
||||
(is (not (contains? (get-in (dispatch [event-id]) [:db :wallet :ui :send]) :collectible)))
|
||||
(is (not (contains? (get-in (dispatch [event-id]) [:db :wallet :ui :send]) :token-display-name)))
|
||||
(is (not (contains? (get-in (dispatch [event-id]) [:db :wallet :ui :send]) :amount)))
|
||||
(is (contains? (get-in (dispatch [event-id]) [:db :wallet :ui :send]) :other-props)))
|
||||
|
||||
(h/deftest-event :wallet/clean-suggested-routes
|
||||
[event-id dispatch]
|
||||
(let [expected-db {:wallet {:ui {:send {:other-props :value}}}}]
|
||||
(reset! rf-db/app-db
|
||||
{:wallet {:ui {:send
|
||||
{:other-props :value
|
||||
:suggested-routes ["1" "2"]
|
||||
:route "1"
|
||||
:amount 10
|
||||
:from-values-by-chain [{:chain-id 1} {:chain-id 10} {:chain-id 42161}]
|
||||
:to-values-by-chain [{:chain-id 1} {:chain-id 10} {:chain-id 42161}]
|
||||
:sender-network-values [:eth :arb1]
|
||||
:receiver-network-values [:eth :arb1]
|
||||
:network-links [{:from-chain-id 1
|
||||
:to-chain-id 10
|
||||
:position-diff 1}]
|
||||
:loading-suggested-routes? false}}}})
|
||||
(is (match-strict? expected-db (:db (dispatch [event-id]))))))
|
||||
(reset! rf-db/app-db
|
||||
{:wallet {:ui {:send
|
||||
{:other-props :value
|
||||
:suggested-routes ["1" "2"]
|
||||
:route "1"
|
||||
:amount 10
|
||||
:from-values-by-chain [{:chain-id 1} {:chain-id 10} {:chain-id 42161}]
|
||||
:to-values-by-chain [{:chain-id 1} {:chain-id 10} {:chain-id 42161}]
|
||||
:sender-network-values [:eth :arb1]
|
||||
:receiver-network-values [:eth :arb1]
|
||||
:network-links [{:from-chain-id 1
|
||||
:to-chain-id 10
|
||||
:position-diff 1}]
|
||||
:loading-suggested-routes? false}}}})
|
||||
(is (not (contains? (get-in (dispatch [event-id]) [:db :wallet :ui :send]) :suggested-routes)))
|
||||
(is (not (contains? (get-in (dispatch [event-id]) [:db :wallet :ui :send]) :route)))
|
||||
(is (not (contains? (get-in (dispatch [event-id]) [:db :wallet :ui :send]) :amount)))
|
||||
(is (not (contains? (get-in (dispatch [event-id]) [:db :wallet :ui :send]) :from-values-by-chain)))
|
||||
(is (not (contains? (get-in (dispatch [event-id]) [:db :wallet :ui :send]) :to-values-by-chain)))
|
||||
(is (not (contains? (get-in (dispatch [event-id]) [:db :wallet :ui :send]) :sender-network-values)))
|
||||
(is (not (contains? (get-in (dispatch [event-id]) [:db :wallet :ui :send]) :receiver-network-values)))
|
||||
(is (not (contains? (get-in (dispatch [event-id]) [:db :wallet :ui :send]) :network-links)))
|
||||
(is (not (contains? (get-in (dispatch [event-id]) [:db :wallet :ui :send])
|
||||
:loading-suggested-routes?)))
|
||||
(is (contains? (get-in (dispatch [event-id]) [:db :wallet :ui :send]) :other-props)))
|
||||
|
||||
(h/deftest-event :wallet/suggested-routes-error
|
||||
[event-id dispatch]
|
||||
@@ -444,287 +453,3 @@
|
||||
:recipient recipient
|
||||
:stack-id stack-id
|
||||
:start-flow? start-flow?}])))))))
|
||||
|
||||
(h/deftest-event :wallet/suggested-routes-success
|
||||
[event-id dispatch]
|
||||
(let [timestamp :timestamp
|
||||
suggested-routes {:Best
|
||||
[{:From {:isTest false
|
||||
:chainName "Arbitrum"
|
||||
:chainId 42161}
|
||||
:AmountInLocked false
|
||||
:AmountIn "0x5af3107a4000"
|
||||
:MaxAmountIn "0x4f7920c6831d6"
|
||||
:GasFees {:gasPrice "0.01"
|
||||
:baseFee "0.008750001"
|
||||
:eip1559Enabled true}
|
||||
:BridgeName "Transfer"
|
||||
:AmountOut "0x5af3107a4000"
|
||||
:To {:isTest false
|
||||
:chainName "Arbitrum"
|
||||
:chainId 42161}
|
||||
:Cost "0.006539438247064285301"
|
||||
:GasAmount 108197}]
|
||||
:Candidates
|
||||
[{:From {:isTest false
|
||||
:chainName "Arbitrum"
|
||||
:chainId 42161}
|
||||
:AmountInLocked false
|
||||
:AmountIn "0x5af3107a4000"
|
||||
:MaxAmountIn "0x4f7920c6831d6"
|
||||
:GasFees {:gasPrice "0.01"
|
||||
:baseFee "0.008750001"
|
||||
:eip1559Enabled true}
|
||||
:BridgeName "Transfer"
|
||||
:AmountOut "0x5af3107a4000"
|
||||
:To {:isTest false
|
||||
:chainName "Arbitrum"
|
||||
:chainId 42161}
|
||||
:Cost "0.006539438247064285301"
|
||||
:GasAmount 108197}
|
||||
{:From {:isTest false
|
||||
:chainName "Ethereum"
|
||||
:chainId 1}
|
||||
:AmountInLocked false
|
||||
:AmountIn "0x0"
|
||||
:MaxAmountIn "0x245aa392272e6"
|
||||
:GasFees {:gasPrice "1.01"
|
||||
:baseFee "1.008750001"
|
||||
:eip1559Enabled true}
|
||||
:BridgeName "Transfer"
|
||||
:AmountOut "0x0"
|
||||
:To {:isTest false
|
||||
:chainName "Arbitrum"
|
||||
:chainId 42161}
|
||||
:Cost "1.906539438247064285301"
|
||||
:GasAmount 23487}]
|
||||
:NativeChainTokenPrice 123
|
||||
:TokenPrice 123}
|
||||
suggested-routes-data suggested-routes
|
||||
chosen-route (:best suggested-routes-data)
|
||||
token-symbol "ETH"
|
||||
token {:symbol "ETH"
|
||||
:name "Ether"
|
||||
:networks #{{:chain-id 421614}
|
||||
{:chain-id 11155420}
|
||||
{:chain-id 11155111}}}
|
||||
token-networks (:networks token)
|
||||
routes-available? (pos? (count chosen-route))
|
||||
sender-network-values [1 10]
|
||||
receiver-network-values [1 10]
|
||||
receiver-networks [1 10 421614]
|
||||
token-decimals (if (collectible-with-balance 1) 0 (:decimals token))
|
||||
native-token? (and token (= token-symbol "ETH"))
|
||||
from-network-amounts-by-chain (send-utils/network-amounts-by-chain {:route chosen-route
|
||||
:token-decimals
|
||||
token-decimals
|
||||
:native-token?
|
||||
native-token?
|
||||
:receiver? false})
|
||||
to-network-amounts-by-chain (send-utils/network-amounts-by-chain {:route chosen-route
|
||||
:token-decimals
|
||||
token-decimals
|
||||
:native-token?
|
||||
native-token?
|
||||
:receiver? true})
|
||||
to-network-values-for-ui (send-utils/network-values-for-ui to-network-amounts-by-chain)
|
||||
tx-type :tx/collectible-erc-1155
|
||||
from-network-values-for-ui (send-utils/network-values-for-ui from-network-amounts-by-chain)
|
||||
disabled-from-chain-ids [:421614]
|
||||
token-networks-ids (when token-networks (mapv #(:chain-id %) token-networks))
|
||||
sender-possible-chain-ids (mapv :chain-id sender-network-values)
|
||||
receiver-network-values (if routes-available?
|
||||
(send-utils/network-amounts
|
||||
{:network-values to-network-values-for-ui
|
||||
:disabled-chain-ids disabled-from-chain-ids
|
||||
:receiver-networks receiver-networks
|
||||
:token-networks-ids token-networks-ids
|
||||
:tx-type tx-type
|
||||
:receiver? true})
|
||||
(cond->
|
||||
(send-utils/reset-loading-network-amounts-to-zero
|
||||
receiver-network-values)
|
||||
|
||||
(not= tx-type :tx/bridge) (conj {:type :edit})))
|
||||
sender-network-values (if routes-available?
|
||||
(send-utils/network-amounts
|
||||
{:network-values
|
||||
(if (= tx-type :tx/bridge)
|
||||
from-network-values-for-ui
|
||||
(send-utils/add-zero-values-to-network-values
|
||||
from-network-values-for-ui
|
||||
sender-possible-chain-ids))
|
||||
:disabled-chain-ids disabled-from-chain-ids
|
||||
:receiver-networks receiver-networks
|
||||
:token-networks-ids token-networks-ids
|
||||
:from-locked-amounts {}
|
||||
:tx-type tx-type
|
||||
:receiver? false})
|
||||
(send-utils/reset-loading-network-amounts-to-zero
|
||||
sender-network-values))
|
||||
expected-db {:wallet {:ui {:send
|
||||
{:other-props :value
|
||||
:suggested-routes suggested-routes-data
|
||||
:route chosen-route
|
||||
:token token
|
||||
:disabled-from-chain-ids disabled-from-chain-ids
|
||||
:suggested-routes-call-timestamp timestamp
|
||||
:collectible (collectible-with-balance 1)
|
||||
:token-display-name token-symbol
|
||||
:receiver-networks receiver-networks
|
||||
:tx-type tx-type
|
||||
:from-values-by-chain from-network-values-for-ui
|
||||
:to-values-by-chain to-network-values-for-ui
|
||||
:sender-network-values sender-network-values
|
||||
:receiver-network-values receiver-network-values
|
||||
:network-links (when routes-available?
|
||||
(send-utils/network-links
|
||||
chosen-route
|
||||
sender-network-values
|
||||
receiver-network-values))
|
||||
:loading-suggested-routes? false
|
||||
:from-locked-amounts {}}}}}]
|
||||
(reset! rf-db/app-db
|
||||
{:wallet {:ui {:send {:other-props :value
|
||||
:suggested-routes-call-timestamp timestamp
|
||||
:token token
|
||||
:collectible (collectible-with-balance 1)
|
||||
:token-display-name token-symbol
|
||||
:receiver-networks receiver-networks
|
||||
:receiver-network-values [1 10]
|
||||
:sender-network-values [1 10]
|
||||
:tx-type tx-type
|
||||
:disabled-from-chain-ids disabled-from-chain-ids
|
||||
:from-locked-amounts {}}}}})
|
||||
(is (match? expected-db (:db (dispatch [event-id suggested-routes timestamp]))))))
|
||||
|
||||
(h/deftest-event :wallet/add-authorized-transaction
|
||||
[event-id dispatch]
|
||||
(let [hashes {:chain-1 ["tx-1" "tx-2" "tx-3"]
|
||||
:chain-2 ["tx-4" "tx-5"]
|
||||
:chain-3 ["tx-6" "tx-7" "tx-8" "tx-9"]}
|
||||
transaction-id "txid-1"
|
||||
expected-result {:db {:wallet {:ui {:send {:transaction-ids ["tx-1" "tx-2" "tx-3"
|
||||
"tx-4" "tx-5" "tx-6"
|
||||
"tx-7" "tx-8" "tx-9"]}}
|
||||
:transactions (send-utils/map-multitransaction-by-ids
|
||||
transaction-id
|
||||
hashes)}}
|
||||
:fx [[:dispatch [:wallet/end-transaction-flow]]
|
||||
[:dispatch-later
|
||||
[{:ms 2000
|
||||
:dispatch [:wallet/clean-just-completed-transaction]}]]]}]
|
||||
(is (match? expected-result
|
||||
(dispatch [event-id
|
||||
{:id transaction-id
|
||||
:hashes hashes}])))))
|
||||
|
||||
(h/deftest-event :wallet/select-from-account
|
||||
[event-id dispatch]
|
||||
(let [stack-id :screen/stack
|
||||
start-flow? false
|
||||
address "0x01"]
|
||||
(testing "when tx-type is :tx/bridge and token-symbol is nil"
|
||||
(let [flow-id :wallet-bridge-flow
|
||||
tx-type :tx/bridge
|
||||
expected-result {:db {:wallet {:ui {:send {:to-address address
|
||||
:tx-type tx-type}}}}
|
||||
:fx [[:dispatch [:wallet/switch-current-viewing-account address]]
|
||||
[:dispatch
|
||||
[:wallet/wizard-navigate-forward
|
||||
{:current-screen stack-id
|
||||
:start-flow? start-flow?
|
||||
:flow-id flow-id}]]]}]
|
||||
(reset! rf-db/app-db {:wallet {:ui {:send {:tx-type tx-type}}}})
|
||||
(is (match? expected-result
|
||||
(dispatch [event-id
|
||||
{:address address
|
||||
:stack-id stack-id
|
||||
:start-flow? start-flow?}])))))
|
||||
(testing "when tx-type is not :tx/bridge and token-symbol is nil"
|
||||
(let [flow-id :wallet-send-flow
|
||||
tx-type :tx/collectible-erc-721
|
||||
expected-result {:db {:wallet {:ui {:send {:tx-type tx-type}}}}
|
||||
:fx [[:dispatch [:wallet/switch-current-viewing-account address]]
|
||||
[:dispatch
|
||||
[:wallet/wizard-navigate-forward
|
||||
{:current-screen stack-id
|
||||
:start-flow? start-flow?
|
||||
:flow-id flow-id}]]]}]
|
||||
(reset! rf-db/app-db {:wallet {:ui {:send {:tx-type tx-type}}}})
|
||||
(is (match? expected-result
|
||||
(dispatch [event-id
|
||||
{:address address
|
||||
:stack-id stack-id
|
||||
:start-flow? start-flow?}])))))
|
||||
(testing "when tx-type is :tx/bridge and token-symbol is not nil"
|
||||
(let [flow-id :wallet-bridge-flow
|
||||
tx-type :tx/bridge
|
||||
tokens [{:symbol "ETH"
|
||||
:chain-id 1
|
||||
:balances-per-chain {1 {:raw-balance (money/bignumber 100)}
|
||||
10 {:raw-balance (money/bignumber 200)}
|
||||
42161 {:raw-balance (money/bignumber 300)}}
|
||||
:decimals 2}]
|
||||
network-details #{{:chain-id 1}
|
||||
{:chain-id 10}
|
||||
{:chain-id 42161}}
|
||||
expected-result {:db {:wallet {:ui {:send {:to-address address
|
||||
:tx-type tx-type
|
||||
:token-symbol "ETH"
|
||||
:token (assoc (first tokens)
|
||||
:networks #{nil}
|
||||
:total-balance
|
||||
(money/bignumber 6))}}
|
||||
:accounts {address {:tokens tokens}}}}
|
||||
:fx [[:dispatch [:wallet/switch-current-viewing-account address]]
|
||||
[:dispatch
|
||||
[:wallet/wizard-navigate-forward
|
||||
{:current-screen stack-id
|
||||
:start-flow? start-flow?
|
||||
:flow-id flow-id}]]]}]
|
||||
(reset! rf-db/app-db {:wallet {:ui {:send {:tx-type tx-type
|
||||
:token-symbol "ETH"}}
|
||||
:accounts {address {:tokens tokens}}}})
|
||||
(is (match? expected-result
|
||||
(dispatch [event-id
|
||||
{:address address
|
||||
:stack-id stack-id
|
||||
:start-flow? start-flow?
|
||||
:netork-details network-details}])))))
|
||||
(testing "when tx-type is not :tx/bridge and token-symbol is not nil"
|
||||
(let [flow-id :wallet-send-flow
|
||||
tx-type :tx/collectible-erc-721
|
||||
tokens [{:symbol "ETH"
|
||||
:chain-id 1
|
||||
:balances-per-chain {1 {:raw-balance (money/bignumber 100)}
|
||||
10 {:raw-balance (money/bignumber 200)}
|
||||
42161 {:raw-balance (money/bignumber 300)}}
|
||||
:decimals 2}]
|
||||
network-details #{{:chain-id 1}
|
||||
{:chain-id 10}
|
||||
{:chain-id 42161}}
|
||||
expected-result {:db {:wallet {:ui {:send {:tx-type tx-type
|
||||
:token-symbol "ETH"
|
||||
:token (assoc (first tokens)
|
||||
:networks #{nil}
|
||||
:total-balance
|
||||
(money/bignumber 6))}}
|
||||
:accounts {address {:tokens tokens}}}}
|
||||
:fx [[:dispatch [:wallet/switch-current-viewing-account address]]
|
||||
[:dispatch
|
||||
[:wallet/wizard-navigate-forward
|
||||
{:current-screen stack-id
|
||||
:start-flow? start-flow?
|
||||
:flow-id flow-id}]]]}]
|
||||
(reset! rf-db/app-db {:wallet {:ui {:send {:tx-type tx-type
|
||||
:token-symbol "ETH"}}
|
||||
:accounts {address {:tokens tokens}}}})
|
||||
(is (match? expected-result
|
||||
(dispatch [event-id
|
||||
{:address address
|
||||
:stack-id stack-id
|
||||
:start-flow? start-flow?
|
||||
:netork-details network-details}])))))))
|
||||
|
||||
(run-tests)
|
||||
|
||||
@@ -100,8 +100,7 @@
|
||||
:wallet/wallet-send-enabled-from-chain-ids [1]
|
||||
:wallet/wallet-send-amount nil
|
||||
:wallet/wallet-send-tx-type :tx/send
|
||||
:wallet/wallet-send-fee-fiat-formatted "$5,00"
|
||||
:wallet/total-amount (money/bignumber "250")})
|
||||
:wallet/wallet-send-fee-fiat-formatted "$5,00"})
|
||||
|
||||
(h/describe "Send > input amount screen"
|
||||
(h/setup-restorable-re-frame)
|
||||
|
||||
@@ -221,9 +221,9 @@
|
||||
(number/remove-trailing-zeroes
|
||||
(.toFixed (/ input-amount conversion-rate)
|
||||
crypto-decimals)))
|
||||
total-amount-receiver (rf/sub [:wallet/total-amount true])
|
||||
send-amount (rf/sub [:wallet/wallet-send-amount])
|
||||
amount-text (str (number/remove-trailing-zeroes
|
||||
(.toFixed total-amount-receiver
|
||||
(.toFixed (js/parseFloat send-amount)
|
||||
(min token-decimals 6)))
|
||||
" "
|
||||
token-symbol)
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
:customization-color (:color account)}]])]))
|
||||
|
||||
(defn- user-summary
|
||||
[{:keys [account-props theme label accessibility-label summary-type recipient bridge-tx? account-to?]}]
|
||||
[{:keys [account-props theme label accessibility-label summary-type recipient account-to?]}]
|
||||
(let [network-values (rf/sub [:wallet/network-values account-to?])
|
||||
summary-info-type (case (:recipient-type recipient)
|
||||
:saved-address :saved-account
|
||||
@@ -144,7 +144,7 @@
|
||||
:networks? true
|
||||
:values network-values
|
||||
:account-props (cond-> account-props
|
||||
(and account-to? (not bridge-tx?))
|
||||
account-to?
|
||||
(assoc
|
||||
:size 32
|
||||
:name (:label recipient)
|
||||
@@ -225,7 +225,6 @@
|
||||
bridge-to-chain-id]))
|
||||
loading-suggested-routes? (rf/sub
|
||||
[:wallet/wallet-send-loading-suggested-routes?])
|
||||
total-amount-receiver (rf/sub [:wallet/total-amount true])
|
||||
from-account-props {:customization-color account-color
|
||||
:size 32
|
||||
:emoji (:emoji account)
|
||||
@@ -250,8 +249,8 @@
|
||||
[transaction-details
|
||||
{:estimated-time-min estimated-time-min
|
||||
:max-fees fee-formatted
|
||||
:token-display-name token-symbol
|
||||
:amount total-amount-receiver
|
||||
:token-display-name token-display-name
|
||||
:amount amount
|
||||
:to-network bridge-to-network
|
||||
:theme theme
|
||||
:route route
|
||||
@@ -299,6 +298,5 @@
|
||||
from-account-props
|
||||
user-props)
|
||||
:recipient recipient
|
||||
:bridge-tx? (= transaction-type :tx/bridge)
|
||||
:account-to? true
|
||||
:theme theme}]]]]))))
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
[{:keys [route token-decimals native-token? receiver?]}]
|
||||
(reduce
|
||||
(fn [acc path]
|
||||
(let [amount-hex (if receiver? (:amount-out path) (:amount-in path))
|
||||
(let [amount-hex (if receiver? (:amount-in path) (:amount-out path))
|
||||
amount-units (native-module/hex-to-number
|
||||
(utils.hex/normalize-hex amount-hex))
|
||||
amount (money/with-precision
|
||||
|
||||
@@ -32,10 +32,10 @@
|
||||
|
||||
(deftest network-amounts-by-chain-test
|
||||
(testing "Correctly calculates network amounts for transaction with native token"
|
||||
(let [route [{:amount-out "0xde0b6b3a7640000"
|
||||
:to {:chain-id 1}}
|
||||
{:amount-out "0xde0b6b3a7640000"
|
||||
:to {:chain-id 10}}]
|
||||
(let [route [{:amount-in "0xde0b6b3a7640000"
|
||||
:to {:chain-id 1}}
|
||||
{:amount-in "0xde0b6b3a7640000"
|
||||
:to {:chain-id 10}}]
|
||||
token-decimals 18
|
||||
native-token? true
|
||||
receiver? true
|
||||
@@ -50,10 +50,10 @@
|
||||
|
||||
(testing
|
||||
"Correctly calculates network amounts for transaction with native token and multiple routes to same chain-id"
|
||||
(let [route [{:amount-out "0xde0b6b3a7640000"
|
||||
:to {:chain-id 1}}
|
||||
{:amount-out "0xde0b6b3a7640000"
|
||||
:to {:chain-id 1}}]
|
||||
(let [route [{:amount-in "0xde0b6b3a7640000"
|
||||
:to {:chain-id 1}}
|
||||
{:amount-in "0xde0b6b3a7640000"
|
||||
:to {:chain-id 1}}]
|
||||
token-decimals 18
|
||||
native-token? true
|
||||
receiver? true
|
||||
@@ -66,10 +66,10 @@
|
||||
(is (money/equal-to (get result chain-id) exp-value)))))
|
||||
|
||||
(testing "Correctly calculates network amounts for transaction with non-native token"
|
||||
(let [route [{:amount-in "0x1e8480"
|
||||
:from {:chain-id 1}}
|
||||
{:amount-in "0x1e8480"
|
||||
:from {:chain-id 10}}]
|
||||
(let [route [{:amount-out "0x1e8480"
|
||||
:from {:chain-id 1}}
|
||||
{:amount-out "0x1e8480"
|
||||
:from {:chain-id 10}}]
|
||||
token-decimals 6
|
||||
native-token? false
|
||||
receiver? false
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
(ns status-im.contexts.wallet.wallet-connect.core
|
||||
(:require [clojure.edn :as edn]
|
||||
[clojure.set :as set]
|
||||
[clojure.string :as string]
|
||||
[native-module.core :as native-module]
|
||||
[status-im.constants :as constants]
|
||||
@@ -120,24 +119,10 @@
|
||||
(networks/get-network-details)
|
||||
(add-full-testnet-name)))
|
||||
|
||||
(defn session-networks-allowed?
|
||||
[testnet-mode? {:keys [chains]}]
|
||||
(let [chain-ids (set (map (fn [chain]
|
||||
(-> chain
|
||||
(string/split ":")
|
||||
second
|
||||
js/parseInt))
|
||||
chains))]
|
||||
(if testnet-mode?
|
||||
(set/subset? chain-ids (set/union constants/sepolia-chain-ids constants/goerli-chain-ids))
|
||||
(set/subset? chain-ids constants/mainnet-chain-ids))))
|
||||
|
||||
(defn event-should-be-handled?
|
||||
[db {:keys [topic]}]
|
||||
(let [testnet-mode? (get-in db [:profile/profile :test-networks-enabled?])]
|
||||
(some #(and (= (:topic %) topic)
|
||||
(session-networks-allowed? testnet-mode? %))
|
||||
(:wallet-connect/sessions db))))
|
||||
(some #(= topic %)
|
||||
(map :topic (:wallet-connect/sessions db))))
|
||||
|
||||
(defn sdk-session->db-session
|
||||
[{:keys [topic expiry pairingTopic] :as session}]
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
(rf/reg-event-fx
|
||||
:wallet-connect/on-session-proposal
|
||||
(fn [{:keys [db]} [proposal]]
|
||||
(log/info "Received Wallet Connect session proposal: " proposal)
|
||||
(log/info "Received Wallet Connect session proposal: " {:id (:id proposal)})
|
||||
(let [accounts (get-in db [:wallet :accounts])
|
||||
current-viewing-address (get-in db [:wallet :current-viewing-account-address])
|
||||
available-accounts (wallet-connect-core/filter-operable-accounts (vals accounts))
|
||||
@@ -117,7 +117,7 @@
|
||||
:wallet-connect/on-session-delete
|
||||
(fn [{:keys [db]} [{:keys [topic] :as event}]]
|
||||
(when (wallet-connect-core/event-should-be-handled? db event)
|
||||
(log/info "Received Wallet Connect session delete from the SDK: " event)
|
||||
(log/info "Received Wallet Connect session delete: " event)
|
||||
{:fx [[:dispatch [:wallet-connect/disconnect-session topic]]]})))
|
||||
|
||||
(rf/reg-event-fx
|
||||
@@ -140,7 +140,6 @@
|
||||
(fn [{:keys [db]} [{:keys [topic on-success on-fail]}]]
|
||||
(let [web3-wallet (get db :wallet-connect/web3-wallet)
|
||||
network-status (:network/status db)]
|
||||
(log/info "Disconnecting dApp session" topic)
|
||||
(if (= network-status :online)
|
||||
{:fx [[:effects.wallet-connect/disconnect
|
||||
{:web3-wallet web3-wallet
|
||||
@@ -263,9 +262,6 @@
|
||||
(or (< expiry (/ now 1000))
|
||||
(not (contains? session-topics topic))))
|
||||
persisted-sessions)]
|
||||
(when (seq expired-sessions)
|
||||
(log/info "Updating WalletConnect persisted sessions due to expired/inactive sessions"
|
||||
{:expired expired-sessions}))
|
||||
{:fx (mapv (fn [{:keys [topic]}]
|
||||
[:dispatch [:wallet-connect/disconnect-session topic]])
|
||||
expired-sessions)
|
||||
@@ -328,7 +324,6 @@
|
||||
(rf/reg-event-fx
|
||||
:wallet-connect/disconnect-session
|
||||
(fn [{:keys [db]} [topic]]
|
||||
(log/info "Removing session from persistance and state" topic)
|
||||
{:db (update db
|
||||
:wallet-connect/sessions
|
||||
(fn [sessions]
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
(fn [{:keys [db]} [event]]
|
||||
(let [method (wallet-connect-core/get-request-method event)
|
||||
existing-event (get-in db [:wallet-connect/current-request :event])]
|
||||
(log/info "Processing Wallet Connect session request" method)
|
||||
;; NOTE: make sure we don't show two requests at the same time
|
||||
(when-not existing-event
|
||||
{:db (-> db
|
||||
@@ -126,37 +125,38 @@
|
||||
(rf/reg-event-fx
|
||||
:wallet-connect/process-sign-typed
|
||||
(fn [{:keys [db]}]
|
||||
(try
|
||||
(let [[address raw-data] (wallet-connect-core/get-db-current-request-params db)
|
||||
parsed-raw-data (transforms/js-parse raw-data)
|
||||
session-chain-id (-> (wallet-connect-core/get-db-current-request-event db)
|
||||
(get-in [:params :chainId])
|
||||
wallet-connect-core/eip155->chain-id)
|
||||
data-chain-id (-> parsed-raw-data
|
||||
transforms/js->clj
|
||||
signing/typed-data-chain-id)
|
||||
parsed-data (-> parsed-raw-data
|
||||
(transforms/js-dissoc :types :primaryType)
|
||||
(transforms/js-stringify 2))]
|
||||
(if (and data-chain-id
|
||||
(not= session-chain-id data-chain-id))
|
||||
{:fx [[:dispatch
|
||||
[:wallet-connect/wrong-typed-data-chain-id
|
||||
{:expected-chain-id session-chain-id
|
||||
:wrong-chain-id data-chain-id}]]]}
|
||||
{:db (update-in db
|
||||
[:wallet-connect/current-request]
|
||||
assoc
|
||||
:address (string/lower-case address)
|
||||
:display-data (or parsed-data raw-data)
|
||||
:raw-data raw-data)
|
||||
:fx [[:dispatch [:wallet-connect/show-request-modal]]]}))
|
||||
(catch js/Error err
|
||||
(let [[address raw-data] (wallet-connect-core/get-db-current-request-params db)
|
||||
parsed-raw-data (transforms/js-parse raw-data)
|
||||
session-chain-id (-> (wallet-connect-core/get-db-current-request-event db)
|
||||
(get-in [:params :chainId])
|
||||
wallet-connect-core/eip155->chain-id)
|
||||
data-chain-id (-> parsed-raw-data
|
||||
transforms/js->clj
|
||||
signing/typed-data-chain-id)
|
||||
parsed-data (try (-> parsed-raw-data
|
||||
(transforms/js-dissoc :types :primaryType)
|
||||
(transforms/js-stringify 2))
|
||||
(catch js/Error _ nil))]
|
||||
(cond
|
||||
(nil? parsed-data)
|
||||
{:fx [[:dispatch
|
||||
[:wallet-connect/on-processing-error
|
||||
(ex-info "Failed to parse JSON typed data"
|
||||
{:error err
|
||||
:data (wallet-connect-core/get-db-current-request-params db)})]]]}))))
|
||||
(ex-info "Failed to parse JSON typed data" {:data raw-data})]]]}
|
||||
|
||||
(not= session-chain-id data-chain-id)
|
||||
{:fx [[:dispatch
|
||||
[:wallet-connect/wrong-typed-data-chain-id
|
||||
{:expected-chain-id session-chain-id
|
||||
:wrong-chain-id data-chain-id}]]]}
|
||||
|
||||
:else
|
||||
{:db (update-in db
|
||||
[:wallet-connect/current-request]
|
||||
assoc
|
||||
:address (string/lower-case address)
|
||||
:display-data (or parsed-data raw-data)
|
||||
:raw-data raw-data)
|
||||
:fx [[:dispatch [:wallet-connect/show-request-modal]]]}))))
|
||||
|
||||
(rf/reg-event-fx
|
||||
:wallet-connect/wrong-typed-data-chain-id
|
||||
@@ -168,20 +168,20 @@
|
||||
wallet-connect-core/chain-id->network-details
|
||||
:full-name)
|
||||
toast-message (i18n/label :t/wallet-connect-typed-data-wrong-chain-id-warning
|
||||
{:wrong-chain (or wrong-network-name
|
||||
(wallet-connect-core/chain-id->eip155
|
||||
wrong-chain-id))
|
||||
{:wrong-chain wrong-network-name
|
||||
:expected-chain expected-network-name})]
|
||||
{:fx [[:dispatch
|
||||
[:toasts/upsert
|
||||
{:type :negative
|
||||
:text toast-message}]]
|
||||
{:type :negative
|
||||
:theme :dark
|
||||
:text toast-message}]]
|
||||
[:dispatch
|
||||
[:wallet-connect/on-processing-error
|
||||
(ex-info "Can't proceed signing typed data due to wrong chain-id included in the data"
|
||||
{:expected-chain-id expected-chain-id
|
||||
:wrong-chain-id wrong-chain-id})]]]})))
|
||||
|
||||
;; TODO: we should reject a request if processing fails
|
||||
(rf/reg-event-fx
|
||||
:wallet-connect/on-processing-error
|
||||
(fn [{:keys [db]} [error]]
|
||||
@@ -193,5 +193,4 @@
|
||||
:method method
|
||||
:wallet-connect-event event
|
||||
:event :wallet-connect/on-processing-error})
|
||||
;; FIXME(@clauxx/@alwx): rename this event eventually
|
||||
{:fx [[:dispatch [:wallet-connect/on-request-modal-dismissed]]]})))
|
||||
{:fx [[:dispatch [:wallet-connect/dismiss-request-modal]]]})))
|
||||
|
||||
@@ -106,11 +106,7 @@
|
||||
:method method
|
||||
:wallet-connect-event event
|
||||
:event :wallet-connect/on-sign-error})
|
||||
{:fx [[:dispatch [:wallet-connect/dismiss-request-modal]]
|
||||
[:dispatch
|
||||
[:toasts/upsert
|
||||
{:type :negative
|
||||
:text (i18n/label :t/something-went-wrong)}]]]})))
|
||||
{:fx [[:dispatch [:wallet-connect/dismiss-request-modal]]]})))
|
||||
|
||||
(rf/reg-event-fx
|
||||
:wallet-connect/send-response
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
[status-im.contexts.wallet.wallet-connect.core :as core]
|
||||
[status-im.contexts.wallet.wallet-connect.rpc :as rpc]
|
||||
[utils.hex :as hex]
|
||||
[utils.number :as number]
|
||||
[utils.transforms :as transforms]))
|
||||
|
||||
(defn typed-data-chain-id
|
||||
@@ -17,8 +16,7 @@
|
||||
(some #(= "chainId" (:name %))))
|
||||
data-chain-id (-> typed-data
|
||||
:domain
|
||||
:chainId
|
||||
number/parse-int)]
|
||||
:chainId)]
|
||||
(when chain-id-type?
|
||||
data-chain-id)))
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
status-im.common.peer-stats.events
|
||||
status-im.common.shared-urls.events
|
||||
status-im.common.signals.events
|
||||
status-im.common.theme.effects
|
||||
status-im.common.theme.events
|
||||
[status-im.common.toasts.events]
|
||||
status-im.common.universal-links
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
:FLAG_WALLET_SETTINGS_IMPORT_ALL_KEYPAIRS)
|
||||
::shell.jump-to (enabled-in-env? :ENABLE_JUMP_TO)
|
||||
|
||||
::wallet.add-watched-address (enabled-in-env? :FLAG_ADD_WATCHED_ADDRESS)
|
||||
::wallet.advanced-sending (enabled-in-env? :FLAG_ADVANCED_SENDING)
|
||||
::wallet.assets-modal-hide (enabled-in-env? :FLAG_ASSETS_MODAL_HIDE)
|
||||
::wallet.assets-modal-manage-tokens (enabled-in-env? :FLAG_ASSETS_MODAL_MANAGE_TOKENS)
|
||||
|
||||
@@ -74,7 +74,9 @@
|
||||
(let [[status-bar-theme] (get-status-nav-color root-id theme)
|
||||
root (get (roots/roots status-bar-theme) root-id)]
|
||||
(dismiss-all-modals)
|
||||
(rf/dispatch [:theme/switch {:view-id root-id}])
|
||||
(rf/dispatch [:profile.settings/switch-theme
|
||||
(get roots/themes root-id)
|
||||
root-id])
|
||||
(reset! state/root-id (or (get-in root [:root :stack :id]) root-id))
|
||||
(navigation/set-root root)
|
||||
(state/navigation-state-reset [{:id root-id
|
||||
|
||||
@@ -1,8 +1,19 @@
|
||||
(ns status-im.navigation.roots
|
||||
(:require
|
||||
[quo.foundations.colors :as colors]
|
||||
[status-im.constants :as constants]
|
||||
[status-im.navigation.options :as options]))
|
||||
|
||||
;; Theme Order for navigation roots
|
||||
;; 1. Themes hardcoded in below map
|
||||
;; 2. If nil or no entry in map, then theme stored in
|
||||
;; [:db :profile/profile :appearance] will be used (for mulitaccounts)
|
||||
;; 3). Fallback theme - Dark
|
||||
(def themes
|
||||
{:screen/onboarding.intro constants/theme-type-dark
|
||||
:screen/profile.profiles constants/theme-type-dark
|
||||
:shell-stack nil})
|
||||
|
||||
(defn roots-internal
|
||||
[status-bar-theme]
|
||||
{:screen/onboarding.intro
|
||||
|
||||
@@ -127,6 +127,13 @@
|
||||
{:title title
|
||||
:data data})))))
|
||||
|
||||
(re-frame/reg-sub
|
||||
:contacts/is-participant-selected?
|
||||
:<- [:group-chat/selected-participants]
|
||||
(fn [selected-participants [_ id]]
|
||||
(-> selected-participants
|
||||
(contains? id))))
|
||||
|
||||
(re-frame/reg-sub
|
||||
:contacts/blocked
|
||||
:<- [:contacts/contacts]
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
|
||||
(re-frame/reg-sub
|
||||
:profile/currency
|
||||
(fn []
|
||||
;; returns "usd" by default as the support for other currencies are in progress on Mobile
|
||||
constants/profile-default-currency))
|
||||
:<- [:profile/profile]
|
||||
(fn [{:keys [currency]}]
|
||||
(or currency constants/profile-default-currency)))
|
||||
|
||||
(re-frame/reg-sub
|
||||
:profile/syncing-on-mobile-network?
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
(ns status-im.subs.wallet.networks
|
||||
(:require [re-frame.core :as re-frame]
|
||||
[status-im.contexts.wallet.common.utils.networks :as network-utils]
|
||||
[utils.money :as money]))
|
||||
[status-im.contexts.wallet.common.utils.networks :as network-utils]))
|
||||
|
||||
(def max-network-prefixes 2)
|
||||
|
||||
@@ -81,16 +80,3 @@
|
||||
{:amount amount :token-symbol token-symbol})))
|
||||
{}
|
||||
network-values))))
|
||||
|
||||
(re-frame/reg-sub
|
||||
:wallet/total-amount
|
||||
:<- [:wallet/wallet-send]
|
||||
(fn [{:keys [from-values-by-chain to-values-by-chain]} [_ to-values?]]
|
||||
(let [network-values (if to-values? to-values-by-chain from-values-by-chain)]
|
||||
(reduce
|
||||
(fn [acc amount]
|
||||
(if (money/bignumber? amount)
|
||||
(money/add acc amount)
|
||||
acc))
|
||||
(money/bignumber 0)
|
||||
(vals network-values)))))
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
(ns status-im.subs.wallet.wallet-connect
|
||||
(:require [clojure.string :as string]
|
||||
(:require [clojure.set :as set]
|
||||
[clojure.string :as string]
|
||||
[re-frame.core :as rf]
|
||||
[status-im.constants :as constants]
|
||||
[status-im.contexts.wallet.common.utils :as wallet-utils]
|
||||
[status-im.contexts.wallet.wallet-connect.core :as wallet-connect-core]
|
||||
[status-im.contexts.wallet.wallet-connect.transactions :as transactions]
|
||||
@@ -64,7 +66,16 @@
|
||||
:<- [:profile/test-networks-enabled?]
|
||||
(fn [[sessions testnet-mode?]]
|
||||
(filter
|
||||
(partial wallet-connect-core/session-networks-allowed? testnet-mode?)
|
||||
(fn [{:keys [chains]}]
|
||||
(let [chain-ids (set (map (fn [chain]
|
||||
(-> chain
|
||||
(string/split ":")
|
||||
second
|
||||
js/parseInt))
|
||||
chains))]
|
||||
(if testnet-mode?
|
||||
(set/subset? chain-ids (set/union constants/sepolia-chain-ids constants/goerli-chain-ids))
|
||||
(set/subset? chain-ids constants/mainnet-chain-ids))))
|
||||
sessions)))
|
||||
|
||||
(rf/reg-sub
|
||||
|
||||
@@ -12,10 +12,9 @@
|
||||
[re-frame.events :as rf-events]
|
||||
[re-frame.registrar :as rf-registrar]
|
||||
[re-frame.subs :as rf-subs]
|
||||
[taoensso.timbre :as log]
|
||||
[taoensso.timbre :as log] ;; We must require this namespace to register the custom cljs.test
|
||||
;; directive `match-strict?`.
|
||||
test-helpers.matchers))
|
||||
;; We must require `test-helpers.matchers` this namespace to register the custom cljs.test
|
||||
;; directive `match-strict?`.
|
||||
|
||||
(defn db
|
||||
"A simple wrapper to get the latest value from the app db."
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
|
||||
"owner": "status-im",
|
||||
"repo": "status-go",
|
||||
"version": "fix/token-cache-usage",
|
||||
"commit-sha1": "c5991352264b881c6b34d261ca9c2748ea060d54",
|
||||
"src-sha256": "1z3y4avg5nkl8xkhigs404g5vibk1nwpsclnh6gw1w6bzrjvnc71"
|
||||
"version": "v0.182.39",
|
||||
"commit-sha1": "9755b3de7ae64929066d2b8a26222d8d41ceda87",
|
||||
"src-sha256": "02b2fshb7phhsr7mghg4s6qr1n1c8xawaz4pw04q8hpv5vfnjcxz"
|
||||
}
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
import logging
|
||||
import time
|
||||
from datetime import datetime
|
||||
from decimal import Decimal
|
||||
from json import JSONDecodeError
|
||||
from os import environ
|
||||
from typing import List
|
||||
|
||||
import pytest
|
||||
import pytz
|
||||
import requests
|
||||
from selenium.common import TimeoutException
|
||||
|
||||
@@ -40,7 +38,7 @@ class NetworkApi:
|
||||
return self.send_etherscan_request(params)
|
||||
|
||||
def get_transactions(self, address: str) -> List[dict]:
|
||||
params = {'module': 'account', 'action': 'txlist', 'address': address, 'page': 1, 'offset': 10, 'sort': 'desc'}
|
||||
params = {'module': 'account', 'action': 'txlist', 'address': address, 'sort': 'desc'}
|
||||
return self.send_etherscan_request(params)
|
||||
|
||||
def is_transaction_successful(self, transaction_hash: str) -> int:
|
||||
@@ -108,28 +106,22 @@ class NetworkApi:
|
||||
self.log("Failed iterate transactions(Etherscan unexpected error): " + str(e))
|
||||
continue
|
||||
|
||||
def wait_for_confirmation_of_transaction(self, address, tx_time, confirmations=7, token=False):
|
||||
expected_tx_timestamp = datetime.strptime(tx_time, "%Y-%m-%dT%H:%M:%S%z").replace(tzinfo=pytz.UTC)
|
||||
def wait_for_confirmation_of_transaction(self, address, amount, confirmations=6, token=False):
|
||||
start_time = time.time()
|
||||
if token:
|
||||
token_info = "token transaction"
|
||||
else:
|
||||
token_info = "ETH transaction"
|
||||
self.log('Waiting for %s of %s to have %s confirmations' % (token_info, address, confirmations))
|
||||
self.log('Waiting %s %s for %s to have %s confirmations' % (amount, token_info, address, confirmations))
|
||||
while round(time.time() - start_time, ndigits=2) < 600: # should be < idleTimeout capability
|
||||
if token:
|
||||
transaction = self.get_token_transactions(address)[0]
|
||||
else:
|
||||
transaction = self.get_transactions(address)[0]
|
||||
tx_timestamp = datetime.fromtimestamp(int(transaction['timeStamp'])).replace(tzinfo=pytz.UTC)
|
||||
if tx_timestamp > expected_tx_timestamp:
|
||||
if int(transaction['confirmations']) >= confirmations:
|
||||
return
|
||||
time.sleep(20)
|
||||
transaction = self.find_transaction_by_unique_amount(address, amount, token)
|
||||
self.log(
|
||||
'Expected amount of confirmations is %s, in fact %s' % (confirmations, transaction['confirmations']))
|
||||
pytest.fail('The last transaction was not confirmed, address is %s, still has %s confirmations' % (
|
||||
address, int(transaction['confirmations'])))
|
||||
if int(transaction['confirmations']) >= confirmations:
|
||||
return
|
||||
time.sleep(20)
|
||||
pytest.fail('Transaction with amount %s was not confirmed, address is %s, still has %s confirmations' % (
|
||||
amount, address, int(transaction['confirmations'])))
|
||||
|
||||
def verify_balance_is_updated(self, initial_balance, recipient_address, wait_time=360):
|
||||
counter = 0
|
||||
@@ -150,7 +142,7 @@ class NetworkApi:
|
||||
balance = round(self.get_balance(address), 4)
|
||||
if balance == expected_balance:
|
||||
return
|
||||
time.sleep(20)
|
||||
time.sleep(10)
|
||||
raise TimeoutException(
|
||||
'balance is not updated on Etherscan, it is %s but expected to be %s' % (balance, expected_balance))
|
||||
|
||||
|
||||
@@ -17,14 +17,13 @@ class TestDeepLinksOneDevice(MultipleSharedDeviceTestCase):
|
||||
|
||||
self.home = self.sign_in.create_user(username=self.username)
|
||||
self.home.communities_tab.click_until_presence_of_element(self.home.plus_community_button)
|
||||
self.open_community_name = "open community"
|
||||
self.community_name = "open community"
|
||||
self.channel_name = "general"
|
||||
self.community = self.home.create_community(community_type="open")
|
||||
self.profile_view = self.home.get_profile_view()
|
||||
self.browser_view = self.home.get_dapp_view()
|
||||
self.home.get_chat(self.open_community_name, community=True).click()
|
||||
self.home.get_chat(self.community_name, community=True).click()
|
||||
self.community_view = self.home.get_community_view()
|
||||
self.open_community_url = self.community_view.copy_community_link()
|
||||
self.channel = self.community_view.get_channel(self.channel_name).click()
|
||||
|
||||
@marks.testrail_id(704613)
|
||||
@@ -40,6 +39,7 @@ class TestDeepLinksOneDevice(MultipleSharedDeviceTestCase):
|
||||
self.channel.send_message(url)
|
||||
self.channel.chat_element_by_text(url).click_on_link_inside_message_body()
|
||||
if self.channel.profile_send_contact_request_button.is_element_displayed(10):
|
||||
# username_text = self.profile_view.default_username_text.text
|
||||
username_text = self.profile_view.contact_name_text.text
|
||||
if not (username_text.endswith(url[-6:]) or username_text == text):
|
||||
self.errors.append("Incorrect username is shown for profile url %s" % url)
|
||||
@@ -47,10 +47,34 @@ class TestDeepLinksOneDevice(MultipleSharedDeviceTestCase):
|
||||
self.errors.append("Profile was not opened by the profile url %s" % url)
|
||||
self.profile_view.close_button.click()
|
||||
|
||||
community_urls = {
|
||||
"https://status.app/c/ixyACjgKDVNOVCBjb21tdW5pdHkSHHJlcXVpcmUgMTAgU05UIEdvZXJsaSB0byB1c2UYASIHI2VhYjcwMAM=#zQ3shUeGnhM33QW4g9JfYfeLFAH9ZwbDboNYn5exCR7S3ii1y":
|
||||
"SNT community",
|
||||
"https://status.app/c/G0UAAMTyNsn2QZDEG0EXftOl8pOEfwEBOOSA_YTfIk85xmADDgINGmxpUHAXzK36bN0fK42Xf4YD2yjPk1z2pbFwFw==#zQ3sheoNX5kiuM393TJ6xDnL57aQoiwFWEuJnazJ6W2eNuh9u":
|
||||
"open community",
|
||||
"https://status.app/c/G00AAGS9TbI9mSR-ZNmFrhRjNuEeXAAbcAIUaLLJyjMOG3ACJQ12oIHD78QhzO9s_T5bUeU7rnATWJg3mGgTUemrAg==#zQ3shp9f5M3uyMpwTi3rFpFrP6WCWmNsW9pgK9cjXVTaf2vgj":
|
||||
"closed community"
|
||||
}
|
||||
for url, text in community_urls.items():
|
||||
self.channel.just_fyi("Opening community '%s' by the url %s" % (text, url))
|
||||
self.channel.chat_message_input.clear()
|
||||
self.channel.send_message(url)
|
||||
self.channel.chat_element_by_text(url).click_on_link_inside_message_body()
|
||||
if text == 'SNT community':
|
||||
if self.community_view.community_title.text != text:
|
||||
self.errors.append("Community '%s' was not requested to join by the url %s" % (text, url))
|
||||
else:
|
||||
if not self.community_view.join_button.is_element_displayed(
|
||||
10) or self.community_view.community_title.text != text:
|
||||
self.errors.append("Community '%s' was not requested to join by the url %s" % (text, url))
|
||||
if text != "closed community": # the last one
|
||||
self.home.navigate_back_to_home_view()
|
||||
self.home.get_to_community_channel_from_home(self.community_name)
|
||||
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(702775)
|
||||
def test_links_deep_links_profile(self):
|
||||
def test_links_deep_links(self):
|
||||
self.home.navigate_back_to_home_view()
|
||||
self.home.browser_tab.click()
|
||||
|
||||
@@ -63,6 +87,7 @@ class TestDeepLinksOneDevice(MultipleSharedDeviceTestCase):
|
||||
for link, text in profile_links.items():
|
||||
self.channel.just_fyi("Opening profile link %s" % link)
|
||||
self.browser_view.open_url(link)
|
||||
# shown_name_text = self.profile_view.default_username_text.text
|
||||
shown_name_text = self.profile_view.contact_name_text.text
|
||||
if text:
|
||||
name_is_shown = shown_name_text == text or shown_name_text.endswith(link[-6:])
|
||||
@@ -72,43 +97,25 @@ class TestDeepLinksOneDevice(MultipleSharedDeviceTestCase):
|
||||
self.errors.append("Profile was not opened by the profile deep link %s" % link)
|
||||
self.browser_view.click_system_back_button()
|
||||
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(739307)
|
||||
def test_deep_links_communities(self):
|
||||
closed_community_name, snt_community_name = "closed community", "SNT community"
|
||||
self.home.navigate_back_to_home_view()
|
||||
self.home.communities_tab.click()
|
||||
self.home.create_community(community_type="closed")
|
||||
if not self.community_view.community_options_button.is_element_displayed():
|
||||
self.home.get_chat(closed_community_name, community=True).click()
|
||||
closed_community_url = self.community_view.copy_community_link()
|
||||
self.home.navigate_back_to_home_view()
|
||||
self.home.create_community(community_type="token-gated")
|
||||
if not self.community_view.community_options_button.is_element_displayed():
|
||||
self.home.get_chat(snt_community_name, community=True).click()
|
||||
snt_community_url = self.community_view.copy_community_link()
|
||||
self.home.reopen_app(sign_in=False)
|
||||
self.sign_in.create_user(username="second user", first_user=False)
|
||||
self.home.browser_tab.click()
|
||||
|
||||
old, new = "https://status.app/", "status-app://"
|
||||
community_links = {
|
||||
snt_community_name: snt_community_url.replace(old, new),
|
||||
self.open_community_name: self.open_community_url.replace(old, new),
|
||||
closed_community_name: closed_community_url.replace(old, new)
|
||||
"status.app://c/ixyACjgKDVNOVCBjb21tdW5pdHkSHHJlcXVpcmUgMTAgU05UIEdvZXJsaSB0byB1c2UYASIHI2VhYjcwMAM=#zQ3shUeGnhM33QW4g9JfYfeLFAH9ZwbDboNYn5exCR7S3ii1y":
|
||||
"SNT community",
|
||||
"status.app://c/G0UAAMTyNsn2QZDEG0EXftOl8pOEfwEBOOSA_YTfIk85xmADDgINGmxpUHAXzK36bN0fK42Xf4YD2yjPk1z2pbFwFw==#zQ3sheoNX5kiuM393TJ6xDnL57aQoiwFWEuJnazJ6W2eNuh9u":
|
||||
"open community",
|
||||
"status.app://c/G00AAGS9TbI9mSR-ZNmFrhRjNuEeXAAbcAIUaLLJyjMOG3ACJQ12oIHD78QhzO9s_T5bUeU7rnATWJg3mGgTUemrAg==#zQ3shp9f5M3uyMpwTi3rFpFrP6WCWmNsW9pgK9cjXVTaf2vgj":
|
||||
"closed community"
|
||||
}
|
||||
for text, link in community_links.items():
|
||||
for link, text in community_links.items():
|
||||
self.channel.just_fyi("Opening community '%s' by the link %s" % (text, link))
|
||||
self.browser_view.open_url(link)
|
||||
if text == snt_community_name:
|
||||
if text == 'SNT community':
|
||||
if self.community_view.community_title.text != text:
|
||||
self.errors.append("Community '%s' was not requested to join by the deep link %s" % (text, link))
|
||||
else:
|
||||
if not self.community_view.join_button.is_element_displayed(
|
||||
10) or self.community_view.community_title.text != text:
|
||||
self.errors.append("Community '%s' was not requested to join by the deep link %s" % (text, link))
|
||||
if text != closed_community_name: # the last one
|
||||
if text != "closed community": # the last one
|
||||
self.home.navigate_back_to_home_view()
|
||||
self.home.browser_tab.click()
|
||||
|
||||
|
||||
@@ -135,14 +135,11 @@ class TestWalletMultipleDevice(MultipleSharedDeviceTestCase):
|
||||
|
||||
self.wallet_1.just_fyi("Sending funds from wallet")
|
||||
amount_to_send = 0.0001
|
||||
device_time_before_sending = self.wallet_1.driver.device_time
|
||||
self.wallet_1.send_asset(address='arb1:' + self.receiver['wallet_address'],
|
||||
asset_name='Ether',
|
||||
amount=amount_to_send)
|
||||
self.network_api.wait_for_confirmation_of_transaction(address=self.sender['wallet_address'],
|
||||
tx_time=device_time_before_sending)
|
||||
|
||||
device_time_after_sending = self.wallet_1.driver.device_time
|
||||
device_time = self.wallet_1.driver.device_time
|
||||
|
||||
self._check_balances_after_tx(amount_to_send, sender_balance, receiver_balance, eth_amount_sender,
|
||||
eth_amount_receiver)
|
||||
@@ -167,13 +164,10 @@ class TestWalletMultipleDevice(MultipleSharedDeviceTestCase):
|
||||
|
||||
self.wallet_1.just_fyi("Sending asset from drawer")
|
||||
amount_to_send = 0.0001
|
||||
device_time_before_sending = self.wallet_1.driver.device_time
|
||||
self.wallet_1.send_asset_from_drawer(address='arb1:' + self.receiver['wallet_address'],
|
||||
asset_name='Ether',
|
||||
amount=amount_to_send)
|
||||
self.network_api.wait_for_confirmation_of_transaction(address=self.sender['wallet_address'],
|
||||
tx_time=device_time_before_sending)
|
||||
device_time_after_sending = self.wallet_1.driver.device_time
|
||||
device_time = self.wallet_1.driver.device_time
|
||||
|
||||
self._check_balances_after_tx(amount_to_send, sender_balance, receiver_balance, eth_amount_sender,
|
||||
eth_amount_receiver)
|
||||
@@ -246,7 +240,6 @@ class TestWalletOneDevice(MultipleSharedDeviceTestCase):
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(727232)
|
||||
@marks.skip("The feature is disabled in https://github.com/status-im/status-mobile/pull/20955")
|
||||
@marks.xfail(reason="Missing networks in account address, https://github.com/status-im/status-mobile/issues/20166")
|
||||
def test_wallet_add_remove_watch_only_account(self):
|
||||
self.wallet_view.just_fyi("Adding new watch only account")
|
||||
|
||||
@@ -372,7 +372,7 @@ class CommunityView(HomeView):
|
||||
self.community_create_a_channel_button = Button(self.driver, accessibility_id="community-create-channel")
|
||||
self.channel_name_edit_box = EditBox(self.driver, translation_id="name-your-channel-placeholder")
|
||||
self.channel_descripton = ChatView(self.driver).community_description_edit_box
|
||||
self.community_options_button = Button(self.driver, accessibility_id="community-options-for-community")
|
||||
self.community_options_button = Button(self.driver, accessibility_id="community-menu-button")
|
||||
self.view_members_button = Button(self.driver, accessibility_id="view-members")
|
||||
self.community_info_button = Button(self.driver, translation_id="community-info")
|
||||
self.invite_button = Button(self.driver, accessibility_id="community-invite-people")
|
||||
@@ -455,10 +455,11 @@ class CommunityView(HomeView):
|
||||
def copy_community_link(self):
|
||||
self.driver.info("Copy community link")
|
||||
self.community_options_button.click()
|
||||
self.share_community_button.click()
|
||||
text = self.sharing_text_native.text
|
||||
self.click_system_back_button(times=2)
|
||||
return text
|
||||
self.community_info_button.click()
|
||||
self.element_starts_with_text('join.status.im/c/').click()
|
||||
community_link_text = self.element_starts_with_text('join.status.im/c/').text
|
||||
self.home_button.double_click()
|
||||
return 'https://%s' % community_link_text
|
||||
|
||||
def handle_membership_request(self, username: str, approve=True):
|
||||
self.driver.info("Handling membership request of user '%s', approve='%s'" % (username, str(approve)))
|
||||
|
||||
@@ -290,11 +290,8 @@ class ProfileView(BaseView):
|
||||
self.advertise_device_button = Button(self.driver, accessibility_id="advertise-device")
|
||||
self.sync_all_button = Button(self.driver, translation_id="sync-all-devices")
|
||||
self.syncing_button = Button(self.driver, accessibility_id="icon, Syncing, label-component, icon")
|
||||
self.paired_devices_button = Button(self.driver,
|
||||
accessibility_id="icon, Paired devices, 0 devices, label-component, icon")
|
||||
self.sync_plus_button = Button(
|
||||
self.driver,
|
||||
xpath="//*[@text='Paired devices']/following-sibling::android.view.ViewGroup[@content-desc='icon']")
|
||||
self.sync_plus_button = Button(self.driver,
|
||||
xpath="//*[@text='Syncing']/following-sibling::android.view.ViewGroup[1]")
|
||||
|
||||
# Keycard
|
||||
self.keycard_button = Button(self.driver, accessibility_id="keycard-button")
|
||||
@@ -542,7 +539,6 @@ class ProfileView(BaseView):
|
||||
|
||||
def get_sync_code(self):
|
||||
self.syncing_button.scroll_and_click()
|
||||
self.paired_devices_button.click()
|
||||
self.sync_plus_button.click()
|
||||
for checkbox in Button(
|
||||
self.driver,
|
||||
|
||||
@@ -260,15 +260,11 @@ class SignInView(BaseView):
|
||||
# self.next_button.click()
|
||||
# self.identifiers_button.wait_and_click(30)
|
||||
if enable_notifications:
|
||||
self.enable_notifications_button.wait_and_click()
|
||||
for _ in range(3):
|
||||
self.allow_button.click_if_shown(sec=10)
|
||||
self.enable_notifications_button.click_if_shown()
|
||||
if self.start_button.is_element_displayed():
|
||||
break
|
||||
self.enable_notifications_button.click_until_presence_of_element(self.start_button)
|
||||
if self.allow_button.is_element_displayed():
|
||||
self.allow_button.click()
|
||||
else:
|
||||
self.maybe_later_button.click_until_presence_of_element(self.start_button)
|
||||
self.cancel_button.click_if_shown() # TODO: remove when issue 20806 is fixed
|
||||
self.start_button.click()
|
||||
self.chats_tab.wait_for_visibility_of_element(30)
|
||||
self.driver.info("## New multiaccount is created successfully!", device=False)
|
||||
@@ -297,7 +293,6 @@ class SignInView(BaseView):
|
||||
self.enable_notifications_button.click_until_presence_of_element(self.start_button)
|
||||
else:
|
||||
self.maybe_later_button.click_until_presence_of_element(self.start_button)
|
||||
self.cancel_button.click_if_shown() # TODO: remove when issue 20806 is fixed
|
||||
self.start_button.click()
|
||||
self.chats_tab.wait_for_visibility_of_element(30)
|
||||
self.driver.info("## Multiaccount is recovered successfully!", device=False)
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import time
|
||||
|
||||
import pytest
|
||||
|
||||
from tests import common_password
|
||||
@@ -122,12 +120,7 @@ class WalletView(BaseView):
|
||||
self.login_button.click()
|
||||
|
||||
def confirm_transaction(self):
|
||||
self.confirm_button.click()
|
||||
for _ in range(3):
|
||||
if self.slide_button_track.is_element_displayed():
|
||||
break
|
||||
time.sleep(1)
|
||||
self.confirm_button.click()
|
||||
self.confirm_button.click_until_presence_of_element(self.slide_button_track)
|
||||
self.slide_and_confirm_with_password()
|
||||
|
||||
def set_amount(self, amount: float):
|
||||
@@ -167,6 +160,7 @@ class WalletView(BaseView):
|
||||
self.add_account_button.click()
|
||||
self.add_account_to_watch.click()
|
||||
self.address_to_watch_input.send_keys(address)
|
||||
self.account_has_activity_label.wait_for_visibility_of_element()
|
||||
self.add_account_continue_button.click()
|
||||
SignInView(self.driver).profile_title_input.send_keys(account_name)
|
||||
self.add_watched_address_button.click()
|
||||
|
||||
@@ -9372,9 +9372,10 @@ react-native-blob-util@^0.13.18:
|
||||
base-64 "0.1.0"
|
||||
glob "^7.1.6"
|
||||
|
||||
"react-native-camera-kit@git+https://github.com/status-im/react-native-camera-kit.git#refs/tags/v14.0.0-beta15-status-v1":
|
||||
version "14.0.0-beta15"
|
||||
resolved "git+https://github.com/status-im/react-native-camera-kit.git#90821bc45c950c98119acc896651997a5357dd4f"
|
||||
react-native-camera-kit@14.0.0-beta13:
|
||||
version "14.0.0-beta13"
|
||||
resolved "https://registry.yarnpkg.com/react-native-camera-kit/-/react-native-camera-kit-14.0.0-beta13.tgz#7d1c40571e7e7ce2c4b6bd6f58807f7573217c3c"
|
||||
integrity sha512-49q6l/Y3j1QMUDPGqIqkUzdraNtKWVQz5X4U8qfixSe+MeWe0N1vWlWWr8iH1apxQCS5v0dKPlYot0e3VKy05g==
|
||||
|
||||
react-native-config@^1.5.0:
|
||||
version "1.5.0"
|
||||
|
||||
Reference in New Issue
Block a user