Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c4dc896813 | ||
|
|
e73cd73c1c | ||
|
|
adc222a88d | ||
|
|
d6ef1eb775 | ||
|
|
966cd511e6 | ||
|
|
4134d18cbc | ||
|
|
8600c1d3a5 | ||
|
|
570c62e30e | ||
|
|
549efdb77c | ||
|
|
8807a63989 | ||
|
|
c0be0b7670 | ||
|
|
6e854428f2 | ||
|
|
c81dd8e3e3 | ||
|
|
24f4c4a07e | ||
|
|
98762c74f1 | ||
|
|
f3aeddb53a | ||
|
|
f5fcc9f45e | ||
|
|
9aa9dc1b4c | ||
|
|
61974dae4d | ||
|
|
8b3e639abd | ||
|
|
7c901fa045 | ||
|
|
8a12ad3510 | ||
|
|
c8044cd2f2 | ||
|
|
6872d1a857 | ||
|
|
98d4969ca5 | ||
|
|
5412092ca1 | ||
|
|
a8695116e2 | ||
|
|
76773a4165 | ||
|
|
32fc7b14e8 | ||
|
|
82a8f9f44d | ||
|
|
8df72d0c29 | ||
|
|
794cd57961 | ||
|
|
6bc29088ab | ||
|
|
658f62e8ce | ||
|
|
e6b346ca32 | ||
|
|
00b0755a73 | ||
|
|
f8cc85f5e2 | ||
|
|
6ba89d0c6e | ||
|
|
2614131426 | ||
|
|
cfc43be3cc | ||
|
|
3164cc6a6c | ||
|
|
5badb5bdb5 | ||
|
|
292fd78ff8 | ||
|
|
c875fb33fa | ||
|
|
b5962fd83a | ||
|
|
1d1eae13a9 | ||
|
|
63a168b6f4 | ||
|
|
ce7912632c | ||
|
|
ec53f17897 | ||
|
|
7987e537c8 | ||
|
|
074a2b292d | ||
|
|
8b417524fa | ||
|
|
f6a433c818 | ||
|
|
4940341504 | ||
|
|
06aa4671b6 | ||
|
|
7eaa5f6bb1 | ||
|
|
d48f933502 | ||
|
|
14d76eb4d4 | ||
|
|
ae1f82f33c | ||
|
|
c5a3eea048 | ||
|
|
c847cb5d03 | ||
|
|
4e1851d53c | ||
|
|
edd1d0661d | ||
|
|
18fc168537 | ||
|
|
ca8b404e5b | ||
|
|
f98e5cf11f | ||
|
|
5aca098aa2 | ||
|
|
55a182f430 | ||
|
|
8e31dae33b | ||
|
|
ce69df19ac | ||
|
|
681bcbf726 | ||
|
|
aeef913f63 | ||
|
|
74e84644aa | ||
|
|
0e29149363 | ||
|
|
5fe28a2c9b | ||
|
|
5fba1dbfa3 | ||
|
|
32098d2548 | ||
|
|
60a4aa2f8e | ||
|
|
f8699c582a | ||
|
|
9ba6c6262e | ||
|
|
5fc23816a6 | ||
|
|
59513eae65 | ||
|
|
aead730d28 | ||
|
|
5bff89a58f | ||
|
|
e1177d20b5 | ||
|
|
0a6eaf1c12 | ||
|
|
d24eb96c9d | ||
|
|
3dfd9df935 | ||
|
|
d0374d9fd2 | ||
|
|
f0026b4d10 | ||
|
|
b9a02f707d | ||
|
|
d4e1b63ef7 | ||
|
|
e9b973196b | ||
|
|
74149c1ff0 | ||
|
|
288f57192a | ||
|
|
a52bc11592 | ||
|
|
354cda3be5 | ||
|
|
f114908c4d | ||
|
|
b0964eff64 | ||
|
|
b0d2e6e5d7 | ||
|
|
df0e9313da | ||
|
|
76bf8d365c | ||
|
|
41763689e0 | ||
|
|
a6a7ec8bc0 | ||
|
|
7e896979f6 | ||
|
|
68402ae669 | ||
|
|
8c67ce0b75 | ||
|
|
e2b9e12038 | ||
|
|
a03cc3c3ab | ||
|
|
da25280555 | ||
|
|
68e4cf3632 | ||
|
|
dd7795a8b8 | ||
|
|
feb875310e | ||
|
|
8b0681c44a | ||
|
|
9bbde035dc | ||
|
|
260a741b17 | ||
|
|
48789e8793 | ||
|
|
2dfb3ab838 | ||
|
|
e05d5000b1 | ||
|
|
3067b814b1 | ||
|
|
e9bbb34797 | ||
|
|
28aeb2dad0 | ||
|
|
fef3165f24 | ||
|
|
88d1a17a94 | ||
|
|
ed824bdb06 | ||
|
|
932fee2857 | ||
|
|
53874c8343 | ||
|
|
e6d9ef0298 | ||
|
|
4aee5af791 | ||
|
|
3ee004afab | ||
|
|
6c07fac28b | ||
|
|
98deaa4459 | ||
|
|
7de1f95054 | ||
|
|
9e71fc2d14 | ||
|
|
e44b29f3a6 | ||
|
|
e5ed5e624b | ||
|
|
f075cd0bdc | ||
|
|
1d44472aa6 | ||
|
|
495bc91989 | ||
|
|
bcf8e39e84 | ||
|
|
c86cdf9ac8 | ||
|
|
1948c11508 | ||
|
|
02d4618997 | ||
|
|
fd4d64c53e | ||
|
|
17b64ab3ba | ||
|
|
6a88a34d34 | ||
|
|
3be1532b32 | ||
|
|
44846c80c8 | ||
|
|
a405de62e6 | ||
|
|
06dc9ea1d3 | ||
|
|
32a4bb1153 | ||
|
|
418053b21e | ||
|
|
2528efb538 |
@@ -26,7 +26,7 @@
|
||||
malli.generator malli.generator
|
||||
malli.transform malli.transform
|
||||
malli.util malli.util
|
||||
promesa.core p
|
||||
promesa.core promesa
|
||||
schema.core schema
|
||||
status-im.feature-flags ff
|
||||
taoensso.timbre log}}
|
||||
|
||||
@@ -34,3 +34,5 @@ STICKERS_TEST_ENABLED=1
|
||||
LOCAL_PAIRING_ENABLED=1
|
||||
TEST_STATEOFUS=1
|
||||
FAST_CREATE_COMMUNITY_ENABLED=1
|
||||
TEST_NETWORKS_ENABLED=1
|
||||
SHOW_NOT_IMPLEMENTED_FEATURES=1
|
||||
|
||||
@@ -33,3 +33,7 @@ TWO_MINUTES_SYNCING=1
|
||||
STICKERS_TEST_ENABLED=1
|
||||
LOCAL_PAIRING_ENABLED=1
|
||||
FAST_CREATE_COMMUNITY_ENABLED=1
|
||||
TEST_NETWORKS_ENABLED=1
|
||||
SHOW_NOT_IMPLEMENTED_FEATURES=1
|
||||
DELETE_MESSAGE_FOR_ME_UNDO_TIME_LIMIT=10000
|
||||
DELETE_MESSAGE_UNDO_TIME_LIMIT=10000
|
||||
|
||||
@@ -35,3 +35,5 @@ ENABLE_QUO_PREVIEW=1
|
||||
STICKERS_TEST_ENABLED=1
|
||||
LOCAL_PAIRING_ENABLED=1
|
||||
FAST_CREATE_COMMUNITY_ENABLED=1
|
||||
TEST_NETWORKS_ENABLED=1
|
||||
SHOW_NOT_IMPLEMENTED_FEATURES=1
|
||||
|
||||
@@ -22,3 +22,4 @@ COMMUNITIES_ENABLED=1
|
||||
DATABASE_MANAGEMENT_ENABLED=1
|
||||
DELETE_MESSAGE_ENABLED=1
|
||||
FAST_CREATE_COMMUNITY_ENABLED=0
|
||||
TEST_NETWORKS_ENABLED=0
|
||||
|
||||
@@ -20,3 +20,4 @@ MAX_IMAGES_BATCH=1
|
||||
DELETE_MESSAGE_ENABLED=1
|
||||
COLLECTIBLES_ENABLED=1
|
||||
FAST_CREATE_COMMUNITY_ENABLED=0
|
||||
TEST_NETWORKS_ENABLED=0
|
||||
|
||||
@@ -259,7 +259,7 @@ status-go-library: ##@status-go Compile status-go for node-js
|
||||
|
||||
run-clojure: export TARGET := clojure
|
||||
run-clojure: ##@run Watch for and build Clojure changes for mobile
|
||||
bun shadow-cljs watch mobile
|
||||
yarn shadow-cljs watch mobile
|
||||
|
||||
run-metro: export TARGET := clojure
|
||||
run-metro: ##@run Start Metro to build React Native changes
|
||||
@@ -267,7 +267,7 @@ run-metro: ##@run Start Metro to build React Native changes
|
||||
|
||||
run-re-frisk: export TARGET := clojure
|
||||
run-re-frisk: ##@run Start re-frisk server
|
||||
bun shadow-cljs run re-frisk-remote.core/start
|
||||
yarn shadow-cljs run re-frisk-remote.core/start
|
||||
|
||||
# TODO: Migrate this to a Nix recipe, much the same way as nix/mobile/android/targets/release-android.nix
|
||||
run-android: export TARGET := android
|
||||
@@ -327,20 +327,20 @@ lint-fix: ##@test Run code style checks and fix issues
|
||||
|
||||
shadow-server: export TARGET := clojure
|
||||
shadow-server:##@ Start shadow-cljs in server mode for watching
|
||||
bun shadow-cljs server
|
||||
yarn shadow-cljs server
|
||||
|
||||
_test-clojure: export TARGET := clojure
|
||||
_test-clojure: export WATCH ?= false
|
||||
_test-clojure: status-go-library
|
||||
_test-clojure:
|
||||
ifeq ($(WATCH), true)
|
||||
bun node-pre-gyp rebuild && \
|
||||
bun shadow-cljs compile mocks && \
|
||||
nodemon --exec "bun shadow-cljs compile test && node --require ./test-resources/override.js $$SHADOW_OUTPUT_TO" -e cljs
|
||||
yarn node-pre-gyp rebuild && \
|
||||
yarn shadow-cljs compile mocks && \
|
||||
nodemon --exec "yarn shadow-cljs compile test && node --require ./test-resources/override.js $$SHADOW_OUTPUT_TO" -e cljs
|
||||
else
|
||||
bun node-pre-gyp rebuild && \
|
||||
bun shadow-cljs compile mocks && \
|
||||
bun shadow-cljs compile test && \
|
||||
yarn node-pre-gyp rebuild && \
|
||||
yarn shadow-cljs compile mocks && \
|
||||
yarn shadow-cljs compile test && \
|
||||
node --require ./test-resources/override.js "$$SHADOW_OUTPUT_TO"
|
||||
endif
|
||||
|
||||
@@ -353,11 +353,11 @@ test-watch-for-repl: export SHADOW_OUTPUT_TO := target/test/test.js
|
||||
test-watch-for-repl: export SHADOW_NS_REGEXP := .*-test$$
|
||||
test-watch-for-repl: status-go-library
|
||||
test-watch-for-repl: ##@test Watch all Clojure tests and support REPL connections
|
||||
bun node-pre-gyp rebuild
|
||||
yarn node-pre-gyp rebuild
|
||||
rm -f target/test/test.js
|
||||
bun shadow-cljs compile mocks && \
|
||||
yarn shadow-cljs compile mocks && \
|
||||
concurrently --kill-others --prefix-colors 'auto' --names 'build,repl' \
|
||||
'bun shadow-cljs watch test --verbose' \
|
||||
'yarn shadow-cljs watch test --verbose' \
|
||||
"until [ -f $$SHADOW_OUTPUT_TO ] ; do sleep 1 ; done ; node --require ./test-resources/override.js $$SHADOW_OUTPUT_TO --repl"
|
||||
|
||||
test-unit: export SHADOW_OUTPUT_TO := target/unit_test/test.js
|
||||
@@ -375,28 +375,28 @@ test-contract: export SHADOW_NS_REGEXP := ^tests\.contract-test.*$$
|
||||
test-contract: ##@test Run contract tests
|
||||
test-contract: _test-clojure
|
||||
|
||||
android-test: jsbundle
|
||||
android-test: export TARGET := android
|
||||
android-test:
|
||||
test-android: jsbundle
|
||||
test-android: export TARGET := android
|
||||
test-android: ##@test Android Gradle test
|
||||
cd android && ./gradlew test
|
||||
|
||||
component-test-watch: export TARGET := clojure
|
||||
component-test-watch: export COMPONENT_TEST := true
|
||||
component-test-watch: export BABEL_ENV := test
|
||||
component-test-watch: export JEST_USE_SILENT_REPORTER := false
|
||||
component-test-watch: ##@ Watch tests and re-run no changes to cljs files
|
||||
test-component-watch: export TARGET := clojure
|
||||
test-component-watch: export COMPONENT_TEST := true
|
||||
test-component-watch: export BABEL_ENV := test
|
||||
test-component-watch: export JEST_USE_SILENT_REPORTER := false
|
||||
test-component-watch: ##@ Watch tests and re-run no changes to cljs files
|
||||
@scripts/check-metro-shadow-process.sh
|
||||
rm -rf ./component-spec
|
||||
nodemon --exec 'bun shadow-cljs compile component-test && jest --config=test/jest/jest.config.js --testEnvironment node ' -e cljs
|
||||
nodemon --exec 'yarn shadow-cljs compile component-test && jest --config=test/jest/jest.config.js --testEnvironment node ' -e cljs
|
||||
|
||||
component-test: export TARGET := clojure
|
||||
component-test: export COMPONENT_TEST := true
|
||||
component-test: export BABEL_ENV := test
|
||||
component-test: export JEST_USE_SILENT_REPORTER := false
|
||||
component-test: ##@test Run component tests once in NodeJS
|
||||
test-component: export TARGET := clojure
|
||||
test-component: export COMPONENT_TEST := true
|
||||
test-component: export BABEL_ENV := test
|
||||
test-component: export JEST_USE_SILENT_REPORTER := false
|
||||
test-component: ##@test Run component tests once in NodeJS
|
||||
@scripts/check-metro-shadow-process.sh
|
||||
rm -rf ./component-spec
|
||||
bun shadow-cljs compile component-test && \
|
||||
yarn shadow-cljs compile component-test && \
|
||||
jest --clearCache && jest --config=test/jest/jest.config.js --testEnvironment node
|
||||
|
||||
#--------------
|
||||
@@ -441,13 +441,17 @@ _list: SHELL := /bin/sh
|
||||
_list:
|
||||
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$'
|
||||
|
||||
patch-file: export TARGET := default
|
||||
patch-file: ##@other Generates patch file for npm deps
|
||||
@scripts/patch-npm-lib.sh
|
||||
|
||||
#--------------
|
||||
# REPLs
|
||||
#--------------
|
||||
|
||||
repl-clojure: export TARGET := clojure
|
||||
repl-clojure: ##@repl Start Clojure repl for mobile App
|
||||
bun shadow-cljs cljs-repl mobile
|
||||
yarn shadow-cljs cljs-repl mobile
|
||||
|
||||
repl-nix: nix-repl ##@repl Start an interactive Nix REPL
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.8.7'
|
||||
library 'status-jenkins-lib@v1.8.12'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
@@ -34,10 +34,10 @@ pipeline {
|
||||
}
|
||||
|
||||
environment {
|
||||
LANG = "en_US.UTF-8"
|
||||
LC_ALL = "en_US.UTF-8"
|
||||
LANGUAGE = "en_US.UTF-8"
|
||||
TARGET = "android${utils.isE2EBuild() ? "-e2e" : ""}"
|
||||
LANG = 'en_US.UTF-8'
|
||||
LC_ALL = 'en_US.UTF-8'
|
||||
LANGUAGE = 'en_US.UTF-8'
|
||||
PLATFORM = "android${utils.isE2EBuild() ? "-e2e" : ""}"
|
||||
BUILD_ENV = 'prod'
|
||||
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
|
||||
FASTLANE_DISABLE_COLORS = 1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.8.7'
|
||||
library 'status-jenkins-lib@v1.8.12'
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux' }
|
||||
@@ -81,7 +81,7 @@ pipeline {
|
||||
stage('Publish') {
|
||||
when { expression { params.PUBLISH } }
|
||||
steps { script {
|
||||
switch (btype) {
|
||||
switch (utils.getBuildType()) {
|
||||
case 'nightly': /* Create JSON file with newest build URLs */
|
||||
s3.updateBucketJSON(urls, 'latest.json');
|
||||
break;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.8.7'
|
||||
library 'status-jenkins-lib@v1.8.12'
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux' }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.8.7'
|
||||
library 'status-jenkins-lib@v1.8.12'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
@@ -34,10 +34,10 @@ pipeline {
|
||||
}
|
||||
|
||||
environment {
|
||||
LANG = "en_US.UTF-8"
|
||||
LC_ALL = "en_US.UTF-8"
|
||||
LANGUAGE = "en_US.UTF-8"
|
||||
TARGET = 'ios'
|
||||
LANG = 'en_US.UTF-8'
|
||||
LC_ALL = 'en_US.UTF-8'
|
||||
LANGUAGE = 'en_US.UTF-8'
|
||||
PLATFORM = 'ios'
|
||||
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
|
||||
FASTLANE_DISABLE_COLORS = 1
|
||||
BUNDLE_PATH = "${HOME}/.bundle"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.8.7'
|
||||
library 'status-jenkins-lib@v1.8.12'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
@@ -29,61 +29,47 @@ pipeline {
|
||||
description: 'Specify build type. Values: pr / e2e / nightly / release',
|
||||
defaultValue: 'pr',
|
||||
)
|
||||
booleanParam(
|
||||
name: 'RUN_CONTRACT_TESTS',
|
||||
description: 'Whether to run optional and slow contract tests.',
|
||||
defaultValue: false,
|
||||
)
|
||||
}
|
||||
|
||||
environment {
|
||||
LANG = "en_US.UTF-8"
|
||||
LC_ALL = "en_US.UTF-8"
|
||||
LANGUAGE = "en_US.UTF-8"
|
||||
TARGET = 'tests'
|
||||
LANG = 'en_US.UTF-8'
|
||||
LC_ALL = 'en_US.UTF-8'
|
||||
LANGUAGE = 'en_US.UTF-8'
|
||||
PLATFORM = 'tests'
|
||||
BUILD_ENV = 'prod'
|
||||
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
|
||||
LOG_FILE = utils.pkgFilename(ext: 'log', arch: 'tests')
|
||||
CLJ_LINTER_PRINT_WARNINGS = 'true'
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Checks') {
|
||||
stage('Test') {
|
||||
parallel {
|
||||
stage('Lint') {
|
||||
steps {
|
||||
sh """#!/bin/bash
|
||||
set -eo pipefail
|
||||
make lint CLJ_LINTER_PRINT_WARNINGS=true 2>&1 | tee ${LOG_FILE}
|
||||
"""
|
||||
}
|
||||
steps { make('lint') }
|
||||
}
|
||||
stage('Unit Tests') {
|
||||
steps {
|
||||
sh """#!/bin/bash
|
||||
set -eo pipefail
|
||||
make test-unit 2>&1 | tee -a ${LOG_FILE}
|
||||
"""
|
||||
}
|
||||
stage('Unit') {
|
||||
steps { make('test-unit') }
|
||||
}
|
||||
stage('Component') {
|
||||
steps { make('test-component') }
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Contract Tests') {
|
||||
steps {
|
||||
sh """#!/bin/bash
|
||||
set -eo pipefail
|
||||
make test-contract 2>&1 | tee -a ${LOG_FILE}
|
||||
"""
|
||||
}
|
||||
}
|
||||
stage('Integration Tests') {
|
||||
steps {
|
||||
sh """#!/bin/bash
|
||||
set -eo pipefail
|
||||
make test-integration 2>&1 | tee -a ${LOG_FILE}
|
||||
"""
|
||||
}
|
||||
}
|
||||
stage('Component Tests') {
|
||||
steps {
|
||||
sh """#!/bin/bash
|
||||
set -eo pipefail
|
||||
make component-test 2>&1 | tee -a ${LOG_FILE}
|
||||
"""
|
||||
stage('Heavy Test') {
|
||||
parallel {
|
||||
stage('Contract') {
|
||||
when { expression { params.RUN_CONTRACT_TESTS } }
|
||||
steps { make('test-contract') }
|
||||
}
|
||||
stage('Integration') {
|
||||
steps { make('test-integration') }
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Upload') {
|
||||
@@ -100,3 +86,10 @@ pipeline {
|
||||
always { sh 'make purge' }
|
||||
}
|
||||
}
|
||||
|
||||
def make(target) {
|
||||
sh """#!/bin/bash
|
||||
set -eo pipefail
|
||||
make ${target} 2>&1 | tee -a ${LOG_FILE}
|
||||
"""
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.8.7'
|
||||
library 'status-jenkins-lib@v1.8.12'
|
||||
|
||||
pipeline {
|
||||
|
||||
@@ -36,6 +36,12 @@ pipeline {
|
||||
))
|
||||
}
|
||||
|
||||
environment {
|
||||
/* Avoid race conditions with other builds using virtualenv. */
|
||||
VIRTUAL_ENV = "${WORKSPACE_TMP}/venv"
|
||||
PATH = "${VIRTUAL_ENV}/bin:${PATH}"
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Fetch') {
|
||||
steps { script {
|
||||
@@ -52,7 +58,8 @@ pipeline {
|
||||
stage('Setup') {
|
||||
steps { script {
|
||||
dir('test/appium') {
|
||||
sh 'pip3 install --user -r requirements.txt'
|
||||
sh "python3 -m venv ${VIRTUAL_ENV}"
|
||||
sh 'pip3 install -r requirements.txt'
|
||||
}
|
||||
} }
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.8.7'
|
||||
library 'status-jenkins-lib@v1.8.12'
|
||||
|
||||
pipeline {
|
||||
|
||||
@@ -54,6 +54,12 @@ pipeline {
|
||||
))
|
||||
}
|
||||
|
||||
environment {
|
||||
/* Avoid race conditions with other builds using virtualenv. */
|
||||
VIRTUAL_ENV = "${WORKSPACE_TMP}/venv"
|
||||
PATH = "${VIRTUAL_ENV}/bin:${PATH}"
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Prep') {
|
||||
steps { script {
|
||||
@@ -79,7 +85,8 @@ pipeline {
|
||||
stage('Setup') {
|
||||
steps { script {
|
||||
dir('test/appium') {
|
||||
sh 'pip3 install --user -r requirements.txt'
|
||||
sh "python3 -m venv ${VIRTUAL_ENV}"
|
||||
sh 'pip3 install -r requirements.txt'
|
||||
}
|
||||
} }
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.8.7'
|
||||
library 'status-jenkins-lib@v1.8.12'
|
||||
|
||||
pipeline {
|
||||
|
||||
@@ -35,6 +35,11 @@ pipeline {
|
||||
))
|
||||
}
|
||||
|
||||
environment {
|
||||
/* Avoid race conditions with other builds using virtualenv. */
|
||||
VIRTUAL_ENV = "${WORKSPACE_TMP}/venv"
|
||||
PATH = "${VIRTUAL_ENV}/bin:${PATH}"
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Prep') {
|
||||
@@ -51,7 +56,8 @@ pipeline {
|
||||
stage('Setup') {
|
||||
steps { script {
|
||||
dir('test/appium') {
|
||||
sh 'pip3 install --user -r requirements.txt'
|
||||
sh "python3 -m venv ${VIRTUAL_ENV}"
|
||||
sh 'pip3 install -r requirements.txt'
|
||||
}
|
||||
} }
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.8.7'
|
||||
library 'status-jenkins-lib@v1.8.12'
|
||||
|
||||
pipeline {
|
||||
agent { label 'macos' }
|
||||
|
||||
environment {
|
||||
LANG = 'en_US.UTF-8'
|
||||
LANGUAGE = 'en_US.UTF-8'
|
||||
LC_ALL = 'en_US.UTF-8'
|
||||
TARGET = 'ios'
|
||||
LANG = 'en_US.UTF-8'
|
||||
LANGUAGE = 'en_US.UTF-8'
|
||||
LC_ALL = 'en_US.UTF-8'
|
||||
PLATFORM = 'ios'
|
||||
FASTLANE_DISABLE_COLORS = 1
|
||||
/* avoid writing to r/o /nix */
|
||||
GEM_HOME = '~/.rubygems'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.8.7'
|
||||
library 'status-jenkins-lib@v1.8.12'
|
||||
|
||||
pipeline {
|
||||
agent { label params.AGENT_LABEL }
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.8.7'
|
||||
library 'status-jenkins-lib@v1.8.12'
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux' }
|
||||
|
||||
environment {
|
||||
LANG = 'en_US.UTF-8'
|
||||
LANGUAGE = 'en_US.UTF-8'
|
||||
LC_ALL = 'en_US.UTF-8'
|
||||
TARGET = 'ios'
|
||||
LANG = 'en_US.UTF-8'
|
||||
LANGUAGE = 'en_US.UTF-8'
|
||||
LC_ALL = 'en_US.UTF-8'
|
||||
PLATFORM = 'ios'
|
||||
FASTLANE_DISABLE_COLORS = 1
|
||||
/* avoid writing to r/o /nix */
|
||||
GEM_HOME = '~/.rubygems'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.8.7'
|
||||
library 'status-jenkins-lib@v1.8.12'
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
|
||||
@@ -16,10 +16,10 @@ Both of these links are showing it for React-Testing-Library (not Native) howeve
|
||||
## Running the tests
|
||||
To run these tests there are two methods.
|
||||
|
||||
`make component-test`
|
||||
`make test-component`
|
||||
setups and runs the test suite once.
|
||||
|
||||
`make component-test-watch`
|
||||
`make test-component-watch`
|
||||
setups and runs the test suite and watches for code changes will then retrigger the test suite.
|
||||
|
||||
## Writing Tests
|
||||
@@ -38,7 +38,7 @@ There is a file of utility functions defined in "src/test_helpers/component.cljs
|
||||
## Configuration
|
||||
Status Mobile has a bespoke tech stack, as such there is more complexities to configuring the tests.
|
||||
|
||||
### Shadow-CLJS
|
||||
### Shadow-CLJS
|
||||
the configuration for compiling our tests are defined in the "shadow-cljs.edn" file.
|
||||
The three main parts of this are
|
||||
`:target :npm-module`
|
||||
@@ -47,9 +47,9 @@ Needed for the configuration we are using
|
||||
a vector of entry points for the test files.
|
||||
and the `ns-regexp` to specify what tests to find. Since we have multiple forms of tests we decided that "component-spec" is the least likely to detect the wrong file type.
|
||||
|
||||
It's worth knowing that our tests are compiled to JS and then run in the temporary folder `component-tests`.
|
||||
It's worth knowing that our tests are compiled to JS and then run in the temporary folder `component-tests`.
|
||||
|
||||
### Jest
|
||||
There is also further configuration for Jest in "test/jest". There is a jest config file which has some mostly standard configuration pieces, where the tests live, what environment variables are set etc. This is documented by Jest here: https://jestjs.io/docs/configuration
|
||||
|
||||
There is also a setup file which is used to set some global and default values. Additionally this file is used to mock some of the react native (among other) dependencies
|
||||
There is also a setup file which is used to set some global and default values. Additionally this file is used to mock some of the react native (among other) dependencies.
|
||||
|
||||
@@ -20,12 +20,6 @@ required by bignumber.js otherwise there is a compilation error
|
||||
|
||||
used to generate guids and random values in `status-im.utils.random`
|
||||
|
||||
## "create-react-class": "15.6.2"
|
||||
|
||||
fixed version because even bugfix update causes compilation error with current version of react-native (0.59)
|
||||
|
||||
internal react library, used by figwheel for instance but also probably react
|
||||
|
||||
## "emojilib": "^2.4.0"
|
||||
|
||||
used for emojis
|
||||
@@ -113,11 +107,6 @@ used for profile picture
|
||||
used for storing password when user saves password
|
||||
TODO: check if fork is necessary, merge with upstream?
|
||||
|
||||
## "react-native-languages": "^3.0.2"
|
||||
|
||||
TODO DEPRECATED, should be replaced with https://github.com/react-native-community/react-native-localize
|
||||
used to get user language and interact with i18n.js
|
||||
|
||||
## "react-native-mail": "git+https://github.com/status-im/react-native-mail.git#v3.0.8_status"
|
||||
|
||||
used to send email to support when phone is shaked
|
||||
@@ -131,6 +120,7 @@ TODO: update once bug is fixed for Android that causes crash when app is back fr
|
||||
## "react-native-shake": "^3.3.1"
|
||||
|
||||
used to send email to support when phone is shaked
|
||||
|
||||
## "react-native-lottie-splash-screen": "^1.0.1"
|
||||
|
||||
used to make splash screen with lottie animation during initial loading for android, also used as replacement of "react-native-splash-screen" for iOS
|
||||
@@ -157,10 +147,10 @@ used for browser
|
||||
used for native navigation
|
||||
fixed because even bugfix version upgrade causes runtime errors with current version of react-native
|
||||
|
||||
## "rn-emoji-keyboard": "https://github.com/status-im/rn-emoji-keyboard"
|
||||
|
||||
Used for taking emoji input, for custom emoji thumbnails for community channels
|
||||
|
||||
## "react-native-draggable-flatlist": "https://github.com/computerjazz/react-native-draggable-flatlist"
|
||||
|
||||
A drag-and-drop-enabled FlatList component for React Native
|
||||
|
||||
## "react-native-shadow-2": "https://github.com/SrBrahma/react-native-shadow-2"
|
||||
|
||||
A shadow component that is consistent across both platforms
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[Pipeline for QA](https://github.com/status-im/status-mobile/projects/7) is a project board for developers and testers used to track the status of a pull request, get reviews and manual testing, and run autotests.
|
||||
|
||||
The generally accepted recommendations for its use are described below:
|
||||
The generally accepted requirements for its use are described below:
|
||||
|
||||
## Opening a PR
|
||||
- Once a PR is created, it moves to the ```REVIEW``` column where a review will be requested automatically.
|
||||
@@ -13,35 +13,70 @@ The generally accepted recommendations for its use are described below:
|
||||
### What if the work is still in progress?
|
||||
|
||||
- If PR work is not finished yet, please mark it as a draft or add [WIP] to the title and keep it in the `CONTRIBUTOR` column until it's ready to be reviewed/tested.
|
||||
- Alternatively, you can open a `draft`.
|
||||
|
||||
### When is a PR considered ready to move forward?
|
||||
|
||||
### When is a PR considered to be Ready for testing by QA team?
|
||||
Ready for testing PR should meet the following criteria:
|
||||
Ready for testing, a PR should meet the following criteria:
|
||||
|
||||
1. Reviewed and has at least 1 approval
|
||||
2. Rebased to `develop` branch (both `status-mobile` and `status-go` if needed, depending on what part has changes)
|
||||
3. All possible conflicts have been resolved
|
||||
4. Has the label: `request-manual-qa`
|
||||
1. Reviewed and has at least 1 approval.
|
||||
2. Rebased to the `develop` branch (both `status-mobile` and `status-go` if needed, depending on what part has changes).
|
||||
- **NOTE:** QAs can use the `Update with rebase` button from GitHub if:
|
||||
- The PR has no `status-go` changes.
|
||||
- The PR has no conflict with the develop branch.
|
||||
3. All possible conflicts have been resolved.
|
||||
4. Has the label: `request-manual-qa` or `skip-manual-qa`.
|
||||
5. PRs **MUST** identify what area is affected and should have a description.
|
||||
|
||||
**NOTE:** Make sure that QAs are OK with that
|
||||
|
||||
### Adding `skip-manual-qa`
|
||||
|
||||
- Please ask another team member before adding the `skip-manual-qa` label (PR/Status community/DMs) so that there's a second opinion.
|
||||
- The PR MUST have a proper reasoning why manual QA is skipped.
|
||||
- The PR MUST include the steps of testing that has been done by the developer prior to moving it forward.
|
||||
**From the perspective of a developer it means that once work on PR is finished:**
|
||||
|
||||
1. It should be rebased to the latest `develop`. If there are conflicts - they should be resolved if possible.
|
||||
2. If the PR was in the `Contributor` column - it should be moved to `Review` column.
|
||||
3. Wait for the review.
|
||||
4. Make sure that after review and before requesting manual QA your PR is rebased to current develop.
|
||||
5. Once the PR has been approved by reviewer(s) - label `request-manual-qa` should be applied to the PR
|
||||
6. Move PR to the E2E column when it is ready for testing (**mandatory for all PRs**). That will also trigger e2e tests run. QAs are monitoring PRs from E2E column and take it into test.
|
||||
5. The PR **MUST** be moved to the E2E column when it is ready for testing (**mandatory for all PRs**).
|
||||
That will also trigger e2e tests run. QAs are monitoring PRs from E2E column and take it into test.
|
||||
|
||||
After that - PR will be taken into manual testing by the QA team.
|
||||
6. After that - PR will be taken into manual testing by the QA team.
|
||||
|
||||
### E2E tests and analyzing the results
|
||||
|
||||
This step cannot be skipped. So, at least one comment from the `status-im-auto` bot with results is a prerequisite for moving forward.
|
||||
Information on how to analyze tests can be found [here](https://github.com/status-im/status-mobile/blob/develop/doc/how-to-launch-e2e.md).
|
||||
Tests might be flaky, as they depend on infrastructure - SauceLabs and Waku.
|
||||
|
||||
If there are `Failed tests` and you are not sure about the reason, you can always ping the mobile QAs for help (preferably in PRs by `@status-im/mobile-qa`).
|
||||
|
||||
**For now, it is the only reliable source of regression in the app because, due to time constraints, it is not possible to test thoroughly each PR.
|
||||
Please, respect this rule.**
|
||||
|
||||
## Testing PR
|
||||
|
||||
### Manual testing
|
||||
- If you think PR needs and is ready for manual testing, please add the ```request-manual-qa``` label.
|
||||
|
||||
#### Prerequisites for manual testing
|
||||
1. PR has a description of the change and details the area of the application affected by the change.
|
||||
2. PR has automation results from the previous E2E test run step.
|
||||
3. PR includes a demo, test steps, and any possible regression(s)
|
||||
4. If appropriate, PR details what elements of a feature are out of scope.
|
||||
|
||||
**If one of the prerequisites is missing, the PR will be moved to the contributor folder with a corresponding comment.**
|
||||
|
||||
- If you think a PR needs and is ready for manual testing, please add the `request-manual-qa` label.
|
||||
- QA engineer picks up one of PRs with the ```request-manual-qa``` label, drags the item to the ```IN TESTING``` column and assigns it to themselves.
|
||||
- During testing, QA will add comments describing the issues found, and also review automation tests results.
|
||||
Usually found issues are numbered as "Issue 1, Issue 2", etc.
|
||||
When the first round of testing is completed and all issues for this stage are found, the QA can add the ```Tested - Issues``` label and drag the card to the ```CONTRIBUTOR``` column. These two actions are optional.
|
||||
When the first round of testing is completed and all issues for this stage are found, the QA can add the ```Tested - Issues``` label and drag the card to the ```CONTRIBUTOR``` column. These two actions are optional.
|
||||
|
||||
**IMPORTANT NOTE:** when the issues are fixed, developer **MUST** notify the QA that it is ready to be re-tested again by mention them in the PR.
|
||||
|
||||
- When manual testing of the PR is fully completed and all the issues are fixed, the QA adds the ```Tested - OK``` label and drags the card to the ```Design review``` column (the cases when design review is necessary are described below).
|
||||
- If design review is not required, the QA drags the PR to the ```MERGE``` column. After that the developer merges PR into develop.
|
||||
- If design review has been done, the designer (```@Francesca-G```) drags the PR to the ```MERGE``` column.
|
||||
@@ -68,7 +103,7 @@ There are three possible scenarios when the design review is completed:
|
||||
---
|
||||
|
||||
#### Why my PR is in `Contributor` column?
|
||||
PR can be moved to this column by the ```status-github-bot``` or by QA engineer with label `Tested-issues`.
|
||||
PR can be moved to this column by the ```status-github-bot``` or by QA engineer with label `Tested-issues` or if one of the requirements for manual QA was not met.
|
||||
In the first case most often this happens due to conflicting files in PR.
|
||||
In the second case - after fixing of all found issues, the developer should ping the QA in the PR comments for retesting.
|
||||
|
||||
@@ -86,7 +121,6 @@ In the second case - after fixing of all found issues, the developer should ping
|
||||
6. In case of manual testing - the label ```Tested - OK``` from QA
|
||||
7. In case of design review - the approval from the designer
|
||||
|
||||
|
||||
You can merge your PR into develop - some useful clues you can find [here](https://notes.status.im/setup-e2e#3-Merging-PR)
|
||||
|
||||
HAPPY DEVELOPMENT! :tada:
|
||||
|
||||
@@ -54,13 +54,13 @@ Here I'm showing a terminal-only experience using Tmux (left pane Emacs, right p
|
||||
To run tests:
|
||||
|
||||
```
|
||||
make component-test
|
||||
make test-component
|
||||
```
|
||||
|
||||
Also test watcher can be launched. It will re-run the entire test suite when any file is modified
|
||||
|
||||
```
|
||||
make component-test-watch
|
||||
make test-component-watch
|
||||
```
|
||||
|
||||
Check [component tests doc](./component-tests-overview.md) for more.
|
||||
|
||||
@@ -128,3 +128,19 @@ Status-mobile uses `shadow-cljs` for hot reloading changes and uses its own [rel
|
||||
|
||||
### Solution
|
||||
Open react native's [In-App Developer Menu](https://reactnative.dev/docs/debugging#accessing-the-in-app-developer-menu) and press "Disable Fast Refresh" or "Disable Hot Reloading"
|
||||
|
||||
# App crashing after running `make run-ios`
|
||||
|
||||
### Cause
|
||||
It's possible that installing XCode from a `.xip` file might cause XCode to act funny
|
||||
Since it's not installed from the App Store, Or you might be missing a Rosetta installation.
|
||||
|
||||
[Reference/Similar issue](https://github.com/expo/expo-cli/issues/3197)
|
||||
|
||||
You might see something like this after running `make run-ios`:
|
||||
```
|
||||
Underlying error (domain=FBSOpenApplicationServiceErrorDomain, code=1):
|
||||
```
|
||||
### Solution
|
||||
Run `softwareupdate --install-rosetta --agree-to-license`
|
||||
to accept XCode's license and install Rosetta.
|
||||
|
||||
@@ -217,6 +217,7 @@ GEM
|
||||
|
||||
PLATFORMS
|
||||
arm64-darwin-22
|
||||
x86_64-darwin-22
|
||||
|
||||
DEPENDENCIES
|
||||
activesupport (>= 6.1.7.3, < 7.1.0)
|
||||
|
||||
@@ -891,7 +891,7 @@ PODS:
|
||||
- React-Core
|
||||
- react-native-image-resizer (1.2.3):
|
||||
- React
|
||||
- react-native-lottie-splash-screen (1.0.1):
|
||||
- react-native-lottie-splash-screen (1.1.2):
|
||||
- React
|
||||
- react-native-mail (6.1.1):
|
||||
- React-Core
|
||||
@@ -899,8 +899,6 @@ PODS:
|
||||
- React
|
||||
- react-native-orientation-locker (1.5.0):
|
||||
- React-Core
|
||||
- react-native-randombytes (3.6.1):
|
||||
- React-Core
|
||||
- react-native-shake (3.4.0):
|
||||
- React
|
||||
- react-native-slider (3.0.0):
|
||||
@@ -1123,12 +1121,8 @@ PODS:
|
||||
- TOCropViewController
|
||||
- RNKeychain (8.1.2):
|
||||
- React-Core
|
||||
- RNLanguages (3.0.2):
|
||||
- React
|
||||
- RNPermissions (3.8.0):
|
||||
- React-Core
|
||||
- RNReactNativeHapticFeedback (1.9.0):
|
||||
- React
|
||||
- RNReanimated (3.6.1):
|
||||
- glog
|
||||
- RCT-Folly (= 2022.05.16.00)
|
||||
@@ -1197,7 +1191,6 @@ DEPENDENCIES:
|
||||
- react-native-mail (from `../node_modules/react-native-mail`)
|
||||
- "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)"
|
||||
- react-native-orientation-locker (from `../node_modules/react-native-orientation-locker`)
|
||||
- react-native-randombytes (from `../node_modules/react-native-randombytes`)
|
||||
- react-native-shake (from `../node_modules/react-native-shake`)
|
||||
- "react-native-slider (from `../node_modules/@react-native-community/slider`)"
|
||||
- react-native-status (from `../modules/react-native-status`)
|
||||
@@ -1236,9 +1229,7 @@ DEPENDENCIES:
|
||||
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
|
||||
- RNImageCropPicker (from `../node_modules/react-native-image-crop-picker`)
|
||||
- RNKeychain (from `../node_modules/react-native-keychain`)
|
||||
- RNLanguages (from `../node_modules/react-native-languages`)
|
||||
- RNPermissions (from `../node_modules/react-native-permissions`)
|
||||
- RNReactNativeHapticFeedback (from `../node_modules/react-native-haptic-feedback`)
|
||||
- RNReanimated (from `../node_modules/react-native-reanimated`)
|
||||
- RNShare (from `../node_modules/react-native-share`)
|
||||
- RNStaticSafeAreaInsets (from `../node_modules/react-native-static-safe-area-insets`)
|
||||
@@ -1344,8 +1335,6 @@ EXTERNAL SOURCES:
|
||||
:path: "../node_modules/@react-native-community/netinfo"
|
||||
react-native-orientation-locker:
|
||||
:path: "../node_modules/react-native-orientation-locker"
|
||||
react-native-randombytes:
|
||||
:path: "../node_modules/react-native-randombytes"
|
||||
react-native-shake:
|
||||
:path: "../node_modules/react-native-shake"
|
||||
react-native-slider:
|
||||
@@ -1422,12 +1411,8 @@ EXTERNAL SOURCES:
|
||||
:path: "../node_modules/react-native-image-crop-picker"
|
||||
RNKeychain:
|
||||
:path: "../node_modules/react-native-keychain"
|
||||
RNLanguages:
|
||||
:path: "../node_modules/react-native-languages"
|
||||
RNPermissions:
|
||||
:path: "../node_modules/react-native-permissions"
|
||||
RNReactNativeHapticFeedback:
|
||||
:path: "../node_modules/react-native-haptic-feedback"
|
||||
RNReanimated:
|
||||
:path: "../node_modules/react-native-reanimated"
|
||||
RNShare:
|
||||
@@ -1459,7 +1444,7 @@ SPEC CHECKSUMS:
|
||||
FBLazyVector: 56e0e498dbb513b96c40bac6284729ba4e62672d
|
||||
FBReactNativeSpec: 146c741a3f40361f6bc13a4ba284678cbedb5881
|
||||
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
|
||||
glog: 5ce14391bd2885c921f691b0abdff44138728fac
|
||||
glog: 530710e7949eb12c82670bd09e946becf50a3c2a
|
||||
HMSegmentedControl: 34c1f54d822d8308e7b24f5d901ec674dfa31352
|
||||
Keycard: ac6df4d91525c3c82635ac24d4ddd9a80aca5fc8
|
||||
libwebp: f62cb61d0a484ba548448a4bd52aabf150ff6eef
|
||||
@@ -1494,11 +1479,10 @@ SPEC CHECKSUMS:
|
||||
react-native-config: 5330c8258265c1e5fdb8c009d2cabd6badd96727
|
||||
react-native-hole-view: 6935448993bac79f2b5a4ad7e9741094cf810679
|
||||
react-native-image-resizer: 2f1577efa3bc762597681f530c8e8d05ce0ceeb3
|
||||
react-native-lottie-splash-screen: 068688c15dd478301fda00f8d87d7fb7d5b9a93e
|
||||
react-native-lottie-splash-screen: 4e1b1fd9d6633f9cd2106d6877eb5ba0147f3e2b
|
||||
react-native-mail: 8fdcd3aef007c33a6877a18eb4cf7447a1d4ce4a
|
||||
react-native-netinfo: ddaca8bbb9e6e914b1a23787ccb879bc642931c9
|
||||
react-native-orientation-locker: 851f6510d8046ea2f14aa169b1e01fcd309a94ba
|
||||
react-native-randombytes: 421f1c7d48c0af8dbcd471b0324393ebf8fe7846
|
||||
react-native-shake: de052eaa3eadc4a326b8ddd7ac80c06e8d84528c
|
||||
react-native-slider: 12bd76d3d568c9c5500825db54123d44b48e4ad4
|
||||
react-native-status: 21f75d492fd311dc111303da38a7a2b23a8a8466
|
||||
@@ -1537,9 +1521,7 @@ SPEC CHECKSUMS:
|
||||
RNGestureHandler: 15c6ef51acba34c49ff03003806cf5dd6098f383
|
||||
RNImageCropPicker: 486e2f7e2b0461ce24321f751410dce1b3b49e6d
|
||||
RNKeychain: a65256b6ca6ba6976132cc4124b238a5b13b3d9c
|
||||
RNLanguages: 962e562af0d34ab1958d89bcfdb64fafc37c513e
|
||||
RNPermissions: 215c54462104b3925b412b0fb3c9c497b21c358b
|
||||
RNReactNativeHapticFeedback: 2566b468cc8d0e7bb2f84b23adc0f4614594d071
|
||||
RNReanimated: dee37576492f1a375017515f5c77e66e5eec696b
|
||||
RNShare: 859ff710211285676b0bcedd156c12437ea1d564
|
||||
RNStaticSafeAreaInsets: 055ddbf5e476321720457cdaeec0ff2ba40ec1b8
|
||||
@@ -1554,4 +1536,4 @@ SPEC CHECKSUMS:
|
||||
|
||||
PODFILE CHECKSUM: c9c6dfac28e31314e1a2ee2dc47364ad151f13f2
|
||||
|
||||
COCOAPODS: 1.12.0
|
||||
COCOAPODS: 1.13.0
|
||||
|
||||
@@ -8,11 +8,10 @@
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
00E356F31AD99517003FC87E /* StatusImTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* StatusImTests.m */; };
|
||||
061AC5E3D44813C6D987FC70 /* libPods-Status-StatusImPR.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C5D722CC6309CA4C8BC48244 /* libPods-Status-StatusImPR.a */; };
|
||||
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
|
||||
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
|
||||
17F5C611511E64ACE76B00A3 /* libPods-Status-StatusIm.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7AFB8653840373E5B625E16E /* libPods-Status-StatusIm.a */; };
|
||||
25DC9C9DC25846BD8D084888 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B9A886A2CB448B1ABA0EB62 /* libc++.tbd */; };
|
||||
2B6F8F28B81E862D44C8723D /* libPods-Status-StatusImPR.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 87038678EE47E8EF6E93EB54 /* libPods-Status-StatusImPR.a */; };
|
||||
3870E1E692E24133A80B07DE /* Inter-SemiBold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 693A62DB37BC4CD5A30E5C96 /* Inter-SemiBold.otf */; };
|
||||
393D26E3080B443A998F4A2F /* Inter-Italic.otf in Resources */ = {isa = PBXBuildFile; fileRef = B07176ACDAA1422E8F0A3D6B /* Inter-Italic.otf */; };
|
||||
3A2626CF245C3F2200D5F94B /* Dummy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A2626CE245C3F2200D5F94B /* Dummy.swift */; };
|
||||
@@ -37,7 +36,7 @@
|
||||
3AAD2AD324A3A60E0075D594 /* Inter-SemiBold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 693A62DB37BC4CD5A30E5C96 /* Inter-SemiBold.otf */; };
|
||||
3AAD2AD424A3A60E0075D594 /* Inter-SemiBoldItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = A4F2BBE8D4DD4140A6CCAC39 /* Inter-SemiBoldItalic.otf */; };
|
||||
3ABC7AF8245FF85900612C45 /* InterStatus-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = 9C76AF5A418D4D65A4CAD1D9 /* InterStatus-Regular.otf */; };
|
||||
536FC260A89500EC9FDB1585 /* libPods-Status-StatusIm-StatusImTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F311917BE57976CED3B9842 /* libPods-Status-StatusIm-StatusImTests.a */; };
|
||||
42AC64E4D3CA4E676400C598 /* libPods-Status-StatusIm.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D2D9E4943562065BF98E304 /* libPods-Status-StatusIm.a */; };
|
||||
57C854A7993C47A3B1AECD32 /* Inter-MediumItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = C6B1215047604CD59A4C74D6 /* Inter-MediumItalic.otf */; };
|
||||
65F6941925780A4F00A45E76 /* Bridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F6941825780A4F00A45E76 /* Bridge.swift */; };
|
||||
65F6941A25780A4F00A45E76 /* Bridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F6941825780A4F00A45E76 /* Bridge.swift */; };
|
||||
@@ -47,6 +46,7 @@
|
||||
715D8133290BE850006F5C88 /* UbuntuMono-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 715D8131290BE850006F5C88 /* UbuntuMono-Regular.ttf */; };
|
||||
74B758FC20D7C00B003343C3 /* launch-image-universal.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 74B758FB20D7C00B003343C3 /* launch-image-universal.storyboard */; };
|
||||
8391E8E0E93C41A98AAA6631 /* Inter-SemiBoldItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = A4F2BBE8D4DD4140A6CCAC39 /* Inter-SemiBoldItalic.otf */; };
|
||||
8CF1CA9463A4048F97BABB82 /* libPods-Status-StatusIm-StatusImTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 466C47BA171B53CAE0AD6A19 /* libPods-Status-StatusIm-StatusImTests.a */; };
|
||||
B24FC7FD1DE7195700D694FF /* Social.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B24FC7FC1DE7195700D694FF /* Social.framework */; };
|
||||
B24FC7FF1DE7195F00D694FF /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B24FC7FE1DE7195F00D694FF /* MessageUI.framework */; };
|
||||
B2F2D1BC1D9D531B00B7B453 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B2F2D1BB1D9D531B00B7B453 /* Images.xcassets */; };
|
||||
@@ -108,37 +108,39 @@
|
||||
00E356EE1AD99517003FC87E /* StatusImTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = StatusImTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
00E356F21AD99517003FC87E /* StatusImTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StatusImTests.m; sourceTree = "<group>"; };
|
||||
0C331FD392B615DDAD0997F5 /* Pods-Status-StatusImPR.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusImPR.release.xcconfig"; path = "Target Support Files/Pods-Status-StatusImPR/Pods-Status-StatusImPR.release.xcconfig"; sourceTree = "<group>"; };
|
||||
13B07F961A680F5B00A75B9A /* StatusIm.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = StatusIm.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = StatusIm/AppDelegate.h; sourceTree = "<group>"; };
|
||||
13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = StatusIm/AppDelegate.mm; sourceTree = "<group>"; };
|
||||
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = StatusIm/Info.plist; sourceTree = "<group>"; };
|
||||
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = StatusIm/main.m; sourceTree = "<group>"; };
|
||||
1426DF592BA248FC81D955CB /* Inter-Regular.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-Regular.otf"; path = "../resources/fonts/Inter-Regular.otf"; sourceTree = "<group>"; };
|
||||
1E0A54C37353D912620563B4 /* Pods-Status-StatusIm.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusIm.release.xcconfig"; path = "Target Support Files/Pods-Status-StatusIm/Pods-Status-StatusIm.release.xcconfig"; sourceTree = "<group>"; };
|
||||
1F311917BE57976CED3B9842 /* libPods-Status-StatusIm-StatusImTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Status-StatusIm-StatusImTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2756A97EBFF084FA94990AA5 /* Pods-Status-StatusIm-StatusImTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusIm-StatusImTests.release.xcconfig"; path = "Target Support Files/Pods-Status-StatusIm-StatusImTests/Pods-Status-StatusIm-StatusImTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
2D2D9E4943562065BF98E304 /* libPods-Status-StatusIm.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Status-StatusIm.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3A2626CE245C3F2200D5F94B /* Dummy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dummy.swift; sourceTree = "<group>"; };
|
||||
3A6406FB24A3ADF90046ED37 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
3A8F8EA924A4D31600BF206D /* GameKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameKit.framework; path = System/Library/Frameworks/GameKit.framework; sourceTree = SDKROOT; };
|
||||
3AAD2ADC24A3A60E0075D594 /* Status PR.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Status PR.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3AB1C3AD245C043900098F67 /* StatusIm-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "StatusIm-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
466C47BA171B53CAE0AD6A19 /* libPods-Status-StatusIm-StatusImTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Status-StatusIm-StatusImTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
4C16DE0B1F89508700AA10DB /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
|
||||
4E586E1B0E544F64AA9F5BD1 /* libz.tbd */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
|
||||
5AAC8D9B1AF8BB7C8AB89845 /* Pods-Status-StatusImPR.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusImPR.debug.xcconfig"; path = "Target Support Files/Pods-Status-StatusImPR/Pods-Status-StatusImPR.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
65F693BD2578002500A45E76 /* CoreNFC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreNFC.framework; path = System/Library/Frameworks/CoreNFC.framework; sourceTree = SDKROOT; };
|
||||
65F693BF2578003600A45E76 /* CoreNFC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreNFC.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/System/iOSSupport/System/Library/Frameworks/CoreNFC.framework; sourceTree = DEVELOPER_DIR; };
|
||||
65F6941725780A4E00A45E76 /* StatusImTests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "StatusImTests-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
65F6941825780A4F00A45E76 /* Bridge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Bridge.swift; sourceTree = "<group>"; };
|
||||
680C14B0F642A5F544C397B7 /* Pods-Status-StatusIm.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusIm.debug.xcconfig"; path = "Target Support Files/Pods-Status-StatusIm/Pods-Status-StatusIm.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
693A62DB37BC4CD5A30E5C96 /* Inter-SemiBold.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-SemiBold.otf"; path = "../resources/fonts/Inter-SemiBold.otf"; sourceTree = "<group>"; };
|
||||
715D8131290BE850006F5C88 /* UbuntuMono-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "UbuntuMono-Regular.ttf"; path = "../resources/fonts/UbuntuMono-Regular.ttf"; sourceTree = "<group>"; };
|
||||
74B758FB20D7C00B003343C3 /* launch-image-universal.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = "launch-image-universal.storyboard"; sourceTree = "<group>"; };
|
||||
7625793B15B3B2A8E58F6277 /* Pods-Status-StatusIm-StatusImTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusIm-StatusImTests.release.xcconfig"; path = "Target Support Files/Pods-Status-StatusIm-StatusImTests/Pods-Status-StatusIm-StatusImTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
79B38E3D4B033A711A7852FF /* Pods-Status-StatusImPR.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusImPR.release.xcconfig"; path = "Target Support Files/Pods-Status-StatusImPR/Pods-Status-StatusImPR.release.xcconfig"; sourceTree = "<group>"; };
|
||||
7AFB8653840373E5B625E16E /* libPods-Status-StatusIm.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Status-StatusIm.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
7FA4F04CE45319370F87C4FD /* Pods-Status-StatusIm.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusIm.release.xcconfig"; path = "Target Support Files/Pods-Status-StatusIm/Pods-Status-StatusIm.release.xcconfig"; sourceTree = "<group>"; };
|
||||
87038678EE47E8EF6E93EB54 /* libPods-Status-StatusImPR.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Status-StatusImPR.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
8B9A886A2CB448B1ABA0EB62 /* libc++.tbd */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
|
||||
922C4CA61F4D5F8B0033C753 /* StatusIm.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = StatusIm.entitlements; path = StatusIm/StatusIm.entitlements; sourceTree = "<group>"; };
|
||||
9C76AF5A418D4D65A4CAD1D9 /* InterStatus-Regular.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "InterStatus-Regular.otf"; path = "../resources/fonts/InterStatus-Regular.otf"; sourceTree = "<group>"; };
|
||||
9EC0135C1E06FB1900155B5C /* RCTWKWebView.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWKWebView.xcodeproj; path = "../node_modules/react-native-wkwebview-reborn/ios/RCTWKWebView.xcodeproj"; sourceTree = "<group>"; };
|
||||
A4F2BBE8D4DD4140A6CCAC39 /* Inter-SemiBoldItalic.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-SemiBoldItalic.otf"; path = "../resources/fonts/Inter-SemiBoldItalic.otf"; sourceTree = "<group>"; };
|
||||
AE3313A464E280B64599C3BA /* Pods-Status-StatusIm.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusIm.debug.xcconfig"; path = "Target Support Files/Pods-Status-StatusIm/Pods-Status-StatusIm.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
B07176ACDAA1422E8F0A3D6B /* Inter-Italic.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-Italic.otf"; path = "../resources/fonts/Inter-Italic.otf"; sourceTree = "<group>"; };
|
||||
B24FC7FC1DE7195700D694FF /* Social.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Social.framework; path = System/Library/Frameworks/Social.framework; sourceTree = SDKROOT; };
|
||||
B24FC7FE1DE7195F00D694FF /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; };
|
||||
@@ -148,12 +150,10 @@
|
||||
C14C5F8C29C0A149005C58A7 /* launch-icon@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "launch-icon@3x.png"; path = "StatusIm/launch-icon@3x.png"; sourceTree = "<group>"; };
|
||||
C14C5F9029C0AD9C005C58A7 /* launch-icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "launch-icon@2x.png"; path = "StatusIm/launch-icon@2x.png"; sourceTree = "<group>"; };
|
||||
C14C5F9229C0ADB5005C58A7 /* launch-icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "launch-icon.png"; path = "StatusIm/launch-icon.png"; sourceTree = "<group>"; };
|
||||
C5D722CC6309CA4C8BC48244 /* libPods-Status-StatusImPR.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Status-StatusImPR.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
C6B1215047604CD59A4C74D6 /* Inter-MediumItalic.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-MediumItalic.otf"; path = "../resources/fonts/Inter-MediumItalic.otf"; sourceTree = "<group>"; };
|
||||
CA58075FD8E5F9A0CA74E512 /* Pods-Status-StatusImPR.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusImPR.debug.xcconfig"; path = "Target Support Files/Pods-Status-StatusImPR/Pods-Status-StatusImPR.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
CD4A2C27D6D5473184DC1F7E /* Inter-Bold.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-Bold.otf"; path = "../resources/fonts/Inter-Bold.otf"; sourceTree = "<group>"; };
|
||||
CE4E31B21D8695250033ED64 /* Statusgo.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Statusgo.xcframework; path = "../modules/react-native-status/ios/RCTStatus/Statusgo.xcframework"; sourceTree = "<group>"; };
|
||||
D1CE733E3486B3A8B9185945 /* Pods-Status-StatusIm-StatusImTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusIm-StatusImTests.debug.xcconfig"; path = "Target Support Files/Pods-Status-StatusIm-StatusImTests/Pods-Status-StatusIm-StatusImTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
D42A8AC52E48DA4C89F20C13 /* Pods-Status-StatusIm-StatusImTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusIm-StatusImTests.debug.xcconfig"; path = "Target Support Files/Pods-Status-StatusIm-StatusImTests/Pods-Status-StatusIm-StatusImTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -161,7 +161,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
536FC260A89500EC9FDB1585 /* libPods-Status-StatusIm-StatusImTests.a in Frameworks */,
|
||||
8CF1CA9463A4048F97BABB82 /* libPods-Status-StatusIm-StatusImTests.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -174,7 +174,7 @@
|
||||
CE4E31B31D8695250033ED64 /* Statusgo.xcframework in Frameworks */,
|
||||
25DC9C9DC25846BD8D084888 /* libc++.tbd in Frameworks */,
|
||||
BA68A2377A20496EA737000D /* libz.tbd in Frameworks */,
|
||||
17F5C611511E64ACE76B00A3 /* libPods-Status-StatusIm.a in Frameworks */,
|
||||
42AC64E4D3CA4E676400C598 /* libPods-Status-StatusIm.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -188,7 +188,7 @@
|
||||
3AAD2AC224A3A60E0075D594 /* Statusgo.xcframework in Frameworks */,
|
||||
3AAD2AC524A3A60E0075D594 /* libc++.tbd in Frameworks */,
|
||||
3AAD2AC624A3A60E0075D594 /* libz.tbd in Frameworks */,
|
||||
061AC5E3D44813C6D987FC70 /* libPods-Status-StatusImPR.a in Frameworks */,
|
||||
2B6F8F28B81E862D44C8723D /* libPods-Status-StatusImPR.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -314,9 +314,9 @@
|
||||
CE4E31B21D8695250033ED64 /* Statusgo.xcframework */,
|
||||
8B9A886A2CB448B1ABA0EB62 /* libc++.tbd */,
|
||||
4E586E1B0E544F64AA9F5BD1 /* libz.tbd */,
|
||||
7AFB8653840373E5B625E16E /* libPods-Status-StatusIm.a */,
|
||||
1F311917BE57976CED3B9842 /* libPods-Status-StatusIm-StatusImTests.a */,
|
||||
C5D722CC6309CA4C8BC48244 /* libPods-Status-StatusImPR.a */,
|
||||
2D2D9E4943562065BF98E304 /* libPods-Status-StatusIm.a */,
|
||||
466C47BA171B53CAE0AD6A19 /* libPods-Status-StatusIm-StatusImTests.a */,
|
||||
87038678EE47E8EF6E93EB54 /* libPods-Status-StatusImPR.a */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
@@ -324,12 +324,12 @@
|
||||
D0D5C8D06825D33BA2D2121E /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
AE3313A464E280B64599C3BA /* Pods-Status-StatusIm.debug.xcconfig */,
|
||||
1E0A54C37353D912620563B4 /* Pods-Status-StatusIm.release.xcconfig */,
|
||||
D1CE733E3486B3A8B9185945 /* Pods-Status-StatusIm-StatusImTests.debug.xcconfig */,
|
||||
7625793B15B3B2A8E58F6277 /* Pods-Status-StatusIm-StatusImTests.release.xcconfig */,
|
||||
CA58075FD8E5F9A0CA74E512 /* Pods-Status-StatusImPR.debug.xcconfig */,
|
||||
79B38E3D4B033A711A7852FF /* Pods-Status-StatusImPR.release.xcconfig */,
|
||||
680C14B0F642A5F544C397B7 /* Pods-Status-StatusIm.debug.xcconfig */,
|
||||
7FA4F04CE45319370F87C4FD /* Pods-Status-StatusIm.release.xcconfig */,
|
||||
D42A8AC52E48DA4C89F20C13 /* Pods-Status-StatusIm-StatusImTests.debug.xcconfig */,
|
||||
2756A97EBFF084FA94990AA5 /* Pods-Status-StatusIm-StatusImTests.release.xcconfig */,
|
||||
5AAC8D9B1AF8BB7C8AB89845 /* Pods-Status-StatusImPR.debug.xcconfig */,
|
||||
0C331FD392B615DDAD0997F5 /* Pods-Status-StatusImPR.release.xcconfig */,
|
||||
);
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
@@ -341,11 +341,11 @@
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "StatusImTests" */;
|
||||
buildPhases = (
|
||||
8F717D50D3D590696A6046EB /* [CP] Check Pods Manifest.lock */,
|
||||
99EA576680D5849CA4274106 /* [CP] Check Pods Manifest.lock */,
|
||||
00E356EA1AD99517003FC87E /* Sources */,
|
||||
00E356EB1AD99517003FC87E /* Frameworks */,
|
||||
00E356EC1AD99517003FC87E /* Resources */,
|
||||
1A83906735641F17B807EB39 /* [CP] Copy Pods Resources */,
|
||||
835B3E5945D5F723935FD4E1 /* [CP] Copy Pods Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -361,14 +361,14 @@
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "StatusIm" */;
|
||||
buildPhases = (
|
||||
FD7194DC9A3E5A5277869CFC /* [CP] Check Pods Manifest.lock */,
|
||||
140572B0EA34D6F884AB6CC4 /* [CP] Check Pods Manifest.lock */,
|
||||
13B07F871A680F5B00A75B9A /* Sources */,
|
||||
13B07F8C1A680F5B00A75B9A /* Frameworks */,
|
||||
13B07F8E1A680F5B00A75B9A /* Resources */,
|
||||
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
|
||||
20B6B6891D92C42700CC5C6A /* Embed Frameworks */,
|
||||
E3914A731DF919ED00EBB515 /* Run Script */,
|
||||
88DEE6D9CF4D6BA6F6D8DCB5 /* [CP] Copy Pods Resources */,
|
||||
5BEC29A10D63DFF8AFF5B788 /* [CP] Copy Pods Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -383,14 +383,14 @@
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 3AAD2AD924A3A60E0075D594 /* Build configuration list for PBXNativeTarget "StatusImPR" */;
|
||||
buildPhases = (
|
||||
4EE2E0EC4F119397E1A6B768 /* [CP] Check Pods Manifest.lock */,
|
||||
78F85303177A5D4820A08DC1 /* [CP] Check Pods Manifest.lock */,
|
||||
3AAD2ABB24A3A60E0075D594 /* Sources */,
|
||||
3AAD2ABF24A3A60E0075D594 /* Frameworks */,
|
||||
3AAD2AC924A3A60E0075D594 /* Resources */,
|
||||
3AAD2AD524A3A60E0075D594 /* Bundle React Native code and images */,
|
||||
3AAD2AD624A3A60E0075D594 /* Embed Frameworks */,
|
||||
3AAD2AD724A3A60E0075D594 /* Run Script */,
|
||||
1B5C687FDBFFB60FD1043432 /* [CP] Copy Pods Resources */,
|
||||
776D3E96946780BFE216ACF2 /* [CP] Copy Pods Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -542,81 +542,9 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = "/usr/bin/env sh";
|
||||
shellScript = "set -o errexit\nexport NODE_BINARY=\"${NODE_BINARY:-node}\"\nexport NODE_ARGS=\"${NODE_ARGS:- --max-old-space-size=16384 }\"\n\nbash -x ../node_modules/react-native/scripts/react-native-xcode.sh > ../logs/react-native-xcode.log 2>&1";
|
||||
shellScript = "set -o errexit\nexport NODE_BINARY=\"${NODE_BINARY:-node}\"\nexport NODE_ARGS=\"${NODE_ARGS:- --max-old-space-size=16384 }\"\n\n\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n";
|
||||
};
|
||||
1A83906735641F17B807EB39 /* [CP] Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Status-StatusIm-StatusImTests/Pods-Status-StatusIm-StatusImTests-resources.sh",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker/QBImagePicker.bundle",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/TOCropViewController/TOCropViewControllerBundle.bundle",
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/QBImagePicker.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TOCropViewControllerBundle.bundle",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Status-StatusIm-StatusImTests/Pods-Status-StatusIm-StatusImTests-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
1B5C687FDBFFB60FD1043432 /* [CP] Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Status-StatusImPR/Pods-Status-StatusImPR-resources.sh",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker/QBImagePicker.bundle",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/TOCropViewController/TOCropViewControllerBundle.bundle",
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/QBImagePicker.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TOCropViewControllerBundle.bundle",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Status-StatusImPR/Pods-Status-StatusImPR-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
3AAD2AD524A3A60E0075D594 /* Bundle React Native code and images */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Bundle React Native code and images";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = "/usr/bin/env sh";
|
||||
shellScript = "set -o errexit\nexport NODE_BINARY=\"${NODE_BINARY:-node}\"\nexport NODE_ARGS=\"${NODE_ARGS:- --max-old-space-size=16384 }\"\n\nbash -x ../node_modules/react-native/scripts/react-native-xcode.sh > ../logs/react-native-xcode.log 2>&1";
|
||||
};
|
||||
3AAD2AD724A3A60E0075D594 /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 8;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 1;
|
||||
shellPath = "/usr/bin/env sh";
|
||||
shellScript = "\"${PROJECT_DIR}/scripts/set_xcode_version.sh\" > ../logs/set_xcode_version.log 2>&1";
|
||||
};
|
||||
4EE2E0EC4F119397E1A6B768 /* [CP] Check Pods Manifest.lock */ = {
|
||||
140572B0EA34D6F884AB6CC4 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
@@ -631,14 +559,42 @@
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-Status-StatusImPR-checkManifestLockResult.txt",
|
||||
"$(DERIVED_FILE_DIR)/Pods-Status-StatusIm-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
88DEE6D9CF4D6BA6F6D8DCB5 /* [CP] Copy Pods Resources */ = {
|
||||
3AAD2AD524A3A60E0075D594 /* Bundle React Native code and images */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Bundle React Native code and images";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = "/usr/bin/env sh";
|
||||
shellScript = "set -o errexit\nexport NODE_BINARY=\"${NODE_BINARY:-node}\"\nexport NODE_ARGS=\"${NODE_ARGS:- --max-old-space-size=16384 }\"\n\n\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n";
|
||||
};
|
||||
3AAD2AD724A3A60E0075D594 /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 8;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 1;
|
||||
shellPath = "/usr/bin/env sh";
|
||||
shellScript = "\"${PROJECT_DIR}/scripts/set_xcode_version.sh\" > ../logs/set_xcode_version.log 2>&1\n";
|
||||
};
|
||||
5BEC29A10D63DFF8AFF5B788 /* [CP] Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
@@ -660,7 +616,73 @@
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Status-StatusIm/Pods-Status-StatusIm-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
8F717D50D3D590696A6046EB /* [CP] Check Pods Manifest.lock */ = {
|
||||
776D3E96946780BFE216ACF2 /* [CP] Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Status-StatusImPR/Pods-Status-StatusImPR-resources.sh",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker/QBImagePicker.bundle",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/TOCropViewController/TOCropViewControllerBundle.bundle",
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/QBImagePicker.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TOCropViewControllerBundle.bundle",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Status-StatusImPR/Pods-Status-StatusImPR-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
78F85303177A5D4820A08DC1 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-Status-StatusImPR-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
835B3E5945D5F723935FD4E1 /* [CP] Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Status-StatusIm-StatusImTests/Pods-Status-StatusIm-StatusImTests-resources.sh",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker/QBImagePicker.bundle",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/TOCropViewController/TOCropViewControllerBundle.bundle",
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/QBImagePicker.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TOCropViewControllerBundle.bundle",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Status-StatusIm-StatusImTests/Pods-Status-StatusIm-StatusImTests-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
99EA576680D5849CA4274106 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
@@ -694,29 +716,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 1;
|
||||
shellPath = "/usr/bin/env sh";
|
||||
shellScript = "\"${PROJECT_DIR}/scripts/set_xcode_version.sh\" > ../logs/set_xcode_version.log 2>&1";
|
||||
};
|
||||
FD7194DC9A3E5A5277869CFC /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-Status-StatusIm-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
shellScript = "\"${PROJECT_DIR}/scripts/set_xcode_version.sh\" > ../logs/set_xcode_version.log 2>&1\n";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
@@ -765,7 +765,7 @@
|
||||
/* Begin XCBuildConfiguration section */
|
||||
00E356F61AD99517003FC87E /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = D1CE733E3486B3A8B9185945 /* Pods-Status-StatusIm-StatusImTests.debug.xcconfig */;
|
||||
baseConfigurationReference = D42A8AC52E48DA4C89F20C13 /* Pods-Status-StatusIm-StatusImTests.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
BUNDLE_ID_SUFFIX = .debug;
|
||||
@@ -795,14 +795,14 @@
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "StatusImTests-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
SWIFT_VERSION = 5.2;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/StatusIm.app/StatusIm";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
00E356F71AD99517003FC87E /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7625793B15B3B2A8E58F6277 /* Pods-Status-StatusIm-StatusImTests.release.xcconfig */;
|
||||
baseConfigurationReference = 2756A97EBFF084FA94990AA5 /* Pods-Status-StatusIm-StatusImTests.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
BUNDLE_ID_SUFFIX = "";
|
||||
@@ -828,14 +828,14 @@
|
||||
PROVISIONING_PROFILE = "";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "StatusImTests-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
SWIFT_VERSION = 5.2;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/StatusIm.app/StatusIm";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
13B07F941A680F5B00A75B9A /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = AE3313A464E280B64599C3BA /* Pods-Status-StatusIm.debug.xcconfig */;
|
||||
baseConfigurationReference = 680C14B0F642A5F544C397B7 /* Pods-Status-StatusIm.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon$(BUNDLE_ID_SUFFIX)";
|
||||
BUNDLE_ID_SUFFIX = .debug;
|
||||
@@ -901,14 +901,14 @@
|
||||
"$(inherited)",
|
||||
"-lc++",
|
||||
"-ObjC",
|
||||
"-lresolv",
|
||||
);
|
||||
PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = im.status.ethereum;
|
||||
PRODUCT_NAME = StatusIm;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "StatusIm-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
SWIFT_VERSION = 5.2;
|
||||
TARGETED_DEVICE_FAMILY = 1;
|
||||
VALID_ARCHS = "x86_64 arm64";
|
||||
"VALID_ARCHS[sdk=iphonesimulator*]" = "x86_64 ";
|
||||
@@ -917,7 +917,7 @@
|
||||
};
|
||||
13B07F951A680F5B00A75B9A /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 1E0A54C37353D912620563B4 /* Pods-Status-StatusIm.release.xcconfig */;
|
||||
baseConfigurationReference = 7FA4F04CE45319370F87C4FD /* Pods-Status-StatusIm.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon$(BUNDLE_ID_SUFFIX)";
|
||||
BUNDLE_ID_SUFFIX = "";
|
||||
@@ -977,14 +977,14 @@
|
||||
"$(inherited)",
|
||||
"-lc++",
|
||||
"-ObjC",
|
||||
"-lresolv",
|
||||
);
|
||||
PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = im.status.ethereum;
|
||||
PRODUCT_NAME = StatusIm;
|
||||
PROVISIONING_PROFILE = "e2202b12-7a66-4ff7-af3c-a52e35f32dc1";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "match AdHoc im.status.ethereum";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "StatusIm-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
SWIFT_VERSION = 5.2;
|
||||
TARGETED_DEVICE_FAMILY = 1;
|
||||
VALID_ARCHS = arm64;
|
||||
};
|
||||
@@ -992,7 +992,7 @@
|
||||
};
|
||||
3AAD2ADA24A3A60E0075D594 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = CA58075FD8E5F9A0CA74E512 /* Pods-Status-StatusImPR.debug.xcconfig */;
|
||||
baseConfigurationReference = 5AAC8D9B1AF8BB7C8AB89845 /* Pods-Status-StatusImPR.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon$(BUNDLE_ID_SUFFIX)";
|
||||
BUNDLE_ID_SUFFIX = .debug;
|
||||
@@ -1057,13 +1057,14 @@
|
||||
"$(inherited)",
|
||||
"-lc++",
|
||||
"-ObjC",
|
||||
"-lresolv",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = im.status.ethereum.pr;
|
||||
PRODUCT_NAME = "Status PR";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "match Development im.status.ethereum.pr";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "StatusIm-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
SWIFT_VERSION = 5.2;
|
||||
TARGETED_DEVICE_FAMILY = 1;
|
||||
VALID_ARCHS = arm64;
|
||||
};
|
||||
@@ -1071,7 +1072,7 @@
|
||||
};
|
||||
3AAD2ADB24A3A60E0075D594 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 79B38E3D4B033A711A7852FF /* Pods-Status-StatusImPR.release.xcconfig */;
|
||||
baseConfigurationReference = 0C331FD392B615DDAD0997F5 /* Pods-Status-StatusImPR.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIconPR$(BUNDLE_ID_SUFFIX)";
|
||||
BUNDLE_ID_SUFFIX = "";
|
||||
@@ -1130,12 +1131,13 @@
|
||||
"$(inherited)",
|
||||
"-lc++",
|
||||
"-ObjC",
|
||||
"-lresolv",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = im.status.ethereum.pr;
|
||||
PRODUCT_NAME = "Status PR";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "match AdHoc im.status.ethereum.pr";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "StatusIm-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
SWIFT_VERSION = 5.2;
|
||||
TARGETED_DEVICE_FAMILY = 1;
|
||||
VALID_ARCHS = arm64;
|
||||
};
|
||||
@@ -1174,6 +1176,7 @@
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEVELOPMENT_TEAM = 8B5X2M6H2Y;
|
||||
ENABLE_BITCODE = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
@@ -1228,7 +1231,6 @@
|
||||
"-DFOLLY_CFG_NO_COROUTINES=1",
|
||||
);
|
||||
OTHER_LDFLAGS = "$(inherited)";
|
||||
PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES;
|
||||
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
|
||||
SDKROOT = iphoneos;
|
||||
USE_HERMES = false;
|
||||
@@ -1270,6 +1272,7 @@
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEVELOPMENT_TEAM = 8B5X2M6H2Y;
|
||||
ENABLE_BITCODE = NO;
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
@@ -1315,7 +1318,6 @@
|
||||
"-DFOLLY_CFG_NO_COROUTINES=1",
|
||||
);
|
||||
OTHER_LDFLAGS = "$(inherited)";
|
||||
PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES;
|
||||
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
|
||||
SDKROOT = iphoneos;
|
||||
USE_HERMES = false;
|
||||
|
||||
@@ -22,6 +22,8 @@ This directory is the destination of logs created during build time of debug bui
|
||||
These log files are uploaded to Jenkins as CI job artifacts on failure using `archiveArtifacts`.
|
||||
|
||||
* `react-native-xcode.log` - Output from `node_modules/react-native/scripts/react-native-xcode.sh`.
|
||||
- Created by redirecting output of `shellScript` in `ios/StatusIm.xcodeproj/project.pbxproj`.
|
||||
- Created by redirecting output of `shellScript` in `ios/StatusIm.xcodeproj/project.pbxproj` for "Bundle React Native code and images" build Phase.
|
||||
* `set_xcode_version.log` - Output from `node_modules/react-native/scripts/react-native-xcode.sh`.
|
||||
- Created by redirecting output of `shellScript` in `ios/StatusIm.xcodeproj/project.pbxproj` for "Run Script" build Phase.
|
||||
* `Status PR-StatusImPR.log - Created by [Fastlane Gym](https://docs.fastlane.tools/actions/gym/).
|
||||
- Configred via [`Fastfile`](../Fastfile) using `buildlog_path` argument for `build_ios_app`.
|
||||
|
||||
@@ -1,355 +0,0 @@
|
||||
package im.status.ethereum.module;
|
||||
|
||||
import com.facebook.react.bridge.Callback;
|
||||
import com.facebook.react.bridge.ReactMethod;
|
||||
import com.facebook.react.bridge.ReactApplicationContext;
|
||||
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
||||
import statusgo.Statusgo;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.IOException;
|
||||
import org.json.JSONObject;
|
||||
import org.json.JSONException;
|
||||
import android.util.Log;
|
||||
import android.content.Context;
|
||||
import android.app.Activity;
|
||||
|
||||
public class AccountManager extends ReactContextBaseJavaModule {
|
||||
private static final String TAG = "AccountManager";
|
||||
private static final String gethLogFileName = "geth.log";
|
||||
private ReactApplicationContext reactContext;
|
||||
|
||||
private Utils utils;
|
||||
private LogManager logManager;
|
||||
|
||||
public AccountManager(ReactApplicationContext reactContext) {
|
||||
super(reactContext);
|
||||
this.reactContext = reactContext;
|
||||
this.utils = new Utils(reactContext);
|
||||
this.logManager = new LogManager(reactContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "AccountManager";
|
||||
}
|
||||
|
||||
private String getTestnetDataDir(final String absRootDirPath) {
|
||||
return this.utils.pathCombine(absRootDirPath, "ethereum/testnet");
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void createAccountAndLogin(final String createAccountRequest) {
|
||||
Log.d(TAG, "createAccountAndLogin");
|
||||
String result = Statusgo.createAccountAndLogin(createAccountRequest);
|
||||
if (result.startsWith("{\"error\":\"\"")) {
|
||||
Log.d(TAG, "createAccountAndLogin success: " + result);
|
||||
Log.d(TAG, "Geth node started");
|
||||
} else {
|
||||
Log.e(TAG, "createAccountAndLogin failed: " + result);
|
||||
}
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void restoreAccountAndLogin(final String restoreAccountRequest) {
|
||||
Log.d(TAG, "restoreAccountAndLogin");
|
||||
String result = Statusgo.restoreAccountAndLogin(restoreAccountRequest);
|
||||
if (result.startsWith("{\"error\":\"\"")) {
|
||||
Log.d(TAG, "restoreAccountAndLogin success: " + result);
|
||||
Log.d(TAG, "Geth node started");
|
||||
} else {
|
||||
Log.e(TAG, "restoreAccountAndLogin failed: " + result);
|
||||
}
|
||||
}
|
||||
|
||||
private String updateConfig(final String jsonConfigString, final String absRootDirPath, final String keystoreDirPath) throws JSONException {
|
||||
final JSONObject jsonConfig = new JSONObject(jsonConfigString);
|
||||
// retrieve parameters from app config, that will be applied onto the Go-side config later on
|
||||
final String dataDirPath = jsonConfig.getString("DataDir");
|
||||
final Boolean logEnabled = jsonConfig.getBoolean("LogEnabled");
|
||||
final Context context = this.getReactApplicationContext();
|
||||
final File gethLogFile = logEnabled ? this.logManager.prepareLogsFile(context) : null;
|
||||
String gethLogDirPath = null;
|
||||
if (gethLogFile != null) {
|
||||
gethLogDirPath = gethLogFile.getParent();
|
||||
}
|
||||
|
||||
Log.d(TAG, "log dir: " + gethLogDirPath + " log name: " + gethLogFileName);
|
||||
|
||||
jsonConfig.put("DataDir", dataDirPath);
|
||||
jsonConfig.put("KeyStoreDir", keystoreDirPath);
|
||||
jsonConfig.put("LogDir", gethLogDirPath);
|
||||
jsonConfig.put("LogFile", gethLogFileName);
|
||||
|
||||
return jsonConfig.toString();
|
||||
}
|
||||
|
||||
private static void prettyPrintConfig(final String config) {
|
||||
Log.d(TAG, "startNode() with config (see below)");
|
||||
String configOutput = config;
|
||||
final int maxOutputLen = 4000;
|
||||
Log.d(TAG, "********************** NODE CONFIG ****************************");
|
||||
while (!configOutput.isEmpty()) {
|
||||
Log.d(TAG, "Node config:" + configOutput.substring(0, Math.min(maxOutputLen, configOutput.length())));
|
||||
if (configOutput.length() > maxOutputLen) {
|
||||
configOutput = configOutput.substring(maxOutputLen);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
Log.d(TAG, "******************* ENDOF NODE CONFIG *************************");
|
||||
}
|
||||
|
||||
private void copyDirectory(File sourceLocation, File targetLocation) throws IOException {
|
||||
if (sourceLocation.isDirectory()) {
|
||||
if (!targetLocation.exists() && !targetLocation.mkdirs()) {
|
||||
throw new IOException("Cannot create dir " + targetLocation.getAbsolutePath());
|
||||
}
|
||||
|
||||
String[] children = sourceLocation.list();
|
||||
for (int i = 0; i < children.length; i++) {
|
||||
copyDirectory(new File(sourceLocation, children[i]), new File(targetLocation, children[i]));
|
||||
}
|
||||
} else {
|
||||
File directory = targetLocation.getParentFile();
|
||||
if (directory != null && !directory.exists() && !directory.mkdirs()) {
|
||||
throw new IOException("Cannot create dir " + directory.getAbsolutePath());
|
||||
}
|
||||
|
||||
InputStream in = new FileInputStream(sourceLocation);
|
||||
OutputStream out = new FileOutputStream(targetLocation);
|
||||
|
||||
byte[] buf = new byte[1024];
|
||||
int len;
|
||||
while ((len = in.read(buf)) > 0) {
|
||||
out.write(buf, 0, len);
|
||||
}
|
||||
in.close();
|
||||
out.close();
|
||||
}
|
||||
}
|
||||
|
||||
private String prepareDirAndUpdateConfig(final String jsonConfigString, final String keyUID) {
|
||||
|
||||
final String absRootDirPath = this.utils.getNoBackupDirectory();
|
||||
final String dataFolder = this.getTestnetDataDir(absRootDirPath);
|
||||
Log.d(TAG, "Starting Geth node in folder: " + dataFolder);
|
||||
|
||||
try {
|
||||
final File newFile = new File(dataFolder);
|
||||
// todo handle error?
|
||||
newFile.mkdir();
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "error making folder: " + dataFolder, e);
|
||||
}
|
||||
|
||||
final String ropstenFlagPath = this.utils.pathCombine(absRootDirPath, "ropsten_flag");
|
||||
final File ropstenFlag = new File(ropstenFlagPath);
|
||||
if (!ropstenFlag.exists()) {
|
||||
try {
|
||||
final String chaindDataFolderPath = this.utils.pathCombine(dataFolder, "StatusIM/lightchaindata");
|
||||
final File lightChainFolder = new File(chaindDataFolderPath);
|
||||
if (lightChainFolder.isDirectory()) {
|
||||
String[] children = lightChainFolder.list();
|
||||
for (int i = 0; i < children.length; i++) {
|
||||
new File(lightChainFolder, children[i]).delete();
|
||||
}
|
||||
}
|
||||
lightChainFolder.delete();
|
||||
ropstenFlag.createNewFile();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
String testnetDataDir = dataFolder;
|
||||
String oldKeystoreDir = this.utils.pathCombine(testnetDataDir, "keystore");
|
||||
String newKeystoreDir = this.utils.pathCombine(absRootDirPath, "keystore");
|
||||
final File oldKeystore = new File(oldKeystoreDir);
|
||||
if (oldKeystore.exists()) {
|
||||
try {
|
||||
final File newKeystore = new File(newKeystoreDir);
|
||||
copyDirectory(oldKeystore, newKeystore);
|
||||
|
||||
if (oldKeystore.isDirectory()) {
|
||||
String[] children = oldKeystore.list();
|
||||
for (int i = 0; i < children.length; i++) {
|
||||
new File(oldKeystoreDir, children[i]).delete();
|
||||
}
|
||||
}
|
||||
oldKeystore.delete();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
final String multiaccountKeystoreDir = this.utils.pathCombine("/keystore", keyUID);
|
||||
final String updatedJsonConfigString = this.updateConfig(jsonConfigString, absRootDirPath, multiaccountKeystoreDir);
|
||||
|
||||
prettyPrintConfig(updatedJsonConfigString);
|
||||
|
||||
return updatedJsonConfigString;
|
||||
} catch (JSONException e) {
|
||||
Log.e(TAG, "updateConfig failed: " + e.getMessage());
|
||||
System.exit(1);
|
||||
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void prepareDirAndUpdateConfig(final String keyUID, final String config, final Callback callback) {
|
||||
Log.d(TAG, "prepareDirAndUpdateConfig");
|
||||
String finalConfig = prepareDirAndUpdateConfig(config, keyUID);
|
||||
callback.invoke(finalConfig);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void saveAccountAndLoginWithKeycard(final String multiaccountData, final String password, final String settings, final String config, final String accountsData, final String chatKey) {
|
||||
try {
|
||||
Log.d(TAG, "saveAccountAndLoginWithKeycard");
|
||||
String finalConfig = prepareDirAndUpdateConfig(config, this.utils.getKeyUID(multiaccountData));
|
||||
String result = Statusgo.saveAccountAndLoginWithKeycard(multiaccountData, password, settings, finalConfig, accountsData, chatKey);
|
||||
if (result.startsWith("{\"error\":\"\"")) {
|
||||
Log.d(TAG, "saveAccountAndLoginWithKeycard result: " + result);
|
||||
Log.d(TAG, "Geth node started");
|
||||
} else {
|
||||
Log.e(TAG, "saveAccountAndLoginWithKeycard failed: " + result);
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
Log.e(TAG, "JSON conversion failed: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void loginWithKeycard(final String accountData, final String password, final String chatKey, final String nodeConfigJSON) {
|
||||
Log.d(TAG, "loginWithKeycard");
|
||||
this.utils.migrateKeyStoreDir(accountData, password);
|
||||
String result = Statusgo.loginWithKeycard(accountData, password, chatKey, nodeConfigJSON);
|
||||
if (result.startsWith("{\"error\":\"\"")) {
|
||||
Log.d(TAG, "LoginWithKeycard result: " + result);
|
||||
} else {
|
||||
Log.e(TAG, "LoginWithKeycard failed: " + result);
|
||||
}
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void loginWithConfig(final String accountData, final String password, final String configJSON) {
|
||||
Log.d(TAG, "loginWithConfig");
|
||||
this.utils.migrateKeyStoreDir(accountData, password);
|
||||
String result = Statusgo.loginWithConfig(accountData, password, configJSON);
|
||||
if (result.startsWith("{\"error\":\"\"")) {
|
||||
Log.d(TAG, "LoginWithConfig result: " + result);
|
||||
} else {
|
||||
Log.e(TAG, "LoginWithConfig failed: " + result);
|
||||
}
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void loginAccount(final String request) {
|
||||
Log.d(TAG, "loginAccount");
|
||||
String result = Statusgo.loginAccount(request);
|
||||
if (result.startsWith("{\"error\":\"\"")) {
|
||||
Log.d(TAG, "loginAccount result: " + result);
|
||||
} else {
|
||||
Log.e(TAG, "loginAccount failed: " + result);
|
||||
}
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void verify(final String address, final String password, final Callback callback) throws JSONException {
|
||||
Activity currentActivity = getCurrentActivity();
|
||||
|
||||
final String absRootDirPath = this.utils.getNoBackupDirectory();
|
||||
final String newKeystoreDir = this.utils.pathCombine(absRootDirPath, "keystore");
|
||||
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.verifyAccountPassword(newKeystoreDir, address, password), callback);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void verifyDatabasePassword(final String keyUID, final String password, final Callback callback) throws JSONException {
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.verifyDatabasePassword(keyUID, password), callback);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
private void openAccounts(final Callback callback) throws JSONException {
|
||||
Log.d(TAG, "openAccounts");
|
||||
final String rootDir = this.utils.getNoBackupDirectory();
|
||||
Log.d(TAG, "[Opening accounts" + rootDir);
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.openAccounts(rootDir), callback);
|
||||
}
|
||||
|
||||
//TODO : refactor logout usage to accept callback so that we can do this.utils.executeRunnableStatusGoMethod
|
||||
@ReactMethod
|
||||
public void logout() {
|
||||
Log.d(TAG, "logout");
|
||||
Runnable r = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
String result = Statusgo.logout();
|
||||
if (result.startsWith("{\"error\":\"\"")) {
|
||||
Log.d(TAG, "Logout result: " + result);
|
||||
} else {
|
||||
Log.e(TAG, "Logout failed: " + result);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
StatusThreadPoolExecutor.getInstance().execute(r);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void multiAccountStoreAccount(final String json, final Callback callback) throws JSONException {
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.multiAccountStoreAccount(json), callback);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void multiAccountLoadAccount(final String json, final Callback callback) throws JSONException {
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.multiAccountLoadAccount(json), callback);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void multiAccountDeriveAddresses(final String json, final Callback callback) throws JSONException {
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.multiAccountDeriveAddresses(json), callback);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void multiAccountGenerateAndDeriveAddresses(final String json, final Callback callback) throws JSONException {
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.multiAccountGenerateAndDeriveAddresses(json), callback);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void multiAccountStoreDerived(final String json, final Callback callback) throws JSONException {
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.multiAccountStoreDerivedAccounts(json), callback);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void multiAccountImportMnemonic(final String json, final Callback callback) throws JSONException {
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.multiAccountImportMnemonic(json), callback);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void multiAccountImportPrivateKey(final String json, final Callback callback) throws JSONException {
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.multiAccountImportPrivateKey(json), callback);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void deleteMultiaccount(final String keyUID, final Callback callback) throws JSONException {
|
||||
final String keyStoreDir = this.utils.getKeyStorePath(keyUID);
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.deleteMultiaccount(keyUID, keyStoreDir), callback);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void getRandomMnemonic(final Callback callback) throws JSONException {
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.getRandomMnemonic(), callback);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void createAccountFromMnemonicAndDeriveAccountsForPaths(final String mnemonic, final Callback callback) throws JSONException {
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.createAccountFromMnemonicAndDeriveAccountsForPaths(mnemonic), callback);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,333 @@
|
||||
package im.status.ethereum.module
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import com.facebook.react.bridge.Callback
|
||||
import com.facebook.react.bridge.ReactApplicationContext
|
||||
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
||||
import com.facebook.react.bridge.ReactMethod
|
||||
import org.json.JSONException
|
||||
import org.json.JSONObject
|
||||
import statusgo.Statusgo
|
||||
import java.io.*
|
||||
|
||||
class AccountManager(private val reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {
|
||||
|
||||
private val utils = Utils(reactContext)
|
||||
private val logManager = LogManager(reactContext)
|
||||
|
||||
override fun getName() = "AccountManager"
|
||||
|
||||
private fun getTestnetDataDir(absRootDirPath: String) = utils.pathCombine(absRootDirPath, "ethereum/testnet")
|
||||
|
||||
@ReactMethod
|
||||
fun createAccountAndLogin(createAccountRequest: String) {
|
||||
Log.d(TAG, "createAccountAndLogin")
|
||||
val result = Statusgo.createAccountAndLogin(createAccountRequest)
|
||||
if (result.startsWith("{\"error\":\"\"")) {
|
||||
Log.d(TAG, "createAccountAndLogin success: $result")
|
||||
Log.d(TAG, "Geth node started")
|
||||
} else {
|
||||
Log.e(TAG, "createAccountAndLogin failed: $result")
|
||||
}
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun restoreAccountAndLogin(restoreAccountRequest: String) {
|
||||
Log.d(TAG, "restoreAccountAndLogin")
|
||||
val result = Statusgo.restoreAccountAndLogin(restoreAccountRequest)
|
||||
if (result.startsWith("{\"error\":\"\"")) {
|
||||
Log.d(TAG, "restoreAccountAndLogin success: $result")
|
||||
Log.d(TAG, "Geth node started")
|
||||
} else {
|
||||
Log.e(TAG, "restoreAccountAndLogin failed: $result")
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateConfig(jsonConfigString: String, absRootDirPath: String, keystoreDirPath: String): String {
|
||||
val jsonConfig = JSONObject(jsonConfigString)
|
||||
val dataDirPath = jsonConfig.getString("DataDir")
|
||||
val logEnabled = jsonConfig.getBoolean("LogEnabled")
|
||||
val gethLogFile = if (logEnabled) logManager.prepareLogsFile(reactContext) else null
|
||||
val gethLogDirPath = gethLogFile?.parent
|
||||
|
||||
Log.d(TAG, "log dir: $gethLogDirPath log name: $gethLogFileName")
|
||||
|
||||
jsonConfig.put("DataDir", dataDirPath)
|
||||
jsonConfig.put("KeyStoreDir", keystoreDirPath)
|
||||
jsonConfig.put("LogDir", gethLogDirPath)
|
||||
jsonConfig.put("LogFile", gethLogFileName)
|
||||
|
||||
return jsonConfig.toString()
|
||||
}
|
||||
|
||||
private fun copyDirectory(sourceLocation: File, targetLocation: File) {
|
||||
if (sourceLocation.isDirectory) {
|
||||
if (!targetLocation.exists() && !targetLocation.mkdirs()) {
|
||||
throw IOException("Cannot create dir ${targetLocation.absolutePath}")
|
||||
}
|
||||
|
||||
val children = sourceLocation.list()
|
||||
children?.forEach { child ->
|
||||
copyDirectory(File(sourceLocation, child), File(targetLocation, child))
|
||||
}
|
||||
} else {
|
||||
val directory = targetLocation.parentFile
|
||||
if (directory != null && !directory.exists() && !directory.mkdirs()) {
|
||||
throw IOException("Cannot create dir ${directory.absolutePath}")
|
||||
}
|
||||
|
||||
sourceLocation.inputStream().use { input ->
|
||||
targetLocation.outputStream().use { output ->
|
||||
input.copyTo(output)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun prepareDirAndUpdateConfig(jsonConfigString: String, keyUID: String): String {
|
||||
val absRootDirPath = utils.getNoBackupDirectory()
|
||||
val dataFolder = getTestnetDataDir(absRootDirPath)
|
||||
Log.d(TAG, "Starting Geth node in folder: $dataFolder")
|
||||
|
||||
try {
|
||||
File(dataFolder).mkdir()
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "error making folder: $dataFolder", e)
|
||||
}
|
||||
|
||||
val ropstenFlagPath = utils.pathCombine(absRootDirPath, "ropsten_flag")
|
||||
val ropstenFlag = File(ropstenFlagPath)
|
||||
if (!ropstenFlag.exists()) {
|
||||
try {
|
||||
val chaindDataFolderPath = utils.pathCombine(dataFolder, "StatusIM/lightchaindata")
|
||||
val lightChainFolder = File(chaindDataFolderPath)
|
||||
if (lightChainFolder.isDirectory) {
|
||||
lightChainFolder.listFiles()?.forEach { it.delete() }
|
||||
}
|
||||
lightChainFolder.delete()
|
||||
ropstenFlag.createNewFile()
|
||||
} catch (e: IOException) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
val testnetDataDir = dataFolder
|
||||
val oldKeystoreDir = utils.pathCombine(testnetDataDir, "keystore")
|
||||
val newKeystoreDir = utils.pathCombine(absRootDirPath, "keystore")
|
||||
val oldKeystore = File(oldKeystoreDir)
|
||||
if (oldKeystore.exists()) {
|
||||
try {
|
||||
val newKeystore = File(newKeystoreDir)
|
||||
copyDirectory(oldKeystore, newKeystore)
|
||||
|
||||
if (oldKeystore.isDirectory) {
|
||||
oldKeystore.listFiles()?.forEach { it.delete() }
|
||||
}
|
||||
oldKeystore.delete()
|
||||
} catch (e: IOException) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
return try {
|
||||
val multiaccountKeystoreDir = utils.pathCombine("/keystore", keyUID)
|
||||
val updatedJsonConfigString = updateConfig(jsonConfigString, absRootDirPath, multiaccountKeystoreDir)
|
||||
|
||||
prettyPrintConfig(updatedJsonConfigString)
|
||||
|
||||
updatedJsonConfigString
|
||||
} catch (e: JSONException) {
|
||||
Log.e(TAG, "updateConfig failed: ${e.message}")
|
||||
System.exit(1)
|
||||
""
|
||||
}
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun prepareDirAndUpdateConfig(keyUID: String, config: String, callback: Callback) {
|
||||
Log.d(TAG, "prepareDirAndUpdateConfig")
|
||||
val finalConfig = prepareDirAndUpdateConfig(config, keyUID)
|
||||
callback.invoke(finalConfig)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun saveAccountAndLoginWithKeycard(
|
||||
multiaccountData: String,
|
||||
password: String,
|
||||
settings: String,
|
||||
config: String,
|
||||
accountsData: String,
|
||||
chatKey: String
|
||||
) {
|
||||
try {
|
||||
Log.d(TAG, "saveAccountAndLoginWithKeycard")
|
||||
val keyUID = utils.getKeyUID(multiaccountData)
|
||||
val finalConfig = prepareDirAndUpdateConfig(config, keyUID)
|
||||
val result = Statusgo.saveAccountAndLoginWithKeycard(
|
||||
multiaccountData,
|
||||
password,
|
||||
settings,
|
||||
finalConfig,
|
||||
accountsData,
|
||||
chatKey
|
||||
)
|
||||
if (result.startsWith("{\"error\":\"\"")) {
|
||||
Log.d(TAG, "saveAccountAndLoginWithKeycard result: $result")
|
||||
Log.d(TAG, "Geth node started")
|
||||
} else {
|
||||
Log.e(TAG, "saveAccountAndLoginWithKeycard failed: $result")
|
||||
}
|
||||
} catch (e: JSONException) {
|
||||
Log.e(TAG, "JSON conversion failed: ${e.message}")
|
||||
}
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun loginWithKeycard(accountData: String, password: String, chatKey: String, nodeConfigJSON: String) {
|
||||
Log.d(TAG, "loginWithKeycard")
|
||||
utils.migrateKeyStoreDir(accountData, password)
|
||||
val result = Statusgo.loginWithKeycard(accountData, password, chatKey, nodeConfigJSON)
|
||||
if (result.startsWith("{\"error\":\"\"")) {
|
||||
Log.d(TAG, "LoginWithKeycard result: $result")
|
||||
} else {
|
||||
Log.e(TAG, "LoginWithKeycard failed: $result")
|
||||
}
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun loginWithConfig(accountData: String, password: String, configJSON: String) {
|
||||
Log.d(TAG, "loginWithConfig")
|
||||
utils.migrateKeyStoreDir(accountData, password)
|
||||
val result = Statusgo.loginWithConfig(accountData, password, configJSON)
|
||||
if (result.startsWith("{\"error\":\"\"")) {
|
||||
Log.d(TAG, "LoginWithConfig result: $result")
|
||||
} else {
|
||||
Log.e(TAG, "LoginWithConfig failed: $result")
|
||||
}
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun loginAccount(request: String) {
|
||||
Log.d(TAG, "loginAccount")
|
||||
val result = Statusgo.loginAccount(request)
|
||||
if (result.startsWith("{\"error\":\"\"")) {
|
||||
Log.d(TAG, "loginAccount result: $result")
|
||||
} else {
|
||||
Log.e(TAG, "loginAccount failed: $result")
|
||||
}
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun verify(address: String, password: String, callback: Callback) {
|
||||
val absRootDirPath = utils.getNoBackupDirectory()
|
||||
val newKeystoreDir = utils.pathCombine(absRootDirPath, "keystore")
|
||||
|
||||
utils.executeRunnableStatusGoMethod(
|
||||
{ Statusgo.verifyAccountPassword(newKeystoreDir, address, password) },
|
||||
callback
|
||||
)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun verifyDatabasePassword(keyUID: String, password: String, callback: Callback) {
|
||||
utils.executeRunnableStatusGoMethod(
|
||||
{ Statusgo.verifyDatabasePassword(keyUID, password) },
|
||||
callback
|
||||
)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
private fun openAccounts(callback: Callback) {
|
||||
Log.d(TAG, "openAccounts")
|
||||
val rootDir = utils.getNoBackupDirectory()
|
||||
Log.d(TAG, "[Opening accounts $rootDir")
|
||||
utils.executeRunnableStatusGoMethod({ Statusgo.openAccounts(rootDir) }, callback)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun logout() {
|
||||
Log.d(TAG, "logout")
|
||||
val runnable = Runnable {
|
||||
val result = Statusgo.logout()
|
||||
if (result.startsWith("{\"error\":\"\"")) {
|
||||
Log.d(TAG, "Logout result: $result")
|
||||
} else {
|
||||
Log.e(TAG, "Logout failed: $result")
|
||||
}
|
||||
}
|
||||
StatusThreadPoolExecutor.getInstance().execute(runnable)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun multiAccountStoreAccount(json: String, callback: Callback) {
|
||||
utils.executeRunnableStatusGoMethod({ Statusgo.multiAccountStoreAccount(json) }, callback)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun multiAccountLoadAccount(json: String, callback: Callback) {
|
||||
utils.executeRunnableStatusGoMethod({ Statusgo.multiAccountLoadAccount(json) }, callback)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun multiAccountDeriveAddresses(json: String, callback: Callback) {
|
||||
utils.executeRunnableStatusGoMethod({ Statusgo.multiAccountDeriveAddresses(json) }, callback)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun multiAccountGenerateAndDeriveAddresses(json: String, callback: Callback) {
|
||||
utils.executeRunnableStatusGoMethod({ Statusgo.multiAccountGenerateAndDeriveAddresses(json) }, callback)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun multiAccountStoreDerived(json: String, callback: Callback) {
|
||||
utils.executeRunnableStatusGoMethod({ Statusgo.multiAccountStoreDerivedAccounts(json) }, callback)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun multiAccountImportMnemonic(json: String, callback: Callback) {
|
||||
utils.executeRunnableStatusGoMethod({ Statusgo.multiAccountImportMnemonic(json) }, callback)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun multiAccountImportPrivateKey(json: String, callback: Callback) {
|
||||
utils.executeRunnableStatusGoMethod({ Statusgo.multiAccountImportPrivateKey(json) }, callback)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun deleteMultiaccount(keyUID: String, callback: Callback) {
|
||||
val keyStoreDir = utils.getKeyStorePath(keyUID)
|
||||
utils.executeRunnableStatusGoMethod({ Statusgo.deleteMultiaccount(keyUID, keyStoreDir) }, callback)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun getRandomMnemonic(callback: Callback) {
|
||||
utils.executeRunnableStatusGoMethod({ Statusgo.getRandomMnemonic() }, callback)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun createAccountFromMnemonicAndDeriveAccountsForPaths(mnemonic: String, callback: Callback) {
|
||||
utils.executeRunnableStatusGoMethod(
|
||||
{ Statusgo.createAccountFromMnemonicAndDeriveAccountsForPaths(mnemonic) },
|
||||
callback
|
||||
)
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val TAG = "AccountManager"
|
||||
private const val gethLogFileName = "geth.log"
|
||||
|
||||
private fun prettyPrintConfig(config: String) {
|
||||
Log.d(TAG, "startNode() with config (see below)")
|
||||
var configOutput = config
|
||||
val maxOutputLen = 4000
|
||||
Log.d(TAG, "********************** NODE CONFIG ****************************")
|
||||
while (configOutput.isNotEmpty()) {
|
||||
Log.d(TAG, "Node config:${configOutput.take(maxOutputLen)}")
|
||||
configOutput = configOutput.drop(maxOutputLen)
|
||||
}
|
||||
Log.d(TAG, "******************* ENDOF NODE CONFIG *************************")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
package im.status.ethereum.module;
|
||||
|
||||
import com.facebook.react.bridge.ReactApplicationContext;
|
||||
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
||||
import com.facebook.react.bridge.ReactMethod;
|
||||
import com.facebook.react.bridge.Callback;
|
||||
import statusgo.Statusgo;
|
||||
import android.util.Log;
|
||||
import java.io.File;
|
||||
import android.os.Environment;
|
||||
import android.content.Context;
|
||||
public class DatabaseManager extends ReactContextBaseJavaModule {
|
||||
private static final String TAG = "DatabaseManager";
|
||||
private ReactApplicationContext reactContext;
|
||||
private static final String exportDBFileName = "export.db";
|
||||
private Utils utils;
|
||||
public DatabaseManager(ReactApplicationContext reactContext) {
|
||||
this.reactContext = reactContext;
|
||||
this.utils = new Utils(reactContext);
|
||||
}
|
||||
@Override
|
||||
public String getName() {
|
||||
return "DatabaseManager";
|
||||
}
|
||||
|
||||
private File getExportDBFile() {
|
||||
final Context context = this.getReactApplicationContext();
|
||||
// Environment.getExternalStoragePublicDirectory doesn't work as expected on Android Q
|
||||
// https://developer.android.com/reference/android/os/Environment#getExternalStoragePublicDirectory(java.lang.String)
|
||||
final File pubDirectory = context.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS);
|
||||
final File filename = new File(pubDirectory, exportDBFileName);
|
||||
|
||||
return filename;
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void exportUnencryptedDatabase(final String accountData, final String password, final Callback callback) {
|
||||
Log.d(TAG, "login");
|
||||
|
||||
final File newFile = getExportDBFile();
|
||||
|
||||
this.utils.migrateKeyStoreDir(accountData, password);
|
||||
String result = Statusgo.exportUnencryptedDatabase(accountData, password, newFile.getAbsolutePath());
|
||||
if (result.startsWith("{\"error\":\"\"")) {
|
||||
Log.d(TAG, "Login result: " + result);
|
||||
} else {
|
||||
Log.e(TAG, "Login failed: " + result);
|
||||
}
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void importUnencryptedDatabase(final String accountData, final String password) {
|
||||
Log.d(TAG, "importUnencryptedDatabase");
|
||||
|
||||
final File newFile = getExportDBFile();
|
||||
|
||||
this.utils.migrateKeyStoreDir(accountData, password);
|
||||
String result = Statusgo.importUnencryptedDatabase(accountData, password, newFile.getAbsolutePath());
|
||||
if (result.startsWith("{\"error\":\"\"")) {
|
||||
Log.d(TAG, "import result: " + result);
|
||||
} else {
|
||||
Log.e(TAG, "import failed: " + result);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package im.status.ethereum.module
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Environment
|
||||
import android.util.Log
|
||||
import com.facebook.react.bridge.Callback
|
||||
import com.facebook.react.bridge.ReactApplicationContext
|
||||
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
||||
import com.facebook.react.bridge.ReactMethod
|
||||
import statusgo.Statusgo
|
||||
import java.io.File
|
||||
|
||||
class DatabaseManager(private val reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {
|
||||
|
||||
private val utils = Utils(reactContext)
|
||||
|
||||
override fun getName() = "DatabaseManager"
|
||||
|
||||
private fun getExportDBFile(): File {
|
||||
val pubDirectory = reactContext.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS)
|
||||
return File(pubDirectory, exportDBFileName)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun exportUnencryptedDatabase(accountData: String, password: String, callback: Callback) {
|
||||
Log.d(TAG, "login")
|
||||
|
||||
val newFile = getExportDBFile()
|
||||
|
||||
utils.migrateKeyStoreDir(accountData, password)
|
||||
val result = Statusgo.exportUnencryptedDatabase(accountData, password, newFile.absolutePath)
|
||||
if (result.startsWith("{\"error\":\"\"")) {
|
||||
Log.d(TAG, "Login result: $result")
|
||||
} else {
|
||||
Log.e(TAG, "Login failed: $result")
|
||||
}
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun importUnencryptedDatabase(accountData: String, password: String) {
|
||||
Log.d(TAG, "importUnencryptedDatabase")
|
||||
|
||||
val newFile = getExportDBFile()
|
||||
|
||||
utils.migrateKeyStoreDir(accountData, password)
|
||||
val result = Statusgo.importUnencryptedDatabase(accountData, password, newFile.absolutePath)
|
||||
if (result.startsWith("{\"error\":\"\"")) {
|
||||
Log.d(TAG, "import result: $result")
|
||||
} else {
|
||||
Log.e(TAG, "import failed: $result")
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val TAG = "DatabaseManager"
|
||||
private const val exportDBFileName = "export.db"
|
||||
}
|
||||
}
|
||||
@@ -1,227 +0,0 @@
|
||||
package im.status.ethereum.module;
|
||||
|
||||
import com.facebook.react.bridge.ReactMethod;
|
||||
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
||||
import com.facebook.react.bridge.ReactApplicationContext;
|
||||
import com.facebook.react.bridge.Callback;
|
||||
import java.io.File;
|
||||
import java.util.Stack;
|
||||
import android.util.Log;
|
||||
import android.net.Uri;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.IOException;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import androidx.core.content.FileProvider;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
import java.io.FileInputStream;
|
||||
import java.util.zip.ZipEntry;
|
||||
import org.json.JSONObject;
|
||||
import statusgo.Statusgo;
|
||||
import android.content.Context;
|
||||
import org.json.JSONException;
|
||||
public class LogManager extends ReactContextBaseJavaModule {
|
||||
private static final String TAG = "LogManager";
|
||||
private static final String gethLogFileName = "geth.log";
|
||||
private static final String statusLogFileName = "Status.log";
|
||||
private static final String logsZipFileName = "Status-debug-logs.zip";
|
||||
private ReactApplicationContext reactContext;
|
||||
private Utils utils;
|
||||
|
||||
public LogManager(ReactApplicationContext reactContext) {
|
||||
super(reactContext);
|
||||
this.reactContext = reactContext;
|
||||
this.utils = new Utils(reactContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "LogManager";
|
||||
}
|
||||
|
||||
private File getLogsFile() {
|
||||
final File pubDirectory = this.utils.getPublicStorageDirectory();
|
||||
final File logFile = new File(pubDirectory, gethLogFileName);
|
||||
|
||||
return logFile;
|
||||
}
|
||||
|
||||
public File prepareLogsFile(final Context context) {
|
||||
final File logFile = this.utils.getLogsFile();
|
||||
|
||||
try {
|
||||
logFile.setReadable(true);
|
||||
File parent = logFile.getParentFile();
|
||||
if (!parent.canWrite()) {
|
||||
return null;
|
||||
}
|
||||
if (!parent.exists()) {
|
||||
parent.mkdirs();
|
||||
}
|
||||
logFile.createNewFile();
|
||||
logFile.setWritable(true);
|
||||
Log.d(TAG, "Can write " + logFile.canWrite());
|
||||
Uri gethLogUri = Uri.fromFile(logFile);
|
||||
|
||||
String gethLogFilePath = logFile.getAbsolutePath();
|
||||
Log.d(TAG, gethLogFilePath);
|
||||
|
||||
return logFile;
|
||||
} catch (Exception e) {
|
||||
Log.d(TAG, "Can't create geth.log file! " + e.getMessage());
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private void showErrorMessage(final String message) {
|
||||
final Activity activity = getCurrentActivity();
|
||||
|
||||
new AlertDialog.Builder(activity)
|
||||
.setTitle("Error")
|
||||
.setMessage(message)
|
||||
.setNegativeButton("Exit", new DialogInterface.OnClickListener() {
|
||||
public void onClick(final DialogInterface dialog, final int id) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
}).show();
|
||||
}
|
||||
|
||||
private void dumpAdbLogsTo(final FileOutputStream statusLogStream) throws IOException {
|
||||
final String filter = "logcat -d -b main ReactNativeJS:D StatusModule:D StatusService:D StatusNativeLogs:D *:S";
|
||||
final java.lang.Process p = Runtime.getRuntime().exec(filter);
|
||||
final java.io.BufferedReader in = new java.io.BufferedReader(new java.io.InputStreamReader(p.getInputStream()));
|
||||
final java.io.BufferedWriter out = new java.io.BufferedWriter(new java.io.OutputStreamWriter(statusLogStream));
|
||||
String line;
|
||||
while ((line = in.readLine()) != null) {
|
||||
out.write(line);
|
||||
out.newLine();
|
||||
}
|
||||
out.close();
|
||||
in.close();
|
||||
}
|
||||
|
||||
private Boolean zip(File[] _files, File zipFile, Stack<String> errorList) {
|
||||
final int BUFFER = 0x8000;
|
||||
|
||||
try {
|
||||
BufferedInputStream origin = null;
|
||||
FileOutputStream dest = new FileOutputStream(zipFile);
|
||||
ZipOutputStream out = new ZipOutputStream(new BufferedOutputStream(dest));
|
||||
byte data[] = new byte[BUFFER];
|
||||
|
||||
for (int i = 0; i < _files.length; i++) {
|
||||
final File file = _files[i];
|
||||
if (file == null || !file.exists()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Log.v("Compress", "Adding: " + file.getAbsolutePath());
|
||||
try {
|
||||
FileInputStream fi = new FileInputStream(file);
|
||||
origin = new BufferedInputStream(fi, BUFFER);
|
||||
|
||||
ZipEntry entry = new ZipEntry(file.getName());
|
||||
out.putNextEntry(entry);
|
||||
int count;
|
||||
|
||||
while ((count = origin.read(data, 0, BUFFER)) != -1) {
|
||||
out.write(data, 0, count);
|
||||
}
|
||||
origin.close();
|
||||
} catch (IOException e) {
|
||||
Log.e(TAG, e.getMessage());
|
||||
errorList.push(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
out.close();
|
||||
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, e.getMessage());
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void sendLogs(final String dbJson, final String jsLogs, final Callback callback) {
|
||||
Log.d(TAG, "sendLogs");
|
||||
if (!this.utils.checkAvailability()) {
|
||||
return;
|
||||
}
|
||||
|
||||
final Context context = this.getReactApplicationContext();
|
||||
final File logsTempDir = new File(context.getCacheDir(), "logs"); // This path needs to be in sync with android/app/src/main/res/xml/file_provider_paths.xml
|
||||
logsTempDir.mkdir();
|
||||
|
||||
final File dbFile = new File(logsTempDir, "db.json");
|
||||
try {
|
||||
OutputStreamWriter outputStreamWriter = new OutputStreamWriter(new FileOutputStream(dbFile));
|
||||
outputStreamWriter.write(dbJson);
|
||||
outputStreamWriter.close();
|
||||
} catch (IOException e) {
|
||||
Log.e(TAG, "File write failed: " + e.toString());
|
||||
showErrorMessage(e.getLocalizedMessage());
|
||||
}
|
||||
|
||||
final File zipFile = new File(logsTempDir, logsZipFileName);
|
||||
final File statusLogFile = new File(logsTempDir, statusLogFileName);
|
||||
final File gethLogFile = getLogsFile();
|
||||
|
||||
try {
|
||||
if (zipFile.exists() || zipFile.createNewFile()) {
|
||||
final long usableSpace = zipFile.getUsableSpace();
|
||||
if (usableSpace < 20 * 1024 * 1024) {
|
||||
final String message = String.format("Insufficient space available on device (%s) to write logs.\nPlease free up some space.", android.text.format.Formatter.formatShortFileSize(context, usableSpace));
|
||||
Log.e(TAG, message);
|
||||
showErrorMessage(message);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
dumpAdbLogsTo(new FileOutputStream(statusLogFile));
|
||||
|
||||
final Stack<String> errorList = new Stack<String>();
|
||||
final Boolean zipped = zip(new File[]{dbFile, gethLogFile, statusLogFile}, zipFile, errorList);
|
||||
if (zipped && zipFile.exists()) {
|
||||
zipFile.setReadable(true, false);
|
||||
Uri extUri = FileProvider.getUriForFile(context, context.getPackageName() + ".provider", zipFile);
|
||||
callback.invoke(extUri.toString());
|
||||
} else {
|
||||
Log.d(TAG, "File " + zipFile.getAbsolutePath() + " does not exist");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, e.getMessage());
|
||||
showErrorMessage(e.getLocalizedMessage());
|
||||
e.printStackTrace();
|
||||
return;
|
||||
} finally {
|
||||
dbFile.delete();
|
||||
statusLogFile.delete();
|
||||
zipFile.deleteOnExit();
|
||||
}
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void initLogging(final boolean enabled, final boolean mobileSystem, final String logLevel, final Callback callback) throws JSONException {
|
||||
final JSONObject jsonConfig = new JSONObject();
|
||||
jsonConfig.put("Enabled", enabled);
|
||||
jsonConfig.put("MobileSystem", mobileSystem);
|
||||
jsonConfig.put("Level", logLevel);
|
||||
jsonConfig.put("File", getLogsFile().getAbsolutePath());
|
||||
final String config = jsonConfig.toString();
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.initLogging(config), callback);
|
||||
}
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
public String logFileDirectory() {
|
||||
return this.utils.getPublicStorageDirectory().getAbsolutePath();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,211 @@
|
||||
package im.status.ethereum.module
|
||||
|
||||
import android.app.Activity
|
||||
import android.app.AlertDialog
|
||||
import android.content.Context
|
||||
import android.content.DialogInterface
|
||||
import android.net.Uri
|
||||
import android.util.Log
|
||||
import androidx.core.content.FileProvider
|
||||
import com.facebook.react.bridge.Callback
|
||||
import com.facebook.react.bridge.ReactApplicationContext
|
||||
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
||||
import com.facebook.react.bridge.ReactMethod
|
||||
import org.json.JSONException
|
||||
import org.json.JSONObject
|
||||
import statusgo.Statusgo
|
||||
import java.io.*
|
||||
import java.util.*
|
||||
import java.util.zip.ZipEntry
|
||||
import java.util.zip.ZipOutputStream
|
||||
|
||||
class LogManager(private val reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {
|
||||
|
||||
private val utils = Utils(reactContext)
|
||||
|
||||
override fun getName() = "LogManager"
|
||||
|
||||
private fun getLogsFile(): File {
|
||||
val pubDirectory = utils.getPublicStorageDirectory()
|
||||
return File(pubDirectory, gethLogFileName)
|
||||
}
|
||||
|
||||
fun prepareLogsFile(context: Context): File? {
|
||||
val logFile = utils.getLogsFile()
|
||||
|
||||
try {
|
||||
logFile.setReadable(true)
|
||||
val parent = logFile.parentFile
|
||||
if (!parent?.canWrite()!!) {
|
||||
return null
|
||||
}
|
||||
if (!parent.exists()) {
|
||||
parent.mkdirs()
|
||||
}
|
||||
logFile.createNewFile()
|
||||
logFile.setWritable(true)
|
||||
Log.d(TAG, "Can write ${logFile.canWrite()}")
|
||||
val gethLogUri = Uri.fromFile(logFile)
|
||||
|
||||
val gethLogFilePath = logFile.absolutePath
|
||||
Log.d(TAG, gethLogFilePath)
|
||||
|
||||
return logFile
|
||||
} catch (e: Exception) {
|
||||
Log.d(TAG, "Can't create geth.log file! ${e.message}")
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
private fun showErrorMessage(message: String) {
|
||||
val activity = currentActivity
|
||||
|
||||
AlertDialog.Builder(activity)
|
||||
.setTitle("Error")
|
||||
.setMessage(message)
|
||||
.setNegativeButton("Exit") { dialog, _ ->
|
||||
dialog.dismiss()
|
||||
}.show()
|
||||
}
|
||||
|
||||
private fun dumpAdbLogsTo(statusLogStream: FileOutputStream) {
|
||||
val filter = "logcat -d -b main ReactNativeJS:D StatusModule:D StatusService:D StatusNativeLogs:D *:S"
|
||||
val p = Runtime.getRuntime().exec(filter)
|
||||
val input = BufferedReader(InputStreamReader(p.inputStream))
|
||||
val output = BufferedWriter(OutputStreamWriter(statusLogStream))
|
||||
var line: String?
|
||||
while (input.readLine().also { line = it } != null) {
|
||||
output.write(line)
|
||||
output.newLine()
|
||||
}
|
||||
output.close()
|
||||
input.close()
|
||||
}
|
||||
|
||||
private fun zip(files: Array<File>, zipFile: File, errorList: Stack<String>): Boolean {
|
||||
val BUFFER = 0x8000
|
||||
|
||||
try {
|
||||
var origin: BufferedInputStream? = null
|
||||
val dest = FileOutputStream(zipFile)
|
||||
val out = ZipOutputStream(BufferedOutputStream(dest))
|
||||
val data = ByteArray(BUFFER)
|
||||
|
||||
for (file in files) {
|
||||
if (file == null || !file.exists()) {
|
||||
continue
|
||||
}
|
||||
|
||||
Log.v("Compress", "Adding: ${file.absolutePath}")
|
||||
try {
|
||||
val fi = FileInputStream(file)
|
||||
origin = BufferedInputStream(fi, BUFFER)
|
||||
|
||||
val entry = ZipEntry(file.name)
|
||||
out.putNextEntry(entry)
|
||||
var count: Int
|
||||
|
||||
while (origin.read(data, 0, BUFFER).also { count = it } != -1) {
|
||||
out.write(data, 0, count)
|
||||
}
|
||||
origin.close()
|
||||
} catch (e: IOException) {
|
||||
Log.e(TAG, e.message!!)
|
||||
errorList.push(e.message!!)
|
||||
}
|
||||
}
|
||||
|
||||
out.close()
|
||||
|
||||
return true
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, e.message!!)
|
||||
e.printStackTrace()
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun sendLogs(dbJson: String, jsLogs: String, callback: Callback) {
|
||||
Log.d(TAG, "sendLogs")
|
||||
if (!utils.checkAvailability()) {
|
||||
return
|
||||
}
|
||||
|
||||
val context = reactApplicationContext
|
||||
val logsTempDir = File(context.cacheDir, "logs") // This path needs to be in sync with android/app/src/main/res/xml/file_provider_paths.xml
|
||||
logsTempDir.mkdir()
|
||||
|
||||
val dbFile = File(logsTempDir, "db.json")
|
||||
try {
|
||||
val outputStreamWriter = OutputStreamWriter(FileOutputStream(dbFile))
|
||||
outputStreamWriter.write(dbJson)
|
||||
outputStreamWriter.close()
|
||||
} catch (e: IOException) {
|
||||
Log.e(TAG, "File write failed: ${e}")
|
||||
showErrorMessage(e.localizedMessage!!)
|
||||
}
|
||||
|
||||
val zipFile = File(logsTempDir, logsZipFileName)
|
||||
val statusLogFile = File(logsTempDir, statusLogFileName)
|
||||
val gethLogFile = getLogsFile()
|
||||
|
||||
try {
|
||||
if (zipFile.exists() || zipFile.createNewFile()) {
|
||||
val usableSpace = zipFile.usableSpace
|
||||
if (usableSpace < 20 * 1024 * 1024) {
|
||||
val message = "Insufficient space available on device (${android.text.format.Formatter.formatShortFileSize(context, usableSpace)}) to write logs.\nPlease free up some space."
|
||||
Log.e(TAG, message)
|
||||
showErrorMessage(message)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
dumpAdbLogsTo(FileOutputStream(statusLogFile))
|
||||
|
||||
val errorList = Stack<String>()
|
||||
val zipped = zip(arrayOf(dbFile, gethLogFile, statusLogFile), zipFile, errorList)
|
||||
if (zipped && zipFile.exists()) {
|
||||
zipFile.setReadable(true, false)
|
||||
val extUri = FileProvider.getUriForFile(context, "${context.packageName}.provider", zipFile)
|
||||
callback.invoke(extUri.toString())
|
||||
} else {
|
||||
Log.d(TAG, "File ${zipFile.absolutePath} does not exist")
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, e.message!!)
|
||||
showErrorMessage(e.localizedMessage!!)
|
||||
e.printStackTrace()
|
||||
return
|
||||
} finally {
|
||||
dbFile.delete()
|
||||
statusLogFile.delete()
|
||||
zipFile.deleteOnExit()
|
||||
}
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun initLogging(enabled: Boolean, mobileSystem: Boolean, logLevel: String, callback: Callback) {
|
||||
val jsonConfig = JSONObject().apply {
|
||||
put("Enabled", enabled)
|
||||
put("MobileSystem", mobileSystem)
|
||||
put("Level", logLevel)
|
||||
put("File", getLogsFile().absolutePath)
|
||||
}
|
||||
val config = jsonConfig.toString()
|
||||
utils.executeRunnableStatusGoMethod({ Statusgo.initLogging(config) }, callback)
|
||||
}
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
fun logFileDirectory(): String? {
|
||||
return utils.getPublicStorageDirectory()?.absolutePath
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val TAG = "LogManager"
|
||||
private const val gethLogFileName = "geth.log"
|
||||
private const val statusLogFileName = "Status.log"
|
||||
private const val logsZipFileName = "Status-debug-logs.zip"
|
||||
}
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
package im.status.ethereum.module;
|
||||
|
||||
import com.facebook.react.bridge.ReactApplicationContext;
|
||||
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
||||
import com.facebook.react.bridge.ReactMethod;
|
||||
import com.facebook.react.bridge.Callback;
|
||||
import org.json.JSONException;
|
||||
import statusgo.Statusgo;
|
||||
import org.json.JSONObject;
|
||||
|
||||
public class NetworkManager extends ReactContextBaseJavaModule {
|
||||
private ReactApplicationContext reactContext;
|
||||
private Utils utils;
|
||||
|
||||
public NetworkManager(ReactApplicationContext reactContext) {
|
||||
super(reactContext);
|
||||
this.reactContext = reactContext;
|
||||
this.utils = new Utils(reactContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "NetworkManager";
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void startSearchForLocalPairingPeers(final Callback callback) throws JSONException {
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.startSearchForLocalPairingPeers(), callback);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void getConnectionStringForBootstrappingAnotherDevice(final String configJSON, final Callback callback) throws JSONException {
|
||||
final JSONObject jsonConfig = new JSONObject(configJSON);
|
||||
final JSONObject senderConfig = jsonConfig.getJSONObject("senderConfig");
|
||||
final String keyUID = senderConfig.getString("keyUID");
|
||||
final String keyStorePath = this.utils.getKeyStorePath(keyUID);
|
||||
senderConfig.put("keystorePath", keyStorePath);
|
||||
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.getConnectionStringForBootstrappingAnotherDevice(jsonConfig.toString()), callback);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void inputConnectionStringForBootstrapping(final String connectionString, final String configJSON, final Callback callback) throws JSONException {
|
||||
final JSONObject jsonConfig = new JSONObject(configJSON);
|
||||
final JSONObject receiverConfig = jsonConfig.getJSONObject("receiverConfig");
|
||||
final String keyStorePath = this.utils.pathCombine(this.utils.getNoBackupDirectory(), "/keystore");
|
||||
receiverConfig.put("keystorePath", keyStorePath);
|
||||
receiverConfig.getJSONObject("nodeConfig").put("rootDataDir", this.utils.getNoBackupDirectory());
|
||||
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.inputConnectionStringForBootstrapping(connectionString, jsonConfig.toString()), callback);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void sendTransactionWithSignature(final String txArgsJSON, final String signature, final Callback callback) throws JSONException {
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.sendTransactionWithSignature(txArgsJSON, signature), callback);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void sendTransaction(final String txArgsJSON, final String password, final Callback callback) throws JSONException {
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.sendTransaction(txArgsJSON, password), callback);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void callRPC(final String payload, final Callback callback) throws JSONException {
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.callRPC(payload), callback);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void callPrivateRPC(final String payload, final Callback callback) throws JSONException {
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.callPrivateRPC(payload), callback);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void recover(final String rpcParams, final Callback callback) throws JSONException {
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.recover(rpcParams), callback);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package im.status.ethereum.module
|
||||
|
||||
import com.facebook.react.bridge.Callback
|
||||
import com.facebook.react.bridge.ReactApplicationContext
|
||||
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
||||
import com.facebook.react.bridge.ReactMethod
|
||||
import org.json.JSONException
|
||||
import org.json.JSONObject
|
||||
import statusgo.Statusgo
|
||||
|
||||
class NetworkManager(private val reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {
|
||||
|
||||
private val utils = Utils(reactContext)
|
||||
|
||||
override fun getName() = "NetworkManager"
|
||||
|
||||
@ReactMethod
|
||||
fun startSearchForLocalPairingPeers(callback: Callback) {
|
||||
utils.executeRunnableStatusGoMethod({ Statusgo.startSearchForLocalPairingPeers() }, callback)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun getConnectionStringForBootstrappingAnotherDevice(configJSON: String, callback: Callback) {
|
||||
val jsonConfig = JSONObject(configJSON)
|
||||
val senderConfig = jsonConfig.getJSONObject("senderConfig")
|
||||
val keyUID = senderConfig.getString("keyUID")
|
||||
val keyStorePath = utils.getKeyStorePath(keyUID)
|
||||
senderConfig.put("keystorePath", keyStorePath)
|
||||
|
||||
utils.executeRunnableStatusGoMethod(
|
||||
{ Statusgo.getConnectionStringForBootstrappingAnotherDevice(jsonConfig.toString()) },
|
||||
callback
|
||||
)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun inputConnectionStringForBootstrapping(connectionString: String, configJSON: String, callback: Callback) {
|
||||
val jsonConfig = JSONObject(configJSON)
|
||||
val receiverConfig = jsonConfig.getJSONObject("receiverConfig")
|
||||
val keyStorePath = utils.pathCombine(utils.getNoBackupDirectory(), "/keystore")
|
||||
receiverConfig.put("keystorePath", keyStorePath)
|
||||
receiverConfig.getJSONObject("nodeConfig").put("rootDataDir", utils.getNoBackupDirectory())
|
||||
|
||||
utils.executeRunnableStatusGoMethod(
|
||||
{ Statusgo.inputConnectionStringForBootstrapping(connectionString, jsonConfig.toString()) },
|
||||
callback
|
||||
)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun sendTransactionWithSignature(txArgsJSON: String, signature: String, callback: Callback) {
|
||||
utils.executeRunnableStatusGoMethod(
|
||||
{ Statusgo.sendTransactionWithSignature(txArgsJSON, signature) },
|
||||
callback
|
||||
)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun sendTransaction(txArgsJSON: String, password: String, callback: Callback) {
|
||||
utils.executeRunnableStatusGoMethod({ Statusgo.sendTransaction(txArgsJSON, password) }, callback)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun callRPC(payload: String, callback: Callback) {
|
||||
utils.executeRunnableStatusGoMethod({ Statusgo.callRPC(payload) }, callback)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun callPrivateRPC(payload: String, callback: Callback) {
|
||||
utils.executeRunnableStatusGoMethod({ Statusgo.callPrivateRPC(payload) }, callback)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun recover(rpcParams: String, callback: Callback) {
|
||||
utils.executeRunnableStatusGoMethod({ Statusgo.recover(rpcParams) }, callback)
|
||||
}
|
||||
}
|
||||
@@ -1,147 +0,0 @@
|
||||
package im.status.ethereum.module;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.util.Log;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.os.Build;
|
||||
|
||||
import com.facebook.react.bridge.Arguments;
|
||||
import com.facebook.react.bridge.Callback;
|
||||
import com.facebook.react.bridge.LifecycleEventListener;
|
||||
import com.facebook.react.bridge.ReactApplicationContext;
|
||||
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
||||
import com.facebook.react.bridge.ReactMethod;
|
||||
import com.facebook.react.bridge.WritableMap;
|
||||
import com.facebook.react.modules.core.DeviceEventManagerModule;
|
||||
|
||||
import statusgo.SignalHandler;
|
||||
import statusgo.Statusgo;
|
||||
|
||||
import org.json.JSONException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventListener, SignalHandler {
|
||||
|
||||
private static final String TAG = "StatusModule";
|
||||
private static StatusModule module;
|
||||
private ReactApplicationContext reactContext;
|
||||
private boolean rootedDevice;
|
||||
private boolean background;
|
||||
private Utils utils;
|
||||
|
||||
|
||||
StatusModule(ReactApplicationContext reactContext, boolean rootedDevice) {
|
||||
super(reactContext);
|
||||
this.reactContext = reactContext;
|
||||
this.rootedDevice = rootedDevice;
|
||||
this.utils = new Utils(reactContext);
|
||||
|
||||
reactContext.addLifecycleEventListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Status";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHostResume() {
|
||||
module = this;
|
||||
this.background = false;
|
||||
Statusgo.setMobileSignalHandler(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHostPause() {
|
||||
this.background = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHostDestroy() {
|
||||
Log.d(TAG, "******************* ON HOST DESTROY *************************");
|
||||
}
|
||||
|
||||
public void handleSignal(final String jsonEventString) {
|
||||
Log.d(TAG, "Signal event");
|
||||
WritableMap params = Arguments.createMap();
|
||||
params.putString("jsonEvent", jsonEventString);
|
||||
this.getReactApplicationContext().getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit("gethEvent", params);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void closeApplication() {
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void connectionChange(final String type, final boolean isExpensive) {
|
||||
Log.d(TAG, "ConnectionChange: " + type + ", is expensive " + isExpensive);
|
||||
Statusgo.connectionChange(type, isExpensive ? 1 : 0);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void appStateChange(final String type) {
|
||||
Log.d(TAG, "AppStateChange: " + type);
|
||||
Statusgo.appStateChange(type);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void startLocalNotifications() {
|
||||
Log.d(TAG, "startLocalNotifications");
|
||||
Statusgo.startLocalNotifications();
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void getNodeConfig(final Callback callback) throws JSONException {
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.getNodeConfig(), callback);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void deleteImportedKey(final String keyUID, final String address, final String password, final Callback callback) throws JSONException {
|
||||
final String keyStoreDir = this.utils.getKeyStorePath(keyUID);
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.deleteImportedKey(address, password, keyStoreDir), callback);
|
||||
}
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
public String fleets() {
|
||||
return Statusgo.fleets();
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable
|
||||
Map<String, Object> getConstants() {
|
||||
HashMap<String, Object> constants = new HashMap<String, Object>();
|
||||
|
||||
constants.put("is24Hour", this.utils.is24Hour());
|
||||
constants.put("model", Build.MODEL);
|
||||
constants.put("brand", Build.BRAND);
|
||||
constants.put("buildId", Build.ID);
|
||||
constants.put("deviceId", Build.BOARD);
|
||||
return constants;
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void isDeviceRooted(final Callback callback) {
|
||||
callback.invoke(rootedDevice);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void deactivateKeepAwake() {
|
||||
final Activity activity = getCurrentActivity();
|
||||
|
||||
if (activity != null) {
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
activity.getWindow().clearFlags(android.view.WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
package im.status.ethereum.module
|
||||
|
||||
import android.app.Activity
|
||||
import android.os.Build
|
||||
import android.util.Log
|
||||
import com.facebook.react.bridge.*
|
||||
import com.facebook.react.modules.core.DeviceEventManagerModule
|
||||
import statusgo.SignalHandler
|
||||
import statusgo.Statusgo
|
||||
import org.json.JSONException
|
||||
import android.view.WindowManager
|
||||
|
||||
class StatusModule(private val reactContext: ReactApplicationContext, private val rootedDevice: Boolean) : ReactContextBaseJavaModule(reactContext), LifecycleEventListener, SignalHandler {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "StatusModule"
|
||||
private var module: StatusModule? = null
|
||||
}
|
||||
|
||||
private val utils: Utils = Utils(reactContext)
|
||||
private var background: Boolean = false
|
||||
|
||||
init {
|
||||
reactContext.addLifecycleEventListener(this)
|
||||
}
|
||||
|
||||
override fun getName(): String {
|
||||
return "Status"
|
||||
}
|
||||
|
||||
override fun onHostResume() {
|
||||
module = this
|
||||
background = false
|
||||
Statusgo.setMobileSignalHandler(this)
|
||||
}
|
||||
|
||||
override fun onHostPause() {
|
||||
background = true
|
||||
}
|
||||
|
||||
override fun onHostDestroy() {
|
||||
Log.d(TAG, "******************* ON HOST DESTROY *************************")
|
||||
}
|
||||
|
||||
override fun handleSignal(jsonEventString: String) {
|
||||
Log.d(TAG, "Signal event")
|
||||
val params = Arguments.createMap()
|
||||
params.putString("jsonEvent", jsonEventString)
|
||||
reactContext.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java).emit("gethEvent", params)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun closeApplication() {
|
||||
System.exit(0)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun connectionChange(type: String, isExpensive: Boolean) {
|
||||
Log.d(TAG, "ConnectionChange: $type, is expensive $isExpensive")
|
||||
Statusgo.connectionChange(type, if (isExpensive) 1 else 0)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun appStateChange(type: String) {
|
||||
Log.d(TAG, "AppStateChange: $type")
|
||||
Statusgo.appStateChange(type)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun startLocalNotifications() {
|
||||
Log.d(TAG, "startLocalNotifications")
|
||||
Statusgo.startLocalNotifications()
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun getNodeConfig(callback: Callback) {
|
||||
utils.executeRunnableStatusGoMethod({ Statusgo.getNodeConfig() }, callback)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun deleteImportedKey(keyUID: String, address: String, password: String, callback: Callback) {
|
||||
val keyStoreDir = utils.getKeyStorePath(keyUID)
|
||||
utils.executeRunnableStatusGoMethod({ Statusgo.deleteImportedKey(address, password, keyStoreDir) }, callback)
|
||||
}
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
fun fleets(): String {
|
||||
return Statusgo.fleets()
|
||||
}
|
||||
|
||||
override fun getConstants(): Map<String, Any>? {
|
||||
return hashMapOf(
|
||||
"is24Hour" to utils.is24Hour(),
|
||||
"model" to Build.MODEL,
|
||||
"brand" to Build.BRAND,
|
||||
"buildId" to Build.ID,
|
||||
"deviceId" to Build.BOARD
|
||||
)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun isDeviceRooted(callback: Callback) {
|
||||
callback.invoke(rootedDevice)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun deactivateKeepAwake() {
|
||||
val activity = currentActivity
|
||||
|
||||
activity?.runOnUiThread {
|
||||
activity.window.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
package im.status.ethereum.module;
|
||||
|
||||
import com.facebook.react.ReactPackage;
|
||||
import com.facebook.react.bridge.JavaScriptModule;
|
||||
import com.facebook.react.bridge.NativeModule;
|
||||
import com.facebook.react.bridge.ReactApplicationContext;
|
||||
import com.facebook.react.uimanager.ViewManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import statusgo.Statusgo;
|
||||
|
||||
public class StatusPackage implements ReactPackage {
|
||||
|
||||
private boolean rootedDevice;
|
||||
|
||||
public static String getImageTLSCert() {
|
||||
return Statusgo.imageServerTLSCert();
|
||||
}
|
||||
|
||||
public StatusPackage(boolean rootedDevice) {
|
||||
this.rootedDevice = rootedDevice;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
|
||||
List<NativeModule> modules = new ArrayList<>();
|
||||
|
||||
modules.add(new StatusModule(reactContext, this.rootedDevice));
|
||||
modules.add(new AccountManager(reactContext));
|
||||
modules.add(new EncryptionUtils(reactContext));
|
||||
modules.add(new DatabaseManager(reactContext));
|
||||
modules.add(new UIHelper(reactContext));
|
||||
modules.add(new LogManager(reactContext));
|
||||
modules.add(new Utils(reactContext));
|
||||
modules.add(new NetworkManager(reactContext));
|
||||
modules.add(new RNSelectableTextInputModule(reactContext));
|
||||
|
||||
return modules;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
|
||||
return Arrays.<ViewManager>asList(
|
||||
new RNSelectableTextInputViewManager()
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package im.status.ethereum.module
|
||||
|
||||
import com.facebook.react.ReactPackage
|
||||
import com.facebook.react.bridge.NativeModule
|
||||
import com.facebook.react.bridge.ReactApplicationContext
|
||||
import com.facebook.react.uimanager.ViewManager
|
||||
import statusgo.Statusgo
|
||||
|
||||
class StatusPackage(private val rootedDevice: Boolean) : ReactPackage {
|
||||
|
||||
companion object {
|
||||
fun getImageTLSCert(): String = Statusgo.imageServerTLSCert()
|
||||
}
|
||||
|
||||
override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> {
|
||||
val modules = mutableListOf<NativeModule>()
|
||||
|
||||
modules.apply {
|
||||
add(StatusModule(reactContext, rootedDevice))
|
||||
add(AccountManager(reactContext))
|
||||
add(EncryptionUtils(reactContext))
|
||||
add(DatabaseManager(reactContext))
|
||||
add(UIHelper(reactContext))
|
||||
add(LogManager(reactContext))
|
||||
add(Utils(reactContext))
|
||||
add(NetworkManager(reactContext))
|
||||
add(RNSelectableTextInputModule(reactContext))
|
||||
}
|
||||
|
||||
return modules
|
||||
}
|
||||
|
||||
override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
|
||||
return listOf(
|
||||
RNSelectableTextInputViewManager()
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1,155 +0,0 @@
|
||||
package im.status.ethereum.module;
|
||||
|
||||
import com.facebook.react.bridge.Callback;
|
||||
import com.facebook.react.bridge.ReactMethod;
|
||||
import com.facebook.react.bridge.ReactApplicationContext;
|
||||
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
||||
import android.util.Log;
|
||||
import java.util.function.Supplier;
|
||||
import java.io.File;
|
||||
import android.content.Context;
|
||||
import android.os.Environment;
|
||||
import org.json.JSONObject;
|
||||
import org.json.JSONException;
|
||||
import statusgo.Statusgo;
|
||||
|
||||
public class Utils extends ReactContextBaseJavaModule {
|
||||
private static final String gethLogFileName = "geth.log";
|
||||
|
||||
private static final String TAG = "Utils";
|
||||
private ReactApplicationContext reactContext;
|
||||
|
||||
public Utils(ReactApplicationContext reactContext) {
|
||||
super(reactContext);
|
||||
this.reactContext = reactContext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Utils";
|
||||
}
|
||||
public String getNoBackupDirectory() {
|
||||
return this.getReactApplicationContext().getNoBackupFilesDir().getAbsolutePath();
|
||||
}
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
public String backupDisabledDataDir() {
|
||||
return getNoBackupDirectory();
|
||||
}
|
||||
|
||||
public File getPublicStorageDirectory() {
|
||||
final Context context = this.getReactApplicationContext();
|
||||
// Environment.getExternalStoragePublicDirectory doesn't work as expected on Android Q
|
||||
// https://developer.android.com/reference/android/os/Environment#getExternalStoragePublicDirectory(java.lang.String)
|
||||
return context.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS);
|
||||
}
|
||||
|
||||
public File getLogsFile() {
|
||||
final File pubDirectory = getPublicStorageDirectory();
|
||||
final File logFile = new File(pubDirectory, gethLogFileName);
|
||||
|
||||
return logFile;
|
||||
}
|
||||
|
||||
public String getKeyUID(final String json) throws JSONException {
|
||||
final JSONObject jsonObj = new JSONObject(json);
|
||||
return jsonObj.getString("key-uid");
|
||||
}
|
||||
|
||||
public String pathCombine(final String path1, final String path2) {
|
||||
// Replace this logic with Paths.get(path1, path2) once API level 26+ becomes the minimum supported API level
|
||||
final File file = new File(path1, path2);
|
||||
return file.getAbsolutePath();
|
||||
}
|
||||
|
||||
public String getKeyStorePath(String keyUID) {
|
||||
final String commonKeydir = pathCombine(getNoBackupDirectory(), "/keystore");
|
||||
final String keydir = pathCombine(commonKeydir, keyUID);
|
||||
|
||||
return keydir;
|
||||
}
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
public String keystoreDir() {
|
||||
final String absRootDirPath = getNoBackupDirectory();
|
||||
return pathCombine(absRootDirPath, "keystore");
|
||||
}
|
||||
|
||||
public void migrateKeyStoreDir(final String accountData, final String password) {
|
||||
try {
|
||||
final String commonKeydir = pathCombine(getNoBackupDirectory(), "/keystore");
|
||||
final String keydir = getKeyStorePath(getKeyUID(accountData));
|
||||
Log.d(TAG, "before migrateKeyStoreDir " + keydir);
|
||||
|
||||
File keydirFile = new File(keydir);
|
||||
if(!keydirFile.exists() || keydirFile.list().length == 0) {
|
||||
Log.d(TAG, "migrateKeyStoreDir");
|
||||
Statusgo.migrateKeyStoreDir(accountData, password, commonKeydir, keydir);
|
||||
Statusgo.initKeystore(keydir);
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
Log.e(TAG, "JSON conversion failed: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public boolean checkAvailability() {
|
||||
// We wait at least 10s for getCurrentActivity to return a value,
|
||||
// otherwise we give up
|
||||
for (int attempts = 0; attempts < 100; attempts++) {
|
||||
if (getCurrentActivity() != null) {
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
} catch (InterruptedException ex) {
|
||||
if (getCurrentActivity() != null) {
|
||||
return true;
|
||||
}
|
||||
Log.d(TAG, "Activity doesn't exist");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Log.d(TAG, "Activity doesn't exist");
|
||||
return false;
|
||||
}
|
||||
|
||||
public void executeRunnableStatusGoMethod(Supplier<String> method, Callback callback) throws JSONException {
|
||||
if (!checkAvailability()) {
|
||||
callback.invoke(false);
|
||||
return;
|
||||
}
|
||||
|
||||
Runnable runnableTask = () -> {
|
||||
String res = method.get();
|
||||
callback.invoke(res);
|
||||
};
|
||||
|
||||
StatusThreadPoolExecutor.getInstance().execute(runnableTask);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void validateMnemonic(final String seed, final Callback callback) throws JSONException {
|
||||
executeRunnableStatusGoMethod(() -> Statusgo.validateMnemonic(seed), callback);
|
||||
}
|
||||
|
||||
public Boolean is24Hour() {
|
||||
return android.text.format.DateFormat.is24HourFormat(this.reactContext.getApplicationContext());
|
||||
}
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
public String checkAddressChecksum(final String address) {
|
||||
return Statusgo.checkAddressChecksum(address);
|
||||
}
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
public String isAddress(final String address) {
|
||||
return Statusgo.isAddress(address);
|
||||
}
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
public String toChecksumAddress(final String address) {
|
||||
return Statusgo.toChecksumAddress(address);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
package im.status.ethereum.module
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Environment
|
||||
import com.facebook.react.bridge.Callback
|
||||
import com.facebook.react.bridge.ReactApplicationContext
|
||||
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
||||
import com.facebook.react.bridge.ReactMethod
|
||||
import android.util.Log
|
||||
import org.json.JSONException
|
||||
import org.json.JSONObject
|
||||
import java.io.File
|
||||
import java.util.function.Supplier
|
||||
import statusgo.Statusgo
|
||||
|
||||
class Utils(private val reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {
|
||||
|
||||
companion object {
|
||||
private const val gethLogFileName = "geth.log"
|
||||
private const val TAG = "Utils"
|
||||
}
|
||||
|
||||
override fun getName(): String {
|
||||
return "Utils"
|
||||
}
|
||||
|
||||
fun getNoBackupDirectory(): String {
|
||||
return reactContext.noBackupFilesDir.absolutePath
|
||||
}
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
fun backupDisabledDataDir(): String {
|
||||
return getNoBackupDirectory()
|
||||
}
|
||||
|
||||
fun getPublicStorageDirectory(): File? {
|
||||
// Environment.getExternalStoragePublicDirectory doesn't work as expected on Android Q
|
||||
// https://developer.android.com/reference/android/os/Environment#getExternalStoragePublicDirectory(java.lang.String)
|
||||
return reactContext.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS)
|
||||
}
|
||||
|
||||
fun getLogsFile(): File {
|
||||
val pubDirectory = getPublicStorageDirectory()
|
||||
return File(pubDirectory, gethLogFileName)
|
||||
}
|
||||
|
||||
fun getKeyUID(json: String): String {
|
||||
val jsonObj = JSONObject(json)
|
||||
return jsonObj.getString("key-uid")
|
||||
}
|
||||
|
||||
fun pathCombine(path1: String, path2: String): String {
|
||||
val file = File(path1, path2)
|
||||
return file.absolutePath
|
||||
}
|
||||
|
||||
fun getKeyStorePath(keyUID: String): String {
|
||||
val commonKeydir = pathCombine(getNoBackupDirectory(), "/keystore")
|
||||
return pathCombine(commonKeydir, keyUID)
|
||||
}
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
fun keystoreDir(): String {
|
||||
val absRootDirPath = getNoBackupDirectory()
|
||||
return pathCombine(absRootDirPath, "keystore")
|
||||
}
|
||||
|
||||
fun migrateKeyStoreDir(accountData: String, password: String) {
|
||||
try {
|
||||
val commonKeydir = pathCombine(getNoBackupDirectory(), "/keystore")
|
||||
val keydir = getKeyStorePath(getKeyUID(accountData))
|
||||
Log.d(TAG, "before migrateKeyStoreDir $keydir")
|
||||
|
||||
val keydirFile = File(keydir)
|
||||
if (!keydirFile.exists() || keydirFile.list().isEmpty()) {
|
||||
Log.d(TAG, "migrateKeyStoreDir")
|
||||
Statusgo.migrateKeyStoreDir(accountData, password, commonKeydir, keydir)
|
||||
Statusgo.initKeystore(keydir)
|
||||
}
|
||||
} catch (e: JSONException) {
|
||||
Log.e(TAG, "JSON conversion failed: ${e.message}")
|
||||
}
|
||||
}
|
||||
|
||||
fun checkAvailability(): Boolean {
|
||||
// We wait at least 10s for getCurrentActivity to return a value,
|
||||
// otherwise we give up
|
||||
for (attempts in 0 until 100) {
|
||||
if (currentActivity != null) {
|
||||
return true
|
||||
}
|
||||
try {
|
||||
Thread.sleep(100)
|
||||
} catch (ex: InterruptedException) {
|
||||
if (currentActivity != null) {
|
||||
return true
|
||||
}
|
||||
Log.d(TAG, "Activity doesn't exist")
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
Log.d(TAG, "Activity doesn't exist")
|
||||
return false
|
||||
}
|
||||
|
||||
fun executeRunnableStatusGoMethod(method: Supplier<String>, callback: Callback) {
|
||||
if (!checkAvailability()) {
|
||||
callback.invoke(false)
|
||||
return
|
||||
}
|
||||
|
||||
val runnableTask = Runnable {
|
||||
val res = method.get()
|
||||
callback.invoke(res)
|
||||
}
|
||||
|
||||
StatusThreadPoolExecutor.getInstance().execute(runnableTask)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun validateMnemonic(seed: String, callback: Callback) {
|
||||
executeRunnableStatusGoMethod({ Statusgo.validateMnemonic(seed) }, callback)
|
||||
}
|
||||
|
||||
fun is24Hour(): Boolean {
|
||||
return android.text.format.DateFormat.is24HourFormat(reactContext.applicationContext)
|
||||
}
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
fun checkAddressChecksum(address: String): String {
|
||||
return Statusgo.checkAddressChecksum(address)
|
||||
}
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
fun isAddress(address: String): String {
|
||||
return Statusgo.isAddress(address)
|
||||
}
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
fun toChecksumAddress(address: String): String {
|
||||
return Statusgo.toChecksumAddress(address)
|
||||
}
|
||||
}
|
||||
@@ -162,7 +162,6 @@ com.afollestad.material-dialogs:core:0.9.6.0
|
||||
com.airbnb.android:lottie:3.4.4
|
||||
com.almworks.sqlite4java:sqlite4java:1.0.392
|
||||
com.android.databinding:baseLibrary:1.0-rc5
|
||||
com.android.databinding:baseLibrary:3.0.0
|
||||
com.android.databinding:baseLibrary:3.0.1
|
||||
com.android.databinding:baseLibrary:3.2.1
|
||||
com.android.databinding:baseLibrary:3.5.4
|
||||
@@ -172,7 +171,6 @@ com.android.databinding:baseLibrary:7.2.1
|
||||
com.android.databinding:baseLibrary:7.3.1
|
||||
com.android.databinding:baseLibrary:8.1.1
|
||||
com.android.databinding:compilerCommon:1.0-rc5
|
||||
com.android.databinding:compilerCommon:3.0.0
|
||||
com.android.databinding:compilerCommon:3.0.1
|
||||
com.android.tools.analytics-library:crash:26.2.1
|
||||
com.android.tools.analytics-library:crash:26.5.4
|
||||
@@ -181,7 +179,6 @@ com.android.tools.analytics-library:crash:30.0.4
|
||||
com.android.tools.analytics-library:crash:30.2.1
|
||||
com.android.tools.analytics-library:crash:30.3.1
|
||||
com.android.tools.analytics-library:crash:31.1.1
|
||||
com.android.tools.analytics-library:protos:26.0.0
|
||||
com.android.tools.analytics-library:protos:26.0.1
|
||||
com.android.tools.analytics-library:protos:26.2.1
|
||||
com.android.tools.analytics-library:protos:26.5.4
|
||||
@@ -190,7 +187,6 @@ com.android.tools.analytics-library:protos:30.0.4
|
||||
com.android.tools.analytics-library:protos:30.2.1
|
||||
com.android.tools.analytics-library:protos:30.3.1
|
||||
com.android.tools.analytics-library:protos:31.1.1
|
||||
com.android.tools.analytics-library:shared:26.0.0
|
||||
com.android.tools.analytics-library:shared:26.0.1
|
||||
com.android.tools.analytics-library:shared:26.2.1
|
||||
com.android.tools.analytics-library:shared:26.5.4
|
||||
@@ -199,7 +195,6 @@ com.android.tools.analytics-library:shared:30.0.4
|
||||
com.android.tools.analytics-library:shared:30.2.1
|
||||
com.android.tools.analytics-library:shared:30.3.1
|
||||
com.android.tools.analytics-library:shared:31.1.1
|
||||
com.android.tools.analytics-library:tracker:26.0.0
|
||||
com.android.tools.analytics-library:tracker:26.0.1
|
||||
com.android.tools.analytics-library:tracker:26.2.1
|
||||
com.android.tools.analytics-library:tracker:26.5.4
|
||||
@@ -229,7 +224,6 @@ com.android.tools.build:aaptcompiler:7.0.4
|
||||
com.android.tools.build:aaptcompiler:7.2.1
|
||||
com.android.tools.build:aaptcompiler:7.3.1
|
||||
com.android.tools.build:aaptcompiler:8.1.1
|
||||
com.android.tools.build:apksig:3.0.0
|
||||
com.android.tools.build:apksig:3.0.1
|
||||
com.android.tools.build:apksig:3.2.1
|
||||
com.android.tools.build:apksig:3.5.4
|
||||
@@ -247,7 +241,6 @@ com.android.tools.build:apkzlib:7.3.1
|
||||
com.android.tools.build:apkzlib:8.1.1
|
||||
com.android.tools.build:builder-model:1.3.1
|
||||
com.android.tools.build:builder-model:1.5.0
|
||||
com.android.tools.build:builder-model:3.0.0
|
||||
com.android.tools.build:builder-model:3.0.1
|
||||
com.android.tools.build:builder-model:3.2.1
|
||||
com.android.tools.build:builder-model:3.5.4
|
||||
@@ -258,7 +251,6 @@ com.android.tools.build:builder-model:7.3.1
|
||||
com.android.tools.build:builder-model:8.1.1
|
||||
com.android.tools.build:builder-test-api:1.3.1
|
||||
com.android.tools.build:builder-test-api:1.5.0
|
||||
com.android.tools.build:builder-test-api:3.0.0
|
||||
com.android.tools.build:builder-test-api:3.0.1
|
||||
com.android.tools.build:builder-test-api:3.2.1
|
||||
com.android.tools.build:builder-test-api:3.5.4
|
||||
@@ -269,7 +261,6 @@ com.android.tools.build:builder-test-api:7.3.1
|
||||
com.android.tools.build:builder-test-api:8.1.1
|
||||
com.android.tools.build:builder:1.3.1
|
||||
com.android.tools.build:builder:1.5.0
|
||||
com.android.tools.build:builder:3.0.0
|
||||
com.android.tools.build:builder:3.0.1
|
||||
com.android.tools.build:builder:3.2.1
|
||||
com.android.tools.build:builder:3.5.4
|
||||
@@ -285,7 +276,6 @@ com.android.tools.build:bundletool:1.6.0
|
||||
com.android.tools.build:bundletool:1.8.2
|
||||
com.android.tools.build:bundletool:1.9.0
|
||||
com.android.tools.build:bundletool:1.14.0
|
||||
com.android.tools.build:gradle-api:3.0.0
|
||||
com.android.tools.build:gradle-api:3.0.1
|
||||
com.android.tools.build:gradle-api:3.2.1
|
||||
com.android.tools.build:gradle-api:3.5.4
|
||||
@@ -296,12 +286,10 @@ com.android.tools.build:gradle-api:7.3.1
|
||||
com.android.tools.build:gradle-api:8.1.1
|
||||
com.android.tools.build:gradle-core:1.3.1
|
||||
com.android.tools.build:gradle-core:1.5.0
|
||||
com.android.tools.build:gradle-core:3.0.0
|
||||
com.android.tools.build:gradle-core:3.0.1
|
||||
com.android.tools.build:gradle-settings-api:8.1.1
|
||||
com.android.tools.build:gradle:1.3.1
|
||||
com.android.tools.build:gradle:1.5.0
|
||||
com.android.tools.build:gradle:3.0.0
|
||||
com.android.tools.build:gradle:3.0.1
|
||||
com.android.tools.build:gradle:3.2.1
|
||||
com.android.tools.build:gradle:3.5.4
|
||||
@@ -311,7 +299,6 @@ com.android.tools.build:gradle:7.2.1
|
||||
com.android.tools.build:gradle:7.3.1
|
||||
com.android.tools.build:manifest-merger:24.3.1
|
||||
com.android.tools.build:manifest-merger:24.5.0
|
||||
com.android.tools.build:manifest-merger:26.0.0
|
||||
com.android.tools.build:manifest-merger:26.0.1
|
||||
com.android.tools.build:manifest-merger:26.2.1
|
||||
com.android.tools.build:manifest-merger:26.5.4
|
||||
@@ -324,7 +311,6 @@ com.android.tools.build:transform-api:1.5.0
|
||||
com.android.tools.build:transform-api:2.0.0-deprecated-use-gradle-api
|
||||
com.android.tools.ddms:ddmlib:24.3.1
|
||||
com.android.tools.ddms:ddmlib:24.5.0
|
||||
com.android.tools.ddms:ddmlib:26.0.0
|
||||
com.android.tools.ddms:ddmlib:26.0.1
|
||||
com.android.tools.ddms:ddmlib:26.2.1
|
||||
com.android.tools.ddms:ddmlib:26.5.4
|
||||
@@ -333,16 +319,13 @@ com.android.tools.ddms:ddmlib:30.0.4
|
||||
com.android.tools.ddms:ddmlib:30.2.1
|
||||
com.android.tools.ddms:ddmlib:30.3.1
|
||||
com.android.tools.ddms:ddmlib:31.1.1
|
||||
com.android.tools.external.com-intellij:intellij-core:26.0.0
|
||||
com.android.tools.external.com-intellij:intellij-core:26.0.1
|
||||
com.android.tools.external.lombok:lombok-ast:0.2.3
|
||||
com.android.tools.external.org-jetbrains:uast:26.0.0
|
||||
com.android.tools.external.org-jetbrains:uast:26.0.1
|
||||
com.android.tools.jack:jack-api:0.9.0
|
||||
com.android.tools.jill:jill-api:0.9.0
|
||||
com.android.tools.layoutlib:layoutlib-api:24.3.1
|
||||
com.android.tools.layoutlib:layoutlib-api:24.5.0
|
||||
com.android.tools.layoutlib:layoutlib-api:26.0.0
|
||||
com.android.tools.layoutlib:layoutlib-api:26.0.1
|
||||
com.android.tools.layoutlib:layoutlib-api:26.2.1
|
||||
com.android.tools.layoutlib:layoutlib-api:26.5.4
|
||||
@@ -353,11 +336,9 @@ com.android.tools.layoutlib:layoutlib-api:30.3.1
|
||||
com.android.tools.layoutlib:layoutlib-api:31.1.1
|
||||
com.android.tools.lint:lint-api:24.3.1
|
||||
com.android.tools.lint:lint-api:24.5.0
|
||||
com.android.tools.lint:lint-api:26.0.0
|
||||
com.android.tools.lint:lint-api:26.0.1
|
||||
com.android.tools.lint:lint-checks:24.3.1
|
||||
com.android.tools.lint:lint-checks:24.5.0
|
||||
com.android.tools.lint:lint-checks:26.0.0
|
||||
com.android.tools.lint:lint-checks:26.0.1
|
||||
com.android.tools.lint:lint-gradle-api:26.2.1
|
||||
com.android.tools.lint:lint-gradle-api:26.5.4
|
||||
@@ -372,7 +353,6 @@ com.android.tools.lint:lint-typedef-remover:30.3.1
|
||||
com.android.tools.lint:lint-typedef-remover:31.1.1
|
||||
com.android.tools.lint:lint:24.3.1
|
||||
com.android.tools.lint:lint:24.5.0
|
||||
com.android.tools.lint:lint:26.0.0
|
||||
com.android.tools.lint:lint:26.0.1
|
||||
com.android.tools.utp:android-device-provider-ddmlib-proto:30.2.1
|
||||
com.android.tools.utp:android-device-provider-ddmlib-proto:30.3.1
|
||||
@@ -400,7 +380,6 @@ com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.3.1
|
||||
com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:31.1.1
|
||||
com.android.tools:annotations:24.3.1
|
||||
com.android.tools:annotations:24.5.0
|
||||
com.android.tools:annotations:26.0.0
|
||||
com.android.tools:annotations:26.0.1
|
||||
com.android.tools:annotations:26.2.1
|
||||
com.android.tools:annotations:26.5.4
|
||||
@@ -411,7 +390,6 @@ com.android.tools:annotations:30.3.1
|
||||
com.android.tools:annotations:31.1.1
|
||||
com.android.tools:common:24.3.1
|
||||
com.android.tools:common:24.5.0
|
||||
com.android.tools:common:26.0.0
|
||||
com.android.tools:common:26.0.1
|
||||
com.android.tools:common:26.2.1
|
||||
com.android.tools:common:26.5.4
|
||||
@@ -422,7 +400,6 @@ com.android.tools:common:30.3.1
|
||||
com.android.tools:common:31.1.1
|
||||
com.android.tools:dvlib:24.3.1
|
||||
com.android.tools:dvlib:24.5.0
|
||||
com.android.tools:dvlib:26.0.0
|
||||
com.android.tools:dvlib:26.0.1
|
||||
com.android.tools:dvlib:26.2.1
|
||||
com.android.tools:dvlib:26.5.4
|
||||
@@ -431,7 +408,6 @@ com.android.tools:dvlib:30.0.4
|
||||
com.android.tools:dvlib:30.2.1
|
||||
com.android.tools:dvlib:30.3.1
|
||||
com.android.tools:dvlib:31.1.1
|
||||
com.android.tools:repository:26.0.0
|
||||
com.android.tools:repository:26.0.1
|
||||
com.android.tools:repository:26.2.1
|
||||
com.android.tools:repository:26.5.4
|
||||
@@ -442,7 +418,6 @@ com.android.tools:repository:30.3.1
|
||||
com.android.tools:repository:31.1.1
|
||||
com.android.tools:sdklib:24.3.1
|
||||
com.android.tools:sdklib:24.5.0
|
||||
com.android.tools:sdklib:26.0.0
|
||||
com.android.tools:sdklib:26.0.1
|
||||
com.android.tools:sdklib:26.2.1
|
||||
com.android.tools:sdklib:26.5.4
|
||||
@@ -453,7 +428,6 @@ com.android.tools:sdklib:30.3.1
|
||||
com.android.tools:sdklib:31.1.1
|
||||
com.android.tools:sdk-common:24.3.1
|
||||
com.android.tools:sdk-common:24.5.0
|
||||
com.android.tools:sdk-common:26.0.0
|
||||
com.android.tools:sdk-common:26.0.1
|
||||
com.android.tools:sdk-common:26.2.1
|
||||
com.android.tools:sdk-common:26.5.4
|
||||
|
||||
@@ -179,7 +179,6 @@ https://dl.google.com/dl/android/maven2/androidx/webkit/webkit/1.4.0/webkit-1.4.
|
||||
https://dl.google.com/dl/android/maven2/android/arch/core/common/1.0.0/common-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/android/arch/lifecycle/common/1.0.0/common-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/android/arch/lifecycle/runtime/1.0.0/runtime-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/3.0.0/baseLibrary-3.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/3.0.1/baseLibrary-3.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/3.2.1/baseLibrary-3.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/3.5.4/baseLibrary-3.5.4.pom
|
||||
@@ -188,7 +187,6 @@ https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/7.0.
|
||||
https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/7.2.1/baseLibrary-7.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/7.3.1/baseLibrary-7.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/8.1.1/baseLibrary-8.1.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/databinding/compilerCommon/3.0.0/compilerCommon-3.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/databinding/compilerCommon/3.0.1/compilerCommon-3.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/signflinger/4.1.0/signflinger-4.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/signflinger/7.0.4/signflinger-7.0.4.pom
|
||||
@@ -222,7 +220,6 @@ https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/cras
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/crash/30.2.1/crash-30.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/crash/30.3.1/crash-30.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/crash/31.1.1/crash-31.1.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/26.0.0/protos-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/26.0.1/protos-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/26.2.1/protos-26.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/26.5.4/protos-26.5.4.pom
|
||||
@@ -231,7 +228,6 @@ https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/prot
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/30.2.1/protos-30.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/30.3.1/protos-30.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/31.1.1/protos-31.1.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shared/26.0.0/shared-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shared/26.0.1/shared-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shared/26.2.1/shared-26.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shared/26.5.4/shared-26.5.4.pom
|
||||
@@ -240,7 +236,6 @@ https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shar
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shared/30.2.1/shared-30.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shared/30.3.1/shared-30.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shared/31.1.1/shared-31.1.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/tracker/26.0.0/tracker-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/tracker/26.0.1/tracker-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/tracker/26.2.1/tracker-26.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/tracker/26.5.4/tracker-26.5.4.pom
|
||||
@@ -249,7 +244,6 @@ https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/trac
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/tracker/30.2.1/tracker-30.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/tracker/30.3.1/tracker-30.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/tracker/31.1.1/tracker-31.1.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/annotations/26.0.0/annotations-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/annotations/26.0.1/annotations-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/annotations/26.2.1/annotations-26.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/annotations/26.5.4/annotations-26.5.4.pom
|
||||
@@ -274,7 +268,6 @@ https://dl.google.com/dl/android/maven2/com/android/tools/build/aaptcompiler/7.0
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/aaptcompiler/7.2.1/aaptcompiler-7.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/aaptcompiler/7.3.1/aaptcompiler-7.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/aaptcompiler/8.1.1/aaptcompiler-8.1.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/apksig/3.0.0/apksig-3.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/apksig/3.0.1/apksig-3.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/apksig/3.2.1/apksig-3.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/apksig/3.5.4/apksig-3.5.4.pom
|
||||
@@ -290,7 +283,6 @@ https://dl.google.com/dl/android/maven2/com/android/tools/build/apkzlib/7.0.4/ap
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/apkzlib/7.2.1/apkzlib-7.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/apkzlib/7.3.1/apkzlib-7.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/apkzlib/8.1.1/apkzlib-8.1.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-model/3.0.0/builder-model-3.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-model/3.0.1/builder-model-3.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-model/3.2.1/builder-model-3.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-model/3.5.4/builder-model-3.5.4.pom
|
||||
@@ -299,7 +291,6 @@ https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-model/7.
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-model/7.2.1/builder-model-7.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-model/7.3.1/builder-model-7.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-model/8.1.1/builder-model-8.1.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-test-api/3.0.0/builder-test-api-3.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-test-api/3.0.1/builder-test-api-3.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-test-api/3.2.1/builder-test-api-3.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-test-api/3.5.4/builder-test-api-3.5.4.pom
|
||||
@@ -308,7 +299,6 @@ https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-test-api
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-test-api/7.2.1/builder-test-api-7.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-test-api/7.3.1/builder-test-api-7.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-test-api/8.1.1/builder-test-api-8.1.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.0.0/builder-3.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.0.1/builder-3.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.2.1/builder-3.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.5.4/builder-3.5.4.pom
|
||||
@@ -324,7 +314,6 @@ https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/1.6.0
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/1.8.2/bundletool-1.8.2.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/1.9.0/bundletool-1.9.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/1.14.0/bundletool-1.14.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-api/3.0.0/gradle-api-3.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-api/3.0.1/gradle-api-3.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-api/3.2.1/gradle-api-3.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-api/3.5.4/gradle-api-3.5.4.pom
|
||||
@@ -333,10 +322,8 @@ https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-api/7.0.4
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-api/7.2.1/gradle-api-7.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-api/7.3.1/gradle-api-7.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-api/8.1.1/gradle-api-8.1.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-core/3.0.0/gradle-core-3.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-core/3.0.1/gradle-core-3.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-settings-api/8.1.1/gradle-settings-api-8.1.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.4/gradle-3.5.4.pom
|
||||
@@ -353,7 +340,6 @@ https://dl.google.com/dl/android/maven2/com/android/tools/build/jetifier/jetifie
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/jetifier/jetifier-processor/1.0.0-beta04/jetifier-processor-1.0.0-beta04.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/jetifier/jetifier-processor/1.0.0-beta09/jetifier-processor-1.0.0-beta09.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/jetifier/jetifier-processor/1.0.0-beta10/jetifier-processor-1.0.0-beta10.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/manifest-merger/26.0.0/manifest-merger-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/manifest-merger/26.0.1/manifest-merger-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/manifest-merger/26.2.1/manifest-merger-26.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/manifest-merger/26.5.4/manifest-merger-26.5.4.pom
|
||||
@@ -362,7 +348,6 @@ https://dl.google.com/dl/android/maven2/com/android/tools/build/manifest-merger/
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/manifest-merger/30.2.1/manifest-merger-30.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/manifest-merger/30.3.1/manifest-merger-30.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/manifest-merger/31.1.1/manifest-merger-31.1.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/common/26.0.0/common-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/common/26.0.1/common-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/common/26.2.1/common-26.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/common/26.5.4/common-26.5.4.pom
|
||||
@@ -371,7 +356,6 @@ https://dl.google.com/dl/android/maven2/com/android/tools/common/30.0.4/common-3
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/common/30.2.1/common-30.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/common/30.3.1/common-30.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/common/31.1.1/common-31.1.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/ddms/ddmlib/26.0.0/ddmlib-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/ddms/ddmlib/26.0.1/ddmlib-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/ddms/ddmlib/26.2.1/ddmlib-26.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/ddms/ddmlib/26.5.4/ddmlib-26.5.4.pom
|
||||
@@ -380,7 +364,6 @@ https://dl.google.com/dl/android/maven2/com/android/tools/ddms/ddmlib/30.0.4/ddm
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/ddms/ddmlib/30.2.1/ddmlib-30.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/ddms/ddmlib/30.3.1/ddmlib-30.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/ddms/ddmlib/31.1.1/ddmlib-31.1.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/dvlib/26.0.0/dvlib-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/dvlib/26.0.1/dvlib-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/dvlib/26.2.1/dvlib-26.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/dvlib/26.5.4/dvlib-26.5.4.pom
|
||||
@@ -389,14 +372,11 @@ https://dl.google.com/dl/android/maven2/com/android/tools/dvlib/30.0.4/dvlib-30.
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/dvlib/30.2.1/dvlib-30.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/dvlib/30.3.1/dvlib-30.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/dvlib/31.1.1/dvlib-31.1.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/external/com-intellij/intellij-core/26.0.0/intellij-core-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/external/com-intellij/intellij-core/26.0.1/intellij-core-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/external/com-intellij/intellij-core/31.1.1/intellij-core-31.1.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/external/com-intellij/kotlin-compiler/31.1.1/kotlin-compiler-31.1.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/external/org-jetbrains/uast/26.0.0/uast-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/external/org-jetbrains/uast/26.0.1/uast-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/external/org-jetbrains/uast/31.1.1/uast-31.1.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/layoutlib/layoutlib-api/26.0.0/layoutlib-api-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/layoutlib/layoutlib-api/26.0.1/layoutlib-api-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/layoutlib/layoutlib-api/26.2.1/layoutlib-api-26.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/layoutlib/layoutlib-api/26.5.4/layoutlib-api-26.5.4.pom
|
||||
@@ -405,10 +385,8 @@ https://dl.google.com/dl/android/maven2/com/android/tools/layoutlib/layoutlib-ap
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/layoutlib/layoutlib-api/30.2.1/layoutlib-api-30.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/layoutlib/layoutlib-api/30.3.1/layoutlib-api-30.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/layoutlib/layoutlib-api/31.1.1/layoutlib-api-31.1.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-api/26.0.0/lint-api-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-api/26.0.1/lint-api-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-api/31.1.1/lint-api-31.1.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-checks/26.0.0/lint-checks-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-checks/26.0.1/lint-checks-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-checks/31.1.1/lint-checks-31.1.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle-api/26.2.1/lint-gradle-api-26.2.1.pom
|
||||
@@ -423,11 +401,9 @@ https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-model/31.1.1
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-typedef-remover/30.2.1/lint-typedef-remover-30.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-typedef-remover/30.3.1/lint-typedef-remover-30.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-typedef-remover/31.1.1/lint-typedef-remover-31.1.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint/26.0.0/lint-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint/26.0.1/lint-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint/31.1.1/lint-31.1.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/play-sdk-proto/31.1.1/play-sdk-proto-31.1.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/repository/26.0.0/repository-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/repository/26.0.1/repository-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/repository/26.2.1/repository-26.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/repository/26.5.4/repository-26.5.4.pom
|
||||
@@ -436,7 +412,6 @@ https://dl.google.com/dl/android/maven2/com/android/tools/repository/30.0.4/repo
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/repository/30.2.1/repository-30.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/repository/30.3.1/repository-30.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/repository/31.1.1/repository-31.1.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/26.0.0/sdklib-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/26.0.1/sdklib-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/26.2.1/sdklib-26.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/26.5.4/sdklib-26.5.4.pom
|
||||
@@ -445,7 +420,6 @@ https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/30.0.4/sdklib-3
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/30.2.1/sdklib-30.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/30.3.1/sdklib-30.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/31.1.1/sdklib-31.1.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/26.0.0/sdk-common-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/26.0.1/sdk-common-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/26.2.1/sdk-common-26.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/26.5.4/sdk-common-26.5.4.pom
|
||||
@@ -527,10 +501,10 @@ https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.10/commons-co
|
||||
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.16.1/commons-codec-1.16.1.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.15.1/commons-io-2.15.1.pom
|
||||
https://repo.maven.apache.org/maven2/commons-io/commons-io/2.16.0/commons-io-2.16.0.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.0/commons-logging-1.3.0.pom
|
||||
https://repo.maven.apache.org/maven2/commons-logging/commons-logging/1.3.1/commons-logging-1.3.1.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
|
||||
@@ -630,22 +604,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.0-rc1/jackson-annotations-2.17.0-rc1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.17.0/jackson-annotations-2.17.0.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.0-rc1/jackson-core-2.17.0-rc1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-core/2.17.0/jackson-core-2.17.0.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.0-rc1/jackson-databind-2.17.0-rc1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.17.0/jackson-databind-2.17.0.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.0-rc1/jackson-base-2.17.0-rc1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-base/2.17.0/jackson-base-2.17.0.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.0-rc1/jackson-bom-2.17.0-rc1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-bom/2.17.0/jackson-bom-2.17.0.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-rc1/jackson-parent-2.17-rc1.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.0-rc1/jackson-modules-base-2.17.0-rc1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-modules-base/2.17.0/jackson-modules-base-2.17.0.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.0-rc1/jackson-module-jaxb-annotations-2.17.0-rc1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.17.0/jackson-module-jaxb-annotations-2.17.0.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
|
||||
@@ -713,7 +687,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.9.0/error_prone_annotations-2.9.0.pom
|
||||
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.25.0/error_prone_annotations-2.25.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.26.1/error_prone_annotations-2.26.1.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
|
||||
@@ -725,7 +699,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.9.0/error_prone_parent-2.9.0.pom
|
||||
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.25.0/error_prone_parent-2.25.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.26.1/error_prone_parent-2.26.1.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
|
||||
@@ -742,8 +716,8 @@ https://repo.maven.apache.org/maven2/com/google/guava/guava-parent/30.1-jre/guav
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava-parent/31.0.1-android/guava-parent-31.0.1-android.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava-parent/31.0.1-jre/guava-parent-31.0.1-jre.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava-parent/31.1-jre/guava-parent-31.1-jre.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava-parent/33.0.0-jre/guava-parent-33.0.0-jre.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava-testlib/33.0.0-jre/guava-testlib-33.0.0-jre.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava-parent/33.1.0-jre/guava-parent-33.1.0-jre.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava-testlib/33.1.0-jre/guava-testlib-33.1.0-jre.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava/17.0/guava-17.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava/22.0/guava-22.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava/23.0/guava-23.0.pom
|
||||
@@ -756,12 +730,12 @@ https://repo.maven.apache.org/maven2/com/google/guava/guava/30.1-jre/guava-30.1-
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava/31.0.1-android/guava-31.0.1-android.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava/31.0.1-jre/guava-31.0.1-jre.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava/31.1-jre/guava-31.1-jre.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava/33.0.0-jre/guava-33.0.0-jre.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava/33.1.0-jre/guava-33.1.0-jre.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/listenablefuture/1.0/listenablefuture-1.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/j2objc/j2objc-annotations/2.8/j2objc-annotations-2.8.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/j2objc/j2objc-annotations/3.0.0/j2objc-annotations-3.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/jimfs/jimfs-parent/1.1/jimfs-parent-1.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/jimfs/jimfs/1.1/jimfs-1.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-bom/3.7.1/protobuf-bom-3.7.1.pom
|
||||
@@ -770,7 +744,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.26.0-RC3/protobuf-bom-4.26.0-RC3.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-bom/4.26.1/protobuf-bom-4.26.1.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
|
||||
@@ -787,7 +761,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.26.0-RC3/protobuf-java-4.26.0-RC3.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/4.26.1/protobuf-java-4.26.1.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
|
||||
@@ -798,7 +772,7 @@ 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.26.0-RC3/protobuf-parent-4.26.0-RC3.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/4.26.1/protobuf-parent-4.26.1.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
|
||||
@@ -815,7 +789,7 @@ https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp/3.12.1/okhttp-3
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp/4.9.2/okhttp-4.9.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/parent/3.9.1/parent-3.9.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/parent/3.12.1/parent-3.12.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio-jvm/3.8.0/okio-jvm-3.8.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio-jvm/3.9.0/okio-jvm-3.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio-metadata/2.8.0/okio-metadata-2.8.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio-parent/1.13.0/okio-parent-1.13.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio-parent/1.15.0/okio-parent-1.15.0.pom
|
||||
@@ -825,7 +799,7 @@ https://repo.maven.apache.org/maven2/com/squareup/okio/okio/1.15.0/okio-1.15.0.p
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio/1.17.4/okio-1.17.4.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.8.0/okio-2.8.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.9.0/okio-2.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio/3.8.0/okio-3.8.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio/3.9.0/okio-3.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/activation/all/1.2.0/all-1.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/activation/all/1.2.1/all-1.2.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/activation/all/1.2.2/all-1.2.2.pom
|
||||
@@ -841,18 +815,18 @@ https://repo.maven.apache.org/maven2/com/sun/istack/istack-commons/4.2.0/istack-
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/jaxb-bom-ext/2.2.11/jaxb-bom-ext-2.2.11.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/jaxb-bom-ext/2.3.1/jaxb-bom-ext-2.3.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/jaxb-bom-ext/2.3.2/jaxb-bom-ext-2.3.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/jaxb-bom-ext/4.0.4/jaxb-bom-ext-4.0.4.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/jaxb-bom-ext/4.0.5/jaxb-bom-ext-4.0.5.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-parent/2.2.11/jaxb-parent-2.2.11.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-parent/2.3.1/jaxb-parent-2.3.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-parent/2.3.2/jaxb-parent-2.3.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-parent/4.0.4/jaxb-parent-4.0.4.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-parent/4.0.5/jaxb-parent-4.0.5.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-runtime-parent/2.2.11/jaxb-runtime-parent-2.2.11.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-runtime-parent/2.3.1/jaxb-runtime-parent-2.3.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-runtime-parent/2.3.2/jaxb-runtime-parent-2.3.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-txw-parent/2.2.11/jaxb-txw-parent-2.2.11.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-txw-parent/2.3.1/jaxb-txw-parent-2.3.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-txw-parent/2.3.2/jaxb-txw-parent-2.3.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-txw-parent/4.0.4/jaxb-txw-parent-4.0.4.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-txw-parent/4.0.5/jaxb-txw-parent-4.0.5.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/fastinfoset/FastInfoset/1.2.13/FastInfoset-1.2.13.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/fastinfoset/FastInfoset/1.2.15/FastInfoset-1.2.15.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/fastinfoset/FastInfoset/1.2.16/FastInfoset-1.2.16.pom
|
||||
@@ -931,9 +905,9 @@ https://repo.maven.apache.org/maven2/io/netty/netty-resolver/4.1.52.Final/netty-
|
||||
https://repo.maven.apache.org/maven2/io/netty/netty-resolver/4.1.72.Final/netty-resolver-4.1.72.Final.pom
|
||||
https://repo.maven.apache.org/maven2/io/netty/netty-resolver/5.0.0.Alpha2/netty-resolver-5.0.0.Alpha2.pom
|
||||
https://repo.maven.apache.org/maven2/io/netty/netty-tcnative-classes/2.0.46.Final/netty-tcnative-classes-2.0.46.Final.pom
|
||||
https://repo.maven.apache.org/maven2/io/netty/netty-tcnative-classes/2.0.63.Final/netty-tcnative-classes-2.0.63.Final.pom
|
||||
https://repo.maven.apache.org/maven2/io/netty/netty-tcnative-classes/2.0.65.Final/netty-tcnative-classes-2.0.65.Final.pom
|
||||
https://repo.maven.apache.org/maven2/io/netty/netty-tcnative-parent/2.0.46.Final/netty-tcnative-parent-2.0.46.Final.pom
|
||||
https://repo.maven.apache.org/maven2/io/netty/netty-tcnative-parent/2.0.63.Final/netty-tcnative-parent-2.0.63.Final.pom
|
||||
https://repo.maven.apache.org/maven2/io/netty/netty-tcnative-parent/2.0.65.Final/netty-tcnative-parent-2.0.65.Final.pom
|
||||
https://repo.maven.apache.org/maven2/io/netty/netty-transport/4.1.34.Final/netty-transport-4.1.34.Final.pom
|
||||
https://repo.maven.apache.org/maven2/io/netty/netty-transport/4.1.52.Final/netty-transport-4.1.52.Final.pom
|
||||
https://repo.maven.apache.org/maven2/io/netty/netty-transport/4.1.72.Final/netty-transport-4.1.72.Final.pom
|
||||
@@ -947,9 +921,9 @@ https://repo.maven.apache.org/maven2/jakarta/activation/jakarta.activation-api/1
|
||||
https://repo.maven.apache.org/maven2/jakarta/activation/jakarta.activation-api/1.2.2/jakarta.activation-api-1.2.2.pom
|
||||
https://repo.maven.apache.org/maven2/jakarta/activation/jakarta.activation-api/2.1.3/jakarta.activation-api-2.1.3.pom
|
||||
https://repo.maven.apache.org/maven2/jakarta/xml/bind/jakarta.xml.bind-api-parent/2.3.2/jakarta.xml.bind-api-parent-2.3.2.pom
|
||||
https://repo.maven.apache.org/maven2/jakarta/xml/bind/jakarta.xml.bind-api-parent/4.0.1/jakarta.xml.bind-api-parent-4.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/jakarta/xml/bind/jakarta.xml.bind-api-parent/4.0.2/jakarta.xml.bind-api-parent-4.0.2.pom
|
||||
https://repo.maven.apache.org/maven2/jakarta/xml/bind/jakarta.xml.bind-api/2.3.2/jakarta.xml.bind-api-2.3.2.pom
|
||||
https://repo.maven.apache.org/maven2/jakarta/xml/bind/jakarta.xml.bind-api/4.0.1/jakarta.xml.bind-api-4.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/jakarta/xml/bind/jakarta.xml.bind-api/4.0.2/jakarta.xml.bind-api-4.0.2.pom
|
||||
https://repo.maven.apache.org/maven2/javax/activation/activation/1.1/activation-1.1.pom
|
||||
https://repo.maven.apache.org/maven2/javax/activation/javax.activation-api/1.2.0/javax.activation-api-1.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.pom
|
||||
@@ -1036,8 +1010,8 @@ https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/39/common
|
||||
https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/42/commons-parent-42.pom
|
||||
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/65/commons-parent-65.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/66/commons-parent-66.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/67/commons-parent-67.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
|
||||
@@ -1123,7 +1097,6 @@ https://repo.maven.apache.org/maven2/org/eclipse/ee4j/project/1.0.2/project-1.0.
|
||||
https://repo.maven.apache.org/maven2/org/eclipse/ee4j/project/1.0.5/project-1.0.5.pom
|
||||
https://repo.maven.apache.org/maven2/org/eclipse/ee4j/project/1.0.6/project-1.0.6.pom
|
||||
https://repo.maven.apache.org/maven2/org/eclipse/ee4j/project/1.0.7/project-1.0.7.pom
|
||||
https://repo.maven.apache.org/maven2/org/eclipse/ee4j/project/1.0.8/project-1.0.8.pom
|
||||
https://repo.maven.apache.org/maven2/org/eclipse/ee4j/project/1.0.9/project-1.0.9.pom
|
||||
https://repo.maven.apache.org/maven2/org/eclipse/jdt/core/compiler/ecj/4.4.2/ecj-4.4.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/eclipse/jdt/core/compiler/ecj/4.6.1/ecj-4.6.1.pom
|
||||
@@ -1137,16 +1110,16 @@ https://repo.maven.apache.org/maven2/org/fusesource/jansi/jansi/1.18/jansi-1.18.
|
||||
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-bom/2.2.11/jaxb-bom-2.2.11.pom
|
||||
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-bom/2.3.1/jaxb-bom-2.3.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-bom/2.3.2/jaxb-bom-2.3.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-bom/4.0.4/jaxb-bom-4.0.4.pom
|
||||
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-bom/4.0.5/jaxb-bom-4.0.5.pom
|
||||
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-core/2.2.11/jaxb-core-2.2.11.pom
|
||||
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-core/4.0.4/jaxb-core-4.0.4.pom
|
||||
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-core/4.0.5/jaxb-core-4.0.5.pom
|
||||
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-runtime/2.2.11/jaxb-runtime-2.2.11.pom
|
||||
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-runtime/2.3.1/jaxb-runtime-2.3.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-runtime/2.3.2/jaxb-runtime-2.3.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/txw2/2.2.11/txw2-2.2.11.pom
|
||||
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/txw2/2.3.1/txw2-2.3.1.pom
|
||||
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.4/txw2-4.0.4.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/2.2/hamcrest-core-2.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-parent/1.3/hamcrest-parent-1.3.pom
|
||||
@@ -1250,7 +1223,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.0-Beta4/kotlin-reflect-2.0.0-Beta4.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/2.0.0-Beta5/kotlin-reflect-2.0.0-Beta5.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
|
||||
@@ -1352,7 +1325,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.0-Beta4/kotlin-stdlib-2.0.0-Beta4.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/2.0.0-Beta5/kotlin-stdlib-2.0.0-Beta5.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
|
||||
@@ -1391,14 +1364,14 @@ https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/7.0/asm-analysis-7
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/8.0.1/asm-analysis-8.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/9.1/asm-analysis-9.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/9.2/asm-analysis-9.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-bom/9.6/asm-bom-9.6.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-bom/9.7/asm-bom-9.7.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/5.1/asm-commons-5.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/6.0/asm-commons-6.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/7.0/asm-commons-7.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/8.0.1/asm-commons-8.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/9.1/asm-commons-9.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/9.2/asm-commons-9.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/9.6/asm-commons-9.6.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/9.7/asm-commons-9.7.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-debug-all/5.0.1/asm-debug-all-5.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-debug-all/6.0_BETA/asm-debug-all-6.0_BETA.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-parent/5.0.1/asm-parent-5.0.1.pom
|
||||
@@ -1413,7 +1386,7 @@ https://repo.maven.apache.org/maven2/org/ow2/asm/asm-tree/7.0/asm-tree-7.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-tree/8.0.1/asm-tree-8.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-tree/9.1/asm-tree-9.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-tree/9.2/asm-tree-9.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-tree/9.6/asm-tree-9.6.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-tree/9.7/asm-tree-9.7.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-util/5.1/asm-util-5.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-util/6.0/asm-util-6.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-util/7.0/asm-util-7.0.pom
|
||||
@@ -1427,7 +1400,7 @@ https://repo.maven.apache.org/maven2/org/ow2/asm/asm/7.0/asm-7.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm/8.0.1/asm-8.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm/9.1/asm-9.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm/9.2/asm-9.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm/9.6/asm-9.6.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm/9.7/asm-9.7.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/ow2/1.5.1/ow2-1.5.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/ow2/1.5/ow2-1.5.pom
|
||||
|
||||
@@ -16,12 +16,10 @@ react-native-dialogs
|
||||
react-native-fast-image
|
||||
react-native-fs
|
||||
react-native-gesture-handler
|
||||
react-native-haptic-feedback
|
||||
react-native-hole-view
|
||||
react-native-image-crop-picker
|
||||
react-native-image-resizer
|
||||
react-native-keychain
|
||||
react-native-languages
|
||||
react-native-linear-gradient
|
||||
react-native-lottie-splash-screen
|
||||
react-native-mail
|
||||
@@ -29,7 +27,6 @@ react-native-navigation
|
||||
react-native-nfc-manager
|
||||
react-native-orientation-locker
|
||||
react-native-permissions
|
||||
react-native-randombytes
|
||||
react-native-reanimated
|
||||
react-native-shake
|
||||
react-native-share
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
|
||||
{ stdenv, deps, nodejs, patchMavenSources }:
|
||||
|
||||
let
|
||||
patchesDir = ./../../../patches;
|
||||
patches = builtins.attrNames (builtins.readDir patchesDir);
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "${deps.nodejs.name}-patched";
|
||||
phases = [
|
||||
"unpackPhase"
|
||||
"patchGradlePhase"
|
||||
"patchBuildIdPhase"
|
||||
"patchKeyChainPhase"
|
||||
"patchGlogPhase"
|
||||
"patchNativeNavigationPhase"
|
||||
"patchRNScriptPhase"
|
||||
"patchNodeLibsPhase"
|
||||
"installPhase"
|
||||
];
|
||||
|
||||
@@ -50,49 +50,15 @@ stdenv.mkDerivation {
|
||||
done
|
||||
'';
|
||||
|
||||
# Do not add a BuildId to the generated libraries, for reproducibility
|
||||
patchBuildIdPhase = ''
|
||||
substituteInPlace ./node_modules/react-native/ReactAndroid/src/main/jni/CMakeLists.txt --replace \
|
||||
'-Wl,--build-id' \
|
||||
'-Wl,--build-id=none'
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -R node_modules $out/
|
||||
'';
|
||||
|
||||
# Remove gradle-test-logger-plugin:
|
||||
# https://github.com/oblador/react-native-keychain/issues/595
|
||||
# TODO: remove this patch when we this library fixes above issue
|
||||
patchKeyChainPhase = ''
|
||||
sed -i -e '/classpath/d' \
|
||||
-e '/apply plugin: "com\.adarshr\.test-logger"/d' \
|
||||
./node_modules/react-native-keychain/android/build.gradle
|
||||
'';
|
||||
|
||||
# Fix pod issue after upgrading to MacOS Sonoma and Xcode 15
|
||||
# https://github.com/status-im/status-mobile/issues/17682
|
||||
patchGlogPhase = ''
|
||||
substituteInPlace ./node_modules/react-native/scripts/ios-configure-glog.sh \
|
||||
--replace 'export CC="' '#export CC="' \
|
||||
--replace 'export CXX="' '#export CXX="'
|
||||
'';
|
||||
|
||||
# https://github.com/wix/react-native-navigation/issues/7819
|
||||
patchNativeNavigationPhase = ''
|
||||
substituteInPlace ./node_modules/react-native-navigation/lib/android/app/build.gradle \
|
||||
--replace 'JavaVersion.VERSION_1_8' 'JavaVersion.VERSION_17'
|
||||
|
||||
substituteInPlace ./node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/button/ButtonPresenter.kt \
|
||||
--replace 'host: View?,' 'host: View,' \
|
||||
--replace 'info: AccessibilityNodeInfoCompat?' 'info: AccessibilityNodeInfoCompat'
|
||||
'';
|
||||
|
||||
# to fix https://github.com/status-im/status-mobile/issues/18548
|
||||
patchRNScriptPhase = ''
|
||||
substituteInPlace ./node_modules/react-native/scripts/react_native_pods_utils/script_phases.sh \
|
||||
--replace 'cp -R -X' 'cp -R'
|
||||
patchNodeLibsPhase = ''
|
||||
for patch in ${toString patches}; do
|
||||
patch -p1 < ${patchesDir}/$patch
|
||||
done
|
||||
'';
|
||||
|
||||
# The ELF types are incompatible with the host platform, so let's not even try
|
||||
|
||||
@@ -27,7 +27,6 @@ deps node_modules
|
||||
> ls node_modules | grep react-native-image
|
||||
react-native-image-crop-picker
|
||||
react-native-image-resizer
|
||||
react-native-image-viewing
|
||||
```
|
||||
|
||||
# Known Issues
|
||||
|
||||
@@ -51,7 +51,7 @@ in {
|
||||
};
|
||||
|
||||
# Package version adjustments
|
||||
gradle = super.gradle_8_3;
|
||||
gradle = super.gradle_8;
|
||||
nodejs = super.nodejs-18_x;
|
||||
ruby = super.ruby_3_1;
|
||||
yarn = super.yarn.override { nodejs = super.nodejs-18_x; };
|
||||
@@ -60,20 +60,30 @@ in {
|
||||
version = "15.0";
|
||||
allowHigher = true;
|
||||
};
|
||||
go = super.go_1_19;
|
||||
go = super.go_1_20;
|
||||
clang = super.clang_15;
|
||||
buildGoPackage = super.buildGo119Package;
|
||||
buildGoModule = super.buildGo119Module;
|
||||
gomobile = (super.gomobile.overrideAttrs (old: {
|
||||
patches = self.fetchurl { # https://github.com/golang/mobile/pull/84
|
||||
url = "https://github.com/golang/mobile/commit/f20e966e05b8f7e06bed500fa0da81cf6ebca307.patch";
|
||||
sha256 = "sha256-TZ/Yhe8gMRQUZFAs9G5/cf2b9QGtTHRSObBFD5Pbh7Y=";
|
||||
buildGoPackage = super.buildGo120Package;
|
||||
buildGoModule = super.buildGo120Module;
|
||||
|
||||
gomobile = super.gomobile.override {
|
||||
# FIXME: No Android SDK packages for aarch64-darwin.
|
||||
withAndroidPkgs = stdenv.system != "aarch64-darwin";
|
||||
androidPkgs = self.androidEnvCustom.compose;
|
||||
buildGoModule = args: super.buildGo120Module ( args // rec {
|
||||
CGO_ENABLED=1;
|
||||
GODEBUG="netdns=cgo";
|
||||
patches = [
|
||||
(self.fetchurl { # https://github.com/golang/mobile/pull/84
|
||||
url = "https://github.com/golang/mobile/commit/f20e966e05b8f7e06bed500fa0da81cf6ebca307.patch";
|
||||
sha256 = "sha256-TZ/Yhe8gMRQUZFAs9G5/cf2b9QGtTHRSObBFD5Pbh7Y=";
|
||||
})
|
||||
(self.fetchurl { # https://github.com/golang/go/issues/58426
|
||||
url = "https://github.com/golang/mobile/commit/406ed3a7b8e44dc32844953647b49696d8847d51.patch";
|
||||
sha256 = "sha256-dqbYukHkQEw8npOkKykOAzMC3ot/Y4DEuh7fE+ptlr8=";
|
||||
})
|
||||
];
|
||||
});
|
||||
};
|
||||
})).override {
|
||||
# FIXME: No Android SDK packages for aarch64-darwin.
|
||||
withAndroidPkgs = stdenv.system != "aarch64-darwin";
|
||||
androidPkgs = self.androidEnvCustom.compose;
|
||||
};
|
||||
|
||||
# Android environement
|
||||
androidEnvCustom = callPackage ./pkgs/android-sdk { };
|
||||
@@ -84,6 +94,4 @@ in {
|
||||
aapt2 = callPackage ./pkgs/aapt2 { };
|
||||
patchMavenSources = callPackage ./pkgs/patch-maven-srcs { };
|
||||
goMavenResolver = callPackage ./pkgs/go-maven-resolver { };
|
||||
xcbeautify = callPackage ./pkgs/xcbeautify { };
|
||||
idb-companion = callPackage ./pkgs/idb-companion { };
|
||||
}
|
||||
|
||||
@@ -6,10 +6,11 @@ let
|
||||
# For testing local version of nixpkgs
|
||||
#nixpkgsSrc = (import <nixpkgs> { }).lib.cleanSource "/home/jakubgs/work/nixpkgs";
|
||||
|
||||
# We follow a fork of nixpkgs where we bump gradle to 8.3 and update build tools
|
||||
# We follow release 23-11 of nixpkgs
|
||||
# https://github.com/NixOS/nixpkgs/releases/tag/23.11
|
||||
nixpkgsSrc = builtins.fetchTarball {
|
||||
url = "https://github.com/status-im/nixpkgs/archive/44d8b23ebbe40ed16ef1aecef6c5354657c48b19.tar.gz";
|
||||
sha256 = "sha256:0s7kjnc8drchzp268yzbv5snc4702hswcns9hrncjq4im8cv6mf9";
|
||||
url = "https://github.com/NixOS/nixpkgs/archive/224fd9a362487ab2894dac0df161c84ab1d8880b.tar.gz";
|
||||
sha256 = "sha256:1syvl39pi1h8lf5gkd9h7ksn5hp34cj7pa3abr59217kv0bdklhy";
|
||||
};
|
||||
|
||||
# Status specific configuration defaults
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
{ stdenv, fetchurl, lib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "idb-companion";
|
||||
version = "1.1.8";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/facebook/idb/releases/download/v${version}/idb-companion.universal.tar.gz";
|
||||
sha256 = "sha256-O3LMappbGiKhiCBahAkNOilDR6hGGA79dVzxo8hI4+c=";
|
||||
};
|
||||
|
||||
buildInputs = [ ];
|
||||
|
||||
unpackPhase = ''
|
||||
tar -xzf $src
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp -r ./* $out/bin/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A powerful command line tool for automating iOS simulators and devices";
|
||||
homepage = "https://github.com/facebook/idb";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.darwin;
|
||||
};
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
{ stdenv, fetchurl, unzip, lib }:
|
||||
|
||||
let
|
||||
inherit (lib) getAttr;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "xcbeautify";
|
||||
version = "1.4.0";
|
||||
arch = if stdenv.hostPlatform.isAarch64 then "arm64" else "x86_64";
|
||||
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/cpisciotta/xcbeautify/releases/download/${version}/xcbeautify-${version}-${arch}-apple-macosx.zip";
|
||||
sha256 = getAttr arch {
|
||||
arm64 = "sha256-4b4mXT5IfNOS8iOrZASDhTrmOehG4mePcoiKxR+IdZk=";
|
||||
x86_64 = "sha256-adEfAK7n3Q/Yd1deyJx7htX7hZaGDztEeBv4z2A0wzg=";
|
||||
};
|
||||
};
|
||||
|
||||
buildInputs = [ unzip ];
|
||||
|
||||
unpackPhase = ''
|
||||
unzip $src
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -D xcbeautify $out/bin/xcbeautify
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A little beautifier tool for xcodebuild";
|
||||
homepage = "https://github.com/cpisciotta/xcbeautify";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.darwin;
|
||||
};
|
||||
}
|
||||
@@ -27,6 +27,7 @@ nix_install_type() {
|
||||
if [[ "$(os_name)" =~ NixOS ]]; then
|
||||
echo "nixos"
|
||||
else
|
||||
USER=$(id -un) # Missing in Docker.
|
||||
case "${NIX_STORE_DIR_GROUP}" in
|
||||
"nixbld") echo "multi";;
|
||||
"30000") echo "multi";;
|
||||
|
||||
@@ -23,7 +23,7 @@ in mkShell {
|
||||
# build specific utilities
|
||||
clojure maven watchman
|
||||
# other nice to have stuff
|
||||
bun yarn nodejs python310 maestro
|
||||
yarn nodejs python310 maestro
|
||||
] # and some special cases
|
||||
++ lib.optionals stdenv.isDarwin ([ cocoapods clang tcl idb-companion ] ++ appleSDKFrameworks)
|
||||
++ lib.optionals (!stdenv.isDarwin) [ gcc8 ]
|
||||
|
||||
@@ -35,6 +35,8 @@ in buildGoPackage {
|
||||
|
||||
ANDROID_HOME = optionalString isAndroid androidPkgs.sdk;
|
||||
|
||||
CGO_ENABLED=1;
|
||||
|
||||
# Ensure XCode is present for iOS, instead of failing at the end of the build.
|
||||
preConfigure = optionalString isIOS enforceXCodeAvailable;
|
||||
|
||||
|
||||
@@ -5,10 +5,9 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"_comment": "This also prevents 'yarn install' from running outside of nix.",
|
||||
"preinstall": "make status-go-library"
|
||||
"preinstall": "scripts/check-nix-shell.sh && make status-go-library"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/preset-typescript": "^7.17.12",
|
||||
"@react-native-async-storage/async-storage": "1.19.3",
|
||||
"@react-native-camera-roll/camera-roll": "git+https://github.com/status-im/react-native-camera-roll.git#refs/tags/v5.1.1.1",
|
||||
"@react-native-clipboard/clipboard": "1.13.2",
|
||||
@@ -22,7 +21,6 @@
|
||||
"base-64": "^1.0.0",
|
||||
"bignumber.js": "git+https://github.com/status-im/bignumber.js.git#refs/tags/v4.0.2-status",
|
||||
"chance": "^1.1.0",
|
||||
"create-react-class": "^15.6.2",
|
||||
"emojilib": "^2.4.0",
|
||||
"eth-phishing-detect": "^1.2.0",
|
||||
"form-data": "^4.0.0",
|
||||
@@ -44,22 +42,19 @@
|
||||
"react-native-fs": "^2.14.1",
|
||||
"react-native-gesture-handler": "2.14.1",
|
||||
"react-native-gifted-charts": "^1.3.2",
|
||||
"react-native-haptic-feedback": "^1.9.0",
|
||||
"react-native-hole-view": "^3.0.0-alpha4",
|
||||
"react-native-image-crop-picker": "0.40.0",
|
||||
"react-native-image-resizer": "^1.2.3",
|
||||
"react-native-image-viewing": "git+https://github.com/status-im/react-native-image-viewing.git#refs/tags/v0.2.1.status",
|
||||
"react-native-keychain": "8.1.2",
|
||||
"react-native-languages": "^3.0.2",
|
||||
"react-native-linear-gradient": "^2.8.0",
|
||||
"react-native-lottie-splash-screen": "^1.0.1",
|
||||
"react-native-mail": "git+https://github.com/status-im/react-native-mail.git#refs/tags/v6.1.2-status",
|
||||
"react-native-navigation": "7.38.3",
|
||||
"react-native-orientation-locker": "^1.5.0",
|
||||
"react-native-permissions": "3.8.0",
|
||||
"react-native-randombytes": "^3.6.1",
|
||||
"react-native-reanimated": "3.6.1",
|
||||
"react-native-redash": "18.1.0",
|
||||
"react-native-shadow-2": "^7.0.8",
|
||||
"react-native-shake": "^3.3.1",
|
||||
"react-native-share": "10.0.2",
|
||||
"react-native-static-safe-area-insets": "^2.2.0",
|
||||
@@ -67,9 +62,7 @@
|
||||
"react-native-svg": "13.10.0",
|
||||
"react-native-transparent-video": "git+https://github.com/status-im/react-native-transparent-video.git#refs/tags/0.1.1",
|
||||
"react-native-webview": "13.6.3",
|
||||
"react-syntax-highlighter": "^15.5.0",
|
||||
"rn-emoji-keyboard": "0.7.0",
|
||||
"tdigest": "^0.1.1"
|
||||
"react-syntax-highlighter": "^15.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.20.0",
|
||||
@@ -101,7 +94,6 @@
|
||||
"prettier": "^2.8.8",
|
||||
"process": "0.11.10",
|
||||
"react-test-renderer": "18.1.0",
|
||||
"rn-snoopy": "git+https://github.com/status-im/rn-snoopy.git#refs/tags/v2.0.2-status",
|
||||
"shadow-cljs": "2.26.2"
|
||||
},
|
||||
"binary": {
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# Do not add a BuildId to the generated libraries, for reproducibility
|
||||
--- ./node_modules/react-native/ReactAndroid/src/main/jni/CMakeLists.txt
|
||||
+++ ./node_modules/react-native/ReactAndroid/src/main/jni/CMakeLists-patched.txt
|
||||
@@ -21,7 +21,7 @@
|
||||
endif(CCACHE_FOUND)
|
||||
|
||||
# Make sure every shared lib includes a .note.gnu.build-id header
|
||||
-add_link_options(-Wl,--build-id)
|
||||
+add_link_options(-Wl,--build-id=none)
|
||||
add_compile_options(-Wall -Werror -std=c++20)
|
||||
|
||||
function(add_react_android_subdir relative_path)
|
||||
@@ -0,0 +1,20 @@
|
||||
# Remove gradle-test-logger-plugin:
|
||||
# https://github.com/oblador/react-native-keychain/issues/595
|
||||
# TODO: remove this patch when we this library fixes above issue
|
||||
|
||||
--- ./node_modules/react-native-keychain/android/build.gradle
|
||||
+++ ./node_modules/react-native-keychain/android/build-patched.gradle
|
||||
@@ -4,13 +4,9 @@
|
||||
url 'https://plugins.gradle.org/m2/'
|
||||
}
|
||||
}
|
||||
- dependencies {
|
||||
- classpath 'com.adarshr:gradle-test-logger-plugin:2.0.0'
|
||||
- }
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.library'
|
||||
-apply plugin: "com.adarshr.test-logger"
|
||||
|
||||
def safeExtGet(prop, fallback) {
|
||||
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
||||
@@ -0,0 +1,22 @@
|
||||
# https://github.com/wix/react-native-navigation/issues/7819
|
||||
|
||||
--- ./node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/button/ButtonPresenter.kt
|
||||
+++ ./node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/button/ButtonPresenter-patched.kt
|
||||
@@ -194,8 +194,8 @@
|
||||
|
||||
class WixAccessibilityDelegateCompat: AccessibilityDelegateCompat(){
|
||||
override fun onInitializeAccessibilityNodeInfo(
|
||||
- host: View?,
|
||||
- info: AccessibilityNodeInfoCompat?
|
||||
+ host: View,
|
||||
+ info: AccessibilityNodeInfoCompat
|
||||
) {
|
||||
super.onInitializeAccessibilityNodeInfo(host, info)
|
||||
|
||||
@@ -216,4 +216,4 @@
|
||||
}
|
||||
|
||||
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
@@ -0,0 +1,19 @@
|
||||
# https://github.com/wix/react-native-navigation/issues/7819
|
||||
|
||||
--- ./node_modules/react-native-navigation/lib/android/app/build.gradle
|
||||
+++ ./node_modules/react-native-navigation/lib/android/app/build-patched.gradle
|
||||
@@ -62,11 +62,11 @@
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
- sourceCompatibility JavaVersion.VERSION_1_8
|
||||
- targetCompatibility JavaVersion.VERSION_1_8
|
||||
+ sourceCompatibility JavaVersion.VERSION_17
|
||||
+ targetCompatibility JavaVersion.VERSION_17
|
||||
}
|
||||
kotlinOptions {
|
||||
- jvmTarget = JavaVersion.VERSION_1_8
|
||||
+ jvmTarget = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
flavorDimensions "RNN.reactNativeVersion"
|
||||
@@ -0,0 +1,13 @@
|
||||
# to fix https://github.com/status-im/status-mobile/issues/18548
|
||||
|
||||
--- ./node_modules/react-native/scripts/react_native_pods_utils/script_phases.sh
|
||||
+++ ./node_modules/react-native/scripts/react_native_pods_utils/script_phases-patched.sh
|
||||
@@ -104,7 +104,7 @@
|
||||
mkdir -p "$RCT_SCRIPT_OUTPUT_DIR"
|
||||
|
||||
# Copy all output to output_dir
|
||||
- cp -R -X "$TEMP_OUTPUT_DIR/." "$RCT_SCRIPT_OUTPUT_DIR" || exit 1
|
||||
+ cp -R "$TEMP_OUTPUT_DIR/." "$RCT_SCRIPT_OUTPUT_DIR" || exit 1
|
||||
echo "$LIBRARY_NAME output has been written to $RCT_SCRIPT_OUTPUT_DIR:" >> "${SCRIPT_OUTPUT_FILE_0}" 2>&1
|
||||
ls -1 "$RCT_SCRIPT_OUTPUT_DIR" >> "${SCRIPT_OUTPUT_FILE_0}" 2>&1
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
# Fix pod issue after upgrading to MacOS Sonoma and Xcode 15
|
||||
# https://github.com/status-im/status-mobile/issues/17682
|
||||
|
||||
--- ./node_modules/react-native/scripts/ios-configure-glog.sh
|
||||
+++ ./node_modules/react-native/scripts/ios-configure-glog-patched.sh
|
||||
@@ -42,9 +42,6 @@
|
||||
patch -p1 config.sub fix_glog_0.3.5_apple_silicon.patch
|
||||
fi
|
||||
|
||||
-export CC="$(xcrun -find -sdk $PLATFORM_NAME cc) -arch $CURRENT_ARCH -isysroot $(xcrun -sdk $PLATFORM_NAME --show-sdk-path)"
|
||||
-export CXX="$CC"
|
||||
-
|
||||
# Remove automake symlink if it exists
|
||||
if [ -h "test-driver" ]; then
|
||||
rm test-driver
|
||||
|
After Width: | Height: | Size: 750 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 181 B |
|
After Width: | Height: | Size: 203 B |
|
After Width: | Height: | Size: 595 B |
|
After Width: | Height: | Size: 889 B |
|
After Width: | Height: | Size: 707 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Increment a version string using Semantic Versioning (SemVer) terminology.
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
GIT_ROOT=$(cd "${BASH_SOURCE%/*}" && git rev-parse --show-toplevel)
|
||||
|
||||
read -p "Enter the path of the file to patch: " FILE_PATH
|
||||
|
||||
if [ ! -f "${FILE_PATH}" ]; then
|
||||
echo "File not found: ${FILE_PATH}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "${FILE_PATH}" == *"node_modules"* ]]; then
|
||||
if [[ "${FILE_PATH}" != *"./node_modules"* ]]; then
|
||||
echo "Please prefix the file path like this './node_modules/'. The path you provided was: ${FILE_PATH}" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
FILE_NAME=$(basename "${FILE_PATH}")
|
||||
echo "File to patch: ${FILE_PATH}"
|
||||
|
||||
TEMP_DIR=$(mktemp -d)
|
||||
trap 'rm -rf "${TEMP_DIR}"' EXIT
|
||||
echo "Temporary directory created: ${TEMP_DIR}"
|
||||
|
||||
cp "${FILE_PATH}" "${TEMP_DIR}"
|
||||
echo "Original file copied to temporary directory."
|
||||
|
||||
echo "Please make the necessary changes to the file: ${FILE_PATH}"
|
||||
echo "Press any key when you are done with the changes..."
|
||||
|
||||
ORIGINAL_MTIME=$(stat -c %Y "${FILE_PATH}")
|
||||
read -n 1 -s
|
||||
CURRENT_MTIME=$(stat -c %Y "${FILE_PATH}")
|
||||
|
||||
if [[ "${ORIGINAL_MTIME}" -eq "${CURRENT_MTIME}" ]]; then
|
||||
echo "Warning: No changes were made to the file. Patch file will not be generated."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Generating patch file..."
|
||||
diff -Naur "${TEMP_DIR}/${FILE_NAME}" "${FILE_PATH}" > "${GIT_ROOT}/patches/${FILE_NAME}.patch"
|
||||
|
||||
echo "Patch file created at ${GIT_ROOT}/patches/${FILE_NAME}.patch"
|
||||
echo "Info: Please execute 'make run-clojure' to test if the patch file works as expected."
|
||||
@@ -6,6 +6,7 @@ GIT_ROOT=$(cd "${BASH_SOURCE%/*}" && git rev-parse --show-toplevel)
|
||||
XCRUN_INSTALL_LOG_FILE="${GIT_ROOT}/logs/xcrun_install.log"
|
||||
XCRUN_LAUNCH_LOG_FILE="${GIT_ROOT}/logs/xcrun_launch.log"
|
||||
XCRUN_SIMULATOR_JSON_FILE="${GIT_ROOT}/logs/ios_simulators_list.log"
|
||||
XCODEBUILD_LOG_FILE="${GIT_ROOT}/logs/react-native-xcode.log"
|
||||
|
||||
# Install on the simulator
|
||||
installAndLaunchApp() {
|
||||
@@ -60,7 +61,7 @@ open -a Simulator --args -CurrentDeviceUDID "${UDID}"
|
||||
BUILD_DIR="${GIT_ROOT}/build"
|
||||
|
||||
#iOS build of debug scheme
|
||||
xcodebuild -workspace "ios/StatusIm.xcworkspace" -configuration Debug -scheme StatusIm -destination id="${UDID}" -derivedDataPath "${BUILD_DIR}" -verbose | xcbeautify
|
||||
xcodebuild -workspace "ios/StatusIm.xcworkspace" -configuration Debug -scheme StatusIm -destination id="${UDID}" -derivedDataPath "${BUILD_DIR}" -verbose | xcbeautify | tee -a "${XCODEBUILD_LOG_FILE}" 2>&1
|
||||
|
||||
APP_PATH="${BUILD_DIR}/Build/Products/Debug-iphonesimulator/StatusIm.app"
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
pkill -f 'react-native start'
|
||||
|
||||
react-native start --reset-cache
|
||||
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 --reset-cache
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useDerivedValue, withTiming } from 'react-native-reanimated';
|
||||
import { useDerivedValue, withTiming, withDelay } from 'react-native-reanimated';
|
||||
|
||||
export function scrollDownButtonOpacity(chatListScrollY, isComposerFocused, windowHeight) {
|
||||
return useDerivedValue(function () {
|
||||
@@ -24,3 +24,26 @@ export function jumpToButtonPosition(scrollDownButtonOpacity, isComposerFocused)
|
||||
return withTiming(scrollDownButtonOpacity.value == 1 || isComposerFocused.value ? 35 : 0);
|
||||
});
|
||||
}
|
||||
|
||||
export function composerContainerOpacity(isComposerFocused, isEmptyInput, emptyOpacity) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
return isEmptyInput.value && !isComposerFocused.value
|
||||
? withDelay(300, withTiming(emptyOpacity, { duration: 0 }))
|
||||
: 1;
|
||||
});
|
||||
}
|
||||
|
||||
export function blurContainerElevation(isComposerFocused, isEmptyInput) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
return isEmptyInput.value && !isComposerFocused.value ? 10 : 0;
|
||||
});
|
||||
}
|
||||
|
||||
export function composerElevation(isComposerFocused, isEmptyInput) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
return isEmptyInput.value && !isComposerFocused.value ? 0 : 10;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import { useAnimatedStyle, withTiming } from 'react-native-reanimated';
|
||||
|
||||
export function profileHeaderAnimation(scrollY, threshold, topBarHeight) {
|
||||
return useAnimatedStyle(() => {
|
||||
'worklet';
|
||||
const opacity = scrollY.value < threshold ? withTiming(0) : withTiming(1);
|
||||
const translateY = scrollY.value < threshold ? withTiming(topBarHeight) : withTiming(0);
|
||||
|
||||
return {
|
||||
opacity: opacity,
|
||||
transform: [{ translateY: translateY }],
|
||||
};
|
||||
});
|
||||
}
|
||||
@@ -1,131 +0,0 @@
|
||||
(ns legacy.status-im.bootnodes.core
|
||||
(:require
|
||||
[clojure.string :as string]
|
||||
[legacy.status-im.multiaccounts.update.core :as multiaccounts.update]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.navigation.events :as navigation]
|
||||
[utils.i18n :as i18n]
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
(def address-regex #"enode://[a-zA-Z0-9]+:?(.*)\@\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b:(\d{1,5})")
|
||||
|
||||
(defn valid-address?
|
||||
[address]
|
||||
(re-matches address-regex address))
|
||||
|
||||
(defn- build
|
||||
[id bootnode-name address chain]
|
||||
{:address address
|
||||
:chain chain
|
||||
:id (string/replace id "-" "")
|
||||
:name bootnode-name})
|
||||
|
||||
(rf/defn fetch
|
||||
[cofx id]
|
||||
(let [network (get-in cofx [:db :networks/current-network])]
|
||||
(get-in cofx [:db :profile/profile :custom-bootnodes network id])))
|
||||
|
||||
(rf/defn set-input
|
||||
{:events [:bootnodes.ui/input-changed]}
|
||||
[{:keys [db]} input-key value]
|
||||
{:db (update
|
||||
db
|
||||
:bootnodes/manage
|
||||
assoc
|
||||
input-key
|
||||
{:value value
|
||||
:error (case input-key
|
||||
:id false
|
||||
:name (string/blank? value)
|
||||
:url (not (valid-address? value)))})})
|
||||
|
||||
(rf/defn edit
|
||||
{:events [:bootnodes.ui/add-bootnode-pressed]}
|
||||
[{:keys [db] :as cofx} id]
|
||||
(let [{:keys [id
|
||||
address
|
||||
name]}
|
||||
(fetch cofx id)
|
||||
fxs (rf/merge cofx
|
||||
(set-input :id id)
|
||||
(set-input :url (str address))
|
||||
(set-input :name (str name)))]
|
||||
(assoc fxs :dispatch [:navigate-to :edit-bootnode])))
|
||||
|
||||
(defn custom-bootnodes-in-use?
|
||||
[{:keys [db]}]
|
||||
(let [network (:networks/current-network db)]
|
||||
(get-in db [:profile/profile :custom-bootnodes-enabled? network])))
|
||||
|
||||
(rf/defn delete
|
||||
[{{:profile/keys [profile] :as db} :db :as cofx} id]
|
||||
(let [network (:networks/current-network db)
|
||||
new-profile (update-in profile [:custom-bootnodes network] dissoc id)]
|
||||
(rf/merge cofx
|
||||
{:db (assoc db :profile/profile new-profile)}
|
||||
(multiaccounts.update/multiaccount-update
|
||||
:custom-bootnodes
|
||||
(:custom-bootnodes new-profile)
|
||||
{:success-event (when (custom-bootnodes-in-use? cofx)
|
||||
[:multiaccounts.update.callback/save-settings-success])}))))
|
||||
|
||||
(rf/defn upsert
|
||||
{:events [:bootnodes.ui/save-pressed]
|
||||
:interceptors [(re-frame/inject-cofx :random-id-generator)]}
|
||||
[{{:bootnodes/keys [manage] :profile/keys [profile] :as db} :db
|
||||
random-id-generator :random-id-generator
|
||||
:as cofx}]
|
||||
(let [{:keys [name id url]} manage
|
||||
network (:networks/current-network db)
|
||||
bootnode (build
|
||||
(or (:value id) (random-id-generator))
|
||||
(:value name)
|
||||
(:value url)
|
||||
network)
|
||||
new-bootnodes (assoc-in
|
||||
(:custom-bootnodes profile)
|
||||
[network (:id bootnode)]
|
||||
bootnode)]
|
||||
|
||||
(rf/merge cofx
|
||||
{:db (dissoc db :bootnodes/manage)
|
||||
:dispatch [:navigate-back]}
|
||||
(multiaccounts.update/multiaccount-update
|
||||
:custom-bootnodes
|
||||
new-bootnodes
|
||||
{:success-event (when (custom-bootnodes-in-use? cofx)
|
||||
[:multiaccounts.update.callback/save-settings-success])}))))
|
||||
|
||||
(rf/defn toggle-custom-bootnodes
|
||||
{:events [:bootnodes.ui/custom-bootnodes-switch-toggled]}
|
||||
[{:keys [db] :as cofx} value]
|
||||
(let [current-network (:networks/current-network db)
|
||||
bootnodes-settings (get-in db [:profile/profile :custom-bootnodes-enabled?])]
|
||||
(multiaccounts.update/multiaccount-update
|
||||
cofx
|
||||
:custom-bootnodes-enabled?
|
||||
(assoc bootnodes-settings current-network value)
|
||||
{:success-event [:multiaccounts.update.callback/save-settings-success]})))
|
||||
|
||||
(rf/defn set-bootnodes-from-qr
|
||||
{:events [:bootnodes.callback/qr-code-scanned]}
|
||||
[cofx url]
|
||||
(assoc (set-input cofx :url (string/trim url))
|
||||
:dispatch
|
||||
[:navigate-back]))
|
||||
|
||||
(rf/defn show-delete-bootnode-confirmation
|
||||
{:events [:bootnodes.ui/delete-pressed]}
|
||||
[_ bootnode-id]
|
||||
{:ui/show-confirmation {:title (i18n/label :t/delete-bootnode-title)
|
||||
:content (i18n/label :t/delete-bootnode-are-you-sure)
|
||||
:confirm-button-text (i18n/label :t/delete-bootnode)
|
||||
:on-accept #(re-frame/dispatch [:bootnodes.ui/delete-confirmed
|
||||
bootnode-id])}})
|
||||
|
||||
(rf/defn delete-bootnode
|
||||
{:events [:bootnodes.ui/delete-confirmed]}
|
||||
[cofx bootnode-id]
|
||||
(rf/merge cofx
|
||||
(delete bootnode-id)
|
||||
(navigation/navigate-back)))
|
||||
@@ -1,180 +0,0 @@
|
||||
(ns legacy.status-im.bootnodes.core-test
|
||||
(:require
|
||||
[cljs.test :refer-macros [deftest is testing]]
|
||||
[legacy.status-im.bootnodes.core :as model]))
|
||||
|
||||
(def bootnode-id
|
||||
"1da276e34126e93babf24ec88aac1a7602b4cbb2e11b0961d0ab5e989ca9c261aa7f7c1c85f15550a5f1e5a5ca2305b53b9280cf5894d5ecf7d257b173136d40")
|
||||
(def host "167.99.209.61:30504")
|
||||
|
||||
(def valid-bootnode-address (str "enode://" bootnode-id "@" host))
|
||||
|
||||
(deftest upsert-bootnode
|
||||
(testing "adding a new bootnode"
|
||||
(let [new-bootnode {:name {:value "name"}
|
||||
:url {:value "url"}}
|
||||
expected {"mainnet_rpc" {"someid" {:name "name"
|
||||
:address "url"
|
||||
:chain "mainnet_rpc"
|
||||
:id "someid"}}}
|
||||
actual (model/upsert
|
||||
{:random-id-generator (constantly "some-id")
|
||||
:db {:bootnodes/manage new-bootnode
|
||||
:networks/current-network "mainnet_rpc"
|
||||
:profile/profile {:not-empty
|
||||
"would throw an error if was empty"}}})]
|
||||
(is (= expected (get-in actual [:db :profile/profile :custom-bootnodes])))))
|
||||
(testing "adding an existing bootnode"
|
||||
(let [new-bootnode {:id {:value "a"}
|
||||
:name {:value "new-name"}
|
||||
:url {:value "new-url"}}
|
||||
expected {"mainnet_rpc" {"a" {:name "new-name"
|
||||
:address "new-url"
|
||||
:chain "mainnet_rpc"
|
||||
:id "a"}}}
|
||||
actual (model/upsert
|
||||
{:random-id-generator (constantly "some-id")
|
||||
:db {:bootnodes/manage new-bootnode
|
||||
:networks/current-network "mainnet_rpc"
|
||||
:profile/profile {:custom-bootnodes
|
||||
{"mainnet_rpc"
|
||||
{"a" {:name "name"
|
||||
:address "url"
|
||||
:chain "mainnet_rpc"
|
||||
:id "a"}}}}}})]
|
||||
(is (= expected (get-in actual [:db :profile/profile :custom-bootnodes]))))))
|
||||
|
||||
(deftest set-input-bootnode
|
||||
(testing "it validates names"
|
||||
(testing "correct name"
|
||||
(is (= {:db {:bootnodes/manage {:name {:value "value"
|
||||
:error false}}}}
|
||||
(model/set-input {:db {}} :name "value"))))
|
||||
(testing "blank name"
|
||||
(is (= {:db {:bootnodes/manage {:name {:value ""
|
||||
:error true}}}}
|
||||
(model/set-input {:db {}} :name "")))))
|
||||
(testing "it validates bootnode url"
|
||||
(testing "correct url"
|
||||
(is (= {:db {:bootnodes/manage {:url {:value valid-bootnode-address
|
||||
:error false}}}}
|
||||
(model/set-input {:db {}} :url valid-bootnode-address))))
|
||||
(testing "broken url"
|
||||
(is (= {:db {:bootnodes/manage {:url {:value "broken"
|
||||
:error true}}}}
|
||||
(model/set-input {:db {}} :url "broken"))))))
|
||||
|
||||
(deftest set-bootnode-from-qr
|
||||
(testing "correct name"
|
||||
(is (= {:dispatch [:navigate-back]
|
||||
:db {:bootnodes/manage {:url {:value valid-bootnode-address
|
||||
:error false}}}}
|
||||
(model/set-bootnodes-from-qr {:db {}} (str valid-bootnode-address " "))))))
|
||||
|
||||
(deftest edit-bootnode
|
||||
(let [db {:networks/current-network "mainnet_rpc"
|
||||
:profile/profile
|
||||
{:custom-bootnodes
|
||||
{"mainnet_rpc"
|
||||
{"a" {:id "a"
|
||||
:name "name"
|
||||
:address valid-bootnode-address}}}}}
|
||||
cofx {:db db}]
|
||||
(testing "when no id is given"
|
||||
(let [actual (model/edit cofx nil)]
|
||||
(testing "it resets :bootnodes/manage"
|
||||
(is (= {:id {:value nil
|
||||
:error false}
|
||||
:url {:value ""
|
||||
:error true}
|
||||
:name {:value ""
|
||||
:error true}}
|
||||
(-> actual :db :bootnodes/manage))))
|
||||
(testing "it navigates to edit-bootnode view"
|
||||
(is (= [:navigate-to :edit-bootnode]
|
||||
(-> actual :dispatch))))))
|
||||
(testing "when an id is given"
|
||||
(testing "when the bootnode is in the list"
|
||||
(let [actual (model/edit cofx "a")]
|
||||
(testing "it populates the fields with the correct values"
|
||||
(is (= {:id {:value "a"
|
||||
:error false}
|
||||
:url {:value valid-bootnode-address
|
||||
:error false}
|
||||
:name {:value "name"
|
||||
:error false}}
|
||||
(-> actual :db :bootnodes/manage))))
|
||||
(testing "it navigates to edit-bootnode view"
|
||||
(is (= [:navigate-to :edit-bootnode]
|
||||
(-> actual :dispatch))))))
|
||||
(testing "when the bootnode is not in the list"
|
||||
(let [actual (model/edit cofx "not-existing")]
|
||||
(testing "it populates the fields with the correct values"
|
||||
(is (= {:id {:value nil
|
||||
:error false}
|
||||
:url {:value ""
|
||||
:error true}
|
||||
:name {:value ""
|
||||
:error true}}
|
||||
(-> actual :db :bootnodes/manage))))
|
||||
(testing "it navigates to edit-bootnode view"
|
||||
(is (= [:navigate-to :edit-bootnode]
|
||||
(-> actual :dispatch)))))))))
|
||||
|
||||
(deftest fetch-bootnode
|
||||
(testing "it fetches the bootnode from the db"
|
||||
(let [cofx {:db {:networks/current-network "mainnet_rpc"
|
||||
:profile/profile {:custom-bootnodes
|
||||
{"mainnet_rpc"
|
||||
{"a" {:id "a"
|
||||
:name "name"
|
||||
:address
|
||||
"enode://old-id:old-password@url:port"}}}}}}]
|
||||
(is (model/fetch cofx "a")))))
|
||||
|
||||
(deftest custom-bootnodes-in-use?
|
||||
(testing "is on the same network"
|
||||
(testing "it returns false when not enabled"
|
||||
(is (not (model/custom-bootnodes-in-use? {:db {:networks/current-network "mainnet_rpc"}}))))
|
||||
(testing "it returns true when enabled"
|
||||
(is (model/custom-bootnodes-in-use?
|
||||
{:db {:networks/current-network "mainnet_rpc"
|
||||
:profile/profile {:custom-bootnodes-enabled?
|
||||
{"mainnet_rpc" true}}}}))))
|
||||
(testing "is on a different network"
|
||||
(testing "it returns false when not enabled"
|
||||
(is (not (model/custom-bootnodes-in-use? {:db {:networks/current-network "goerli_rpc"}}))))
|
||||
(testing "it returns true when enabled"
|
||||
(is (not (model/custom-bootnodes-in-use?
|
||||
{:db {:networks/current-network "goerli_rpc"
|
||||
:profile/profile {:custom-bootnodes-enabled?
|
||||
{"mainnnet_rpc" true}}}}))))))
|
||||
|
||||
(deftest delete-bootnode
|
||||
(testing "non existing bootnode"
|
||||
(let [cofx {:db {:networks/current-network "mainnet_rpc"
|
||||
:profile/profile {:custom-bootnodes
|
||||
{"mainnet_rpc"
|
||||
{"a" {:id "a"
|
||||
:name "name"
|
||||
:address
|
||||
"enode://old-id:old-password@url:port"}}}
|
||||
:custom-bootnodes-enabled?
|
||||
{"mainnnet_rpc" true}}}}
|
||||
actual (model/delete cofx "b")]
|
||||
(testing "it does not removes the bootnode"
|
||||
(is (model/fetch actual "a")))))
|
||||
(testing "existing bootnode"
|
||||
(let [cofx {:db {:networks/current-network "mainnet_rpc"
|
||||
:profile/profile {:custom-bootnodes
|
||||
{"mainnet_rpc"
|
||||
{"a" {:id "a"
|
||||
:name "name"
|
||||
:address
|
||||
"enode://old-id:old-password@url:port"}}}
|
||||
:custom-bootnodes-enabled?
|
||||
{"mainnnet_rpc" true}}}}
|
||||
actual (model/delete cofx "a")]
|
||||
|
||||
(testing "it removes the bootnode"
|
||||
(is (not (model/fetch actual "a")))))))
|
||||
@@ -187,9 +187,9 @@
|
||||
(with-animation (+ bg-height-expanded (.-value pan-y))))
|
||||
;; Workaround for
|
||||
;; https://github.com/software-mansion/react-native-reanimated/issues/1758#issue-817145741
|
||||
;; withTiming/withSpring callback not working on-expanded should
|
||||
;; be called as a callback of with-animation instead, once this
|
||||
;; issue has been resolved
|
||||
;; withTiming/withSpring callback not working on-expanded
|
||||
;; should be called as a callback of with-animation instead,
|
||||
;; once this issue has been resolved
|
||||
(timer/set-timeout on-expanded animation-delay))
|
||||
(do
|
||||
(reanimated/set-shared-value
|
||||
@@ -197,9 +197,9 @@
|
||||
(with-animation (+ bg-height (.-value pan-y))))
|
||||
;; Workaround for
|
||||
;; https://github.com/software-mansion/react-native-reanimated/issues/1758#issue-817145741
|
||||
;; withTiming/withSpring callback not working on-collapsed should
|
||||
;; be called as a callback of with-animation instead, once this
|
||||
;; issue has been resolved
|
||||
;; withTiming/withSpring callback not working on-collapsed
|
||||
;; should be called as a callback of with-animation instead,
|
||||
;; once this issue has been resolved
|
||||
(timer/set-timeout on-collapsed animation-delay)))
|
||||
|
||||
(= @show-bottom-sheet? false)
|
||||
|
||||
@@ -3,12 +3,10 @@
|
||||
["eth-phishing-detect" :as eth-phishing-detect]
|
||||
[clojure.string :as string]
|
||||
[legacy.status-im.bottom-sheet.events :as bottom-sheet]
|
||||
[legacy.status-im.browser.eip3326 :as eip3326]
|
||||
[legacy.status-im.browser.permissions :as browser.permissions]
|
||||
[legacy.status-im.browser.webview-ref :as webview-ref]
|
||||
[legacy.status-im.ethereum.ens :as ens]
|
||||
[legacy.status-im.multiaccounts.update.core :as multiaccounts.update]
|
||||
[legacy.status-im.signing.core :as signing]
|
||||
[legacy.status-im.ui.components.list-selection :as list-selection]
|
||||
[legacy.status-im.utils.deprecated-types :as types]
|
||||
[legacy.status-im.utils.random :as random]
|
||||
@@ -393,64 +391,6 @@
|
||||
constants/web3-eth-sign constants/web3-keycard-sign-typed-data}
|
||||
method))
|
||||
|
||||
(rf/defn web3-send-async
|
||||
[cofx dapp-name {:keys [method params id] :as payload} message-id]
|
||||
(let [message? (web3-sign-message? method)
|
||||
dapps-address (get-in cofx [:db :profile/profile :dapps-address])
|
||||
typed? (and (not= constants/web3-personal-sign method)
|
||||
(not= constants/web3-eth-sign method))]
|
||||
(if (or message? (= constants/web3-send-transaction method))
|
||||
(let [[address data] (cond (and (= method constants/web3-keycard-sign-typed-data)
|
||||
(not (vector? params)))
|
||||
;; We don't use signer argument for keycard sign-typed-data
|
||||
["0x0" params]
|
||||
message? (normalize-sign-message-params params
|
||||
typed?)
|
||||
:else [nil nil])]
|
||||
(when (or (not message?) (and address data))
|
||||
(signing/sign cofx
|
||||
(merge
|
||||
(if message?
|
||||
{:message {:address address
|
||||
:data data
|
||||
:v4 (= constants/web3-sign-typed-data-v4 method)
|
||||
:typed? typed?
|
||||
:pinless? (= method constants/web3-keycard-sign-typed-data)
|
||||
:from dapps-address}}
|
||||
{:tx-obj (-> params
|
||||
first
|
||||
(update :from #(or % dapps-address))
|
||||
(dissoc :gasPrice))})
|
||||
{:on-result [:browser.dapp/transaction-on-result message-id id]
|
||||
:on-error [:browser.dapp/transaction-on-error message-id]}))))
|
||||
(cond
|
||||
(#{"eth_accounts" "eth_coinbase"} method)
|
||||
(send-to-bridge
|
||||
cofx
|
||||
{:type constants/web3-send-async-callback
|
||||
:messageId message-id
|
||||
:result {:jsonrpc "2.0"
|
||||
:id (int id)
|
||||
:result (if (= method "eth_coinbase") dapps-address [dapps-address])}})
|
||||
(= method "personal_ecRecover")
|
||||
{:signing.fx/recover-message {:params {:message (first params)
|
||||
:signature (second params)}
|
||||
:on-completed #(re-frame/dispatch
|
||||
[:browser.callback/call-rpc
|
||||
{:type constants/web3-send-async-callback
|
||||
:messageId message-id
|
||||
:result (types/json->clj %)}])}}
|
||||
(= method "wallet_switchEthereumChain")
|
||||
(eip3326/handle-switch-ethereum-chain cofx dapp-name id message-id (first params))
|
||||
|
||||
:else
|
||||
{:browser/call-rpc [payload
|
||||
#(re-frame/dispatch [:browser.callback/call-rpc
|
||||
{:type constants/web3-send-async-callback
|
||||
:messageId message-id
|
||||
:error %1
|
||||
:result %2}])]}))))
|
||||
|
||||
(rf/defn handle-no-permissions
|
||||
[cofx {:keys [method id]} message-id]
|
||||
(if (= method "eth_accounts")
|
||||
@@ -479,9 +419,8 @@
|
||||
|
||||
(rf/defn web3-send-async-read-only
|
||||
[{:keys [db] :as cofx} dapp-name {:keys [method] :as payload} message-id]
|
||||
(if (has-permissions? db dapp-name method)
|
||||
(handle-no-permissions cofx payload message-id)
|
||||
(web3-send-async cofx dapp-name payload message-id)))
|
||||
(when (has-permissions? db dapp-name method)
|
||||
(handle-no-permissions cofx payload message-id)))
|
||||
|
||||
(rf/defn handle-scanned-qr-code
|
||||
{:events [:browser.bridge.callback/qr-code-scanned]}
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
;reference https://eips.ethereum.org/EIPS/eip-3085 EIP-3085: Wallet Add Ethereum Chain RPC Method
|
||||
;(`wallet_addEthereumChain`)
|
||||
(ns legacy.status-im.browser.eip3085
|
||||
(:require
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.constants :as constants]
|
||||
[taoensso.timbre :as log]
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
(rf/defn send-success-call-to-bridge
|
||||
{:events [:eip3085/send-success-call-to-bridge]}
|
||||
[_ id messageId]
|
||||
{:browser/send-to-bridge {:type constants/web3-send-async-callback
|
||||
:messageId messageId
|
||||
:result {:jsonrpc "2.0"
|
||||
:id (int id)
|
||||
:result nil}}})
|
||||
|
||||
(rf/defn allow-permission
|
||||
{:events [:eip3085.ui/dapp-permission-allowed]}
|
||||
[{:keys [db] :as cofx} message-id {:keys [new-networks id]}]
|
||||
{:db (assoc db :networks/networks new-networks)
|
||||
:json-rpc/call [{:method "settings_saveSetting"
|
||||
:params [:networks/networks (vals new-networks)]
|
||||
:on-success #(re-frame/dispatch [:eip3085/send-success-call-to-bridge cofx id
|
||||
message-id])
|
||||
:on-error #(log/error "failed to perform settings_saveSetting" %)}]
|
||||
:dispatch [:bottom-sheet/hide-old]})
|
||||
|
||||
(rf/defn deny-permission
|
||||
{:events [:eip3085.ui/dapp-permission-denied]}
|
||||
[_ message-id _]
|
||||
{:browser/send-to-bridge {:type constants/web3-send-async-callback
|
||||
:messageId message-id
|
||||
:error {:code 4001
|
||||
:message "User rejected the request."}}
|
||||
:dispatch [:bottom-sheet/hide-old]})
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
;reference https://eips.ethereum.org/EIPS/eip-3326 EIP-3326: Wallet Switch Ethereum Chain RPC Method
|
||||
;(`wallet_switchEthereumChain`)
|
||||
(ns legacy.status-im.browser.eip3326
|
||||
(:require
|
||||
[legacy.status-im.ui.screens.browser.eip3326.sheet :as sheet]
|
||||
[status-im.constants :as constants]
|
||||
[utils.ethereum.chain :as chain]
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
(rf/defn deny-permission
|
||||
{:events [:eip3326.ui/dapp-permission-denied]}
|
||||
[{:keys [db] :as cofx} message-id _]
|
||||
{:browser/send-to-bridge {:type constants/web3-send-async-callback
|
||||
:messageId message-id
|
||||
:error {:code 4001
|
||||
:message "User rejected the request."}}
|
||||
:dispatch [:bottom-sheet/hide-old]})
|
||||
|
||||
(rf/defn handle-switch-ethereum-chain
|
||||
{:events [:eip3326/handle-switch-ethereum-chain]}
|
||||
[{:keys [db] :as cofx} dapp-name id message-id {:keys [chainId] :as params}]
|
||||
(let [target-chain-id (js/parseInt chainId 16)
|
||||
networks (vals (get-in db [:networks/networks]))
|
||||
exist-chain-ids (set (map chain/network->chain-id networks))
|
||||
current-chain-id (chain/chain-id db)]
|
||||
(if (exist-chain-ids target-chain-id)
|
||||
(if (= current-chain-id target-chain-id)
|
||||
{:browser/send-to-bridge {:type constants/web3-send-async-callback
|
||||
:messageId message-id
|
||||
:result {:jsonrpc "2.0"
|
||||
:id (int id)
|
||||
:result nil}}}
|
||||
(let [target-network (first (filter #(= (chain/network->chain-id %1) target-chain-id)
|
||||
networks))
|
||||
target-network-id (:id target-network)
|
||||
current-network (chain/current-network db)
|
||||
network-from (:name current-network)
|
||||
network-to (:name target-network)
|
||||
params (assoc params
|
||||
:target-network-id target-network-id
|
||||
:network-from network-from
|
||||
:network-to network-to)]
|
||||
{:dispatch [:bottom-sheet/show-sheet-old
|
||||
{:content (fn []
|
||||
[sheet/permissions-panel dapp-name message-id params])}]}))
|
||||
{:browser/send-to-bridge {:type constants/web3-send-async-callback
|
||||
:messageId message-id
|
||||
:error
|
||||
{:code 4902
|
||||
:message
|
||||
(str
|
||||
"Unrecognized chain ID: "
|
||||
target-chain-id
|
||||
". Try adding the chain using wallet_addEthereumChain first.")}}})))
|
||||
|
||||
@@ -120,12 +120,13 @@
|
||||
{:keys [message-id from]
|
||||
:as message}]
|
||||
(let [message
|
||||
;; For example, when a user receives a list of 4 image messages while inside
|
||||
;; the chat screen we shouldn't group the images into albums. When the user
|
||||
;; exists the chat screen then enters the chat screen again, we now need to
|
||||
;; group the images into albums (like WhatsApp). The albumize? boolean is used
|
||||
;; to know whether we need to group these images into albums now or not. The
|
||||
;; album-id can't be used for this because it will always be there.
|
||||
;; For example, when a user receives a list of 4 image messages while
|
||||
;; inside the chat screen we shouldn't group the images into albums. When
|
||||
;; the user exists the chat screen then enters the chat screen again, we
|
||||
;; now need to group the images into albums (like WhatsApp). The albumize?
|
||||
;; boolean is used to know whether we need to group these images into
|
||||
;; albums now or not. The album-id can't be used for this because it will
|
||||
;; always be there.
|
||||
(if (and (:album-id message) (nil? (get all-messages message-id)))
|
||||
(assoc message :albumize? true)
|
||||
message)]
|
||||
|
||||
@@ -22,9 +22,7 @@
|
||||
:alias "alias"
|
||||
:name "name"
|
||||
:from "from"}]
|
||||
;; <- cursor
|
||||
;; <- message
|
||||
;; <- top of the chat
|
||||
;; <- cursor <- message <- top of the chat
|
||||
(testing "there's no hidden item"
|
||||
(with-redefs [list.state/first-not-visible-item (atom nil)]
|
||||
(is
|
||||
@@ -41,10 +39,7 @@
|
||||
cofx
|
||||
#js {:messages (to-array [message])})
|
||||
:utils/dispatch-later)))))
|
||||
;; <- cursor
|
||||
;; <- first-hidden-item
|
||||
;; <- message
|
||||
;; <- top of the chat
|
||||
;; <- cursor <- first-hidden-item <- message <- top of the chat
|
||||
(testing "the hidden item has a clock value less than the current"
|
||||
(with-redefs [list.state/first-not-visible-item (atom {:clock-value (dec clock-value)})]
|
||||
(is
|
||||
@@ -61,10 +56,7 @@
|
||||
cofx
|
||||
#js {:messages (to-array [message])})
|
||||
:utils/dispatch-later)))))
|
||||
;; <- cursor
|
||||
;; <- message
|
||||
;; <- first-hidden-item
|
||||
;; <- top of the chat
|
||||
;; <- cursor <- message <- first-hidden-item <- top of the chat
|
||||
(testing "the message falls between the first-hidden-item and cursor"
|
||||
(with-redefs [list.state/first-not-visible-item (atom {:clock-value (inc clock-value)})]
|
||||
(let [result (dissoc (message/receive-many
|
||||
@@ -77,9 +69,7 @@
|
||||
(is (= clock-value (get-in result [:db :pagination-info chat-id :cursor-clock-value])))
|
||||
(is (= (loading/clock-value->cursor clock-value)
|
||||
(get-in result [:db :pagination-info chat-id :cursor])))))))
|
||||
;; <- message
|
||||
;; <- first-hidden-item
|
||||
;; <- top of the chat
|
||||
;; <- message <- first-hidden-item <- top of the chat
|
||||
(testing "the message falls between the first-hidden-item and cursor is nil"
|
||||
(with-redefs [list.state/first-not-visible-item (atom {:clock-value (inc clock-value)})]
|
||||
(let [result (dissoc (message/receive-many
|
||||
@@ -96,10 +86,7 @@
|
||||
(is (= clock-value (get-in result [:db :pagination-info chat-id :cursor-clock-value])))
|
||||
(is (= (loading/clock-value->cursor clock-value)
|
||||
(get-in result [:db :pagination-info chat-id :cursor])))))))
|
||||
;; <- message
|
||||
;; <- cursor
|
||||
;; <- first-hidden-item
|
||||
;; <- top of the chat
|
||||
;; <- message <- cursor <- first-hidden-item <- top of the chat
|
||||
(testing "the message falls before both the first-hidden-item and cursor"
|
||||
(with-redefs [list.state/first-not-visible-item (atom {:clock-value (inc clock-value)})]
|
||||
(let [message #js
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
[legacy.status-im.bottom-sheet.events :as bottom-sheet]
|
||||
legacy.status-im.communities.e2e
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.contexts.shell.activity-center.events :as activity-center]
|
||||
[status-im.navigation.events :as navigation]
|
||||
[taoensso.timbre :as log]
|
||||
[utils.re-frame :as rf]))
|
||||
@@ -22,60 +23,10 @@
|
||||
{}
|
||||
requests))
|
||||
|
||||
(defn- fetch-community-id-input
|
||||
[{:keys [db]}]
|
||||
(:communities/community-id-input db))
|
||||
|
||||
(rf/defn handle-response
|
||||
[_ response-js]
|
||||
{:dispatch [:sanitize-messages-and-process-response response-js]})
|
||||
|
||||
(rf/defn invite-users
|
||||
{:events [::invite-people-confirmation-pressed]}
|
||||
[cofx user-pk contacts]
|
||||
(let [community-id (fetch-community-id-input cofx)
|
||||
pks (if (seq user-pk)
|
||||
(conj contacts user-pk)
|
||||
contacts)]
|
||||
(when (seq pks)
|
||||
{:json-rpc/call [{:method "wakuext_inviteUsersToCommunity"
|
||||
:params [{:communityId community-id
|
||||
:users pks}]
|
||||
:js-response true
|
||||
:on-success #(re-frame/dispatch [::people-invited %])
|
||||
:on-error #(do
|
||||
(log/error "failed to invite-user community" %)
|
||||
(re-frame/dispatch [::failed-to-invite-people %]))}]})))
|
||||
|
||||
(rf/defn share-community
|
||||
{:events [::share-community-confirmation-pressed]}
|
||||
[cofx user-pk contacts]
|
||||
(let [community-id (fetch-community-id-input cofx)
|
||||
pks (if (seq user-pk)
|
||||
(conj contacts user-pk)
|
||||
contacts)]
|
||||
(when (seq pks)
|
||||
{:json-rpc/call [{:method "wakuext_shareCommunity"
|
||||
:params [{:communityId community-id
|
||||
:users pks}]
|
||||
:js-response true
|
||||
:on-success #(re-frame/dispatch [::people-invited %])
|
||||
:on-error #(do
|
||||
(log/error "failed to invite-user community" %)
|
||||
(re-frame/dispatch [::failed-to-share-community %]))}]})))
|
||||
|
||||
(re-frame/reg-event-fx :communities/invite-people-pressed
|
||||
(fn [{:keys [db]} [id]]
|
||||
{:db (assoc db :communities/community-id-input id)
|
||||
:fx [[:dispatch [:hide-bottom-sheet]]
|
||||
[:dispatch [:open-modal :legacy-invite-people-community {:invite? true}]]]}))
|
||||
|
||||
(re-frame/reg-event-fx :communities/share-community-pressed
|
||||
(fn [{:keys [db]} [id]]
|
||||
{:db (assoc db :communities/community-id-input id)
|
||||
:fx [[:dispatch [:hide-bottom-sheet]]
|
||||
[:dispatch [:open-modal :legacy-invite-people-community {}]]]}))
|
||||
|
||||
(rf/defn people-invited
|
||||
{:events [::people-invited]}
|
||||
[cofx response-js]
|
||||
@@ -90,6 +41,14 @@
|
||||
[:sanitize-messages-and-process-response response-js]
|
||||
[:activity-center.notifications/fetch-unread-count]]}))
|
||||
|
||||
(rf/defn member-banned
|
||||
{:events [::member-banned]}
|
||||
[cofx response-js]
|
||||
(rf/merge cofx
|
||||
(bottom-sheet/hide-bottom-sheet-old)
|
||||
(handle-response response-js)
|
||||
(activity-center/notifications-fetch-unread-count)))
|
||||
|
||||
(rf/defn member-ban
|
||||
{:events [::member-ban]}
|
||||
[cofx community-id public-key]
|
||||
|
||||
@@ -53,21 +53,22 @@
|
||||
false))
|
||||
:fx [[:activity-center.notifications/fetch-unread-count]
|
||||
[:effects/push-notifications-clear-message-notifications [public-key]]
|
||||
[:dispatch [:shell/close-switcher-card public-key]]]}
|
||||
[:dispatch-later
|
||||
[{:ms 500
|
||||
:dispatch [:chat.ui/close-and-remove-chat public-key]}]]]}
|
||||
fxs)))
|
||||
|
||||
(rf/defn block-contact
|
||||
{:events [:contact.ui/block-contact-confirmed]}
|
||||
[{:keys [db] :as cofx} public-key
|
||||
{:keys [handle-navigation?]
|
||||
:or {handle-navigation? true}}]
|
||||
[{:keys [db] :as cofx} public-key]
|
||||
(let [contact (-> (contact.db/public-key->contact
|
||||
(:contacts/contacts db)
|
||||
public-key)
|
||||
(assoc :blocked? true
|
||||
:added? false
|
||||
:active? false))
|
||||
from-one-to-one-chat? (not (get-in db [:chats (:current-chat-id db) :group-chat]))]
|
||||
current-chat-id (:current-chat-id db)
|
||||
from-one-to-one-chat? (not (get-in db [:chats current-chat-id :group-chat]))]
|
||||
(rf/merge cofx
|
||||
{:db (assoc-in db [:contacts/contacts public-key] contact)}
|
||||
(contacts-store/block
|
||||
@@ -77,7 +78,7 @@
|
||||
(re-frame/dispatch [:sanitize-messages-and-process-response block-contact])
|
||||
(re-frame/dispatch [:hide-popover])))
|
||||
;; reset navigation to avoid going back to non existing one to one chat
|
||||
(when handle-navigation?
|
||||
(when current-chat-id
|
||||
(if from-one-to-one-chat?
|
||||
(navigation/pop-to-root :shell-stack)
|
||||
(navigation/navigate-back))))))
|
||||
|
||||
@@ -62,25 +62,29 @@
|
||||
|
||||
(defn <-color
|
||||
[value]
|
||||
(if (string/starts-with? value "#") value (keyword value)))
|
||||
(if (and (some? value)
|
||||
(string/starts-with? value "#"))
|
||||
value
|
||||
(keyword value)))
|
||||
|
||||
(defn <-rpc
|
||||
[chat]
|
||||
(-> chat
|
||||
(set/rename-keys {:id :chat-id
|
||||
:communityId :community-id
|
||||
:syncedFrom :synced-from
|
||||
:syncedTo :synced-to
|
||||
:membershipUpdateEvents :membership-update-events
|
||||
:deletedAtClockValue :deleted-at-clock-value
|
||||
:chatType :chat-type
|
||||
:unviewedMessagesCount :unviewed-messages-count
|
||||
:unviewedMentionsCount :unviewed-mentions-count
|
||||
:lastMessage :last-message
|
||||
:lastClockValue :last-clock-value
|
||||
:invitationAdmin :invitation-admin
|
||||
:profile :profile-public-key
|
||||
:muteTill :muted-till})
|
||||
(set/rename-keys {:id :chat-id
|
||||
:communityId :community-id
|
||||
:syncedFrom :synced-from
|
||||
:syncedTo :synced-to
|
||||
:membershipUpdateEvents :membership-update-events
|
||||
:deletedAtClockValue :deleted-at-clock-value
|
||||
:chatType :chat-type
|
||||
:unviewedMessagesCount :unviewed-messages-count
|
||||
:unviewedMentionsCount :unviewed-mentions-count
|
||||
:lastMessage :last-message
|
||||
:lastClockValue :last-clock-value
|
||||
:invitationAdmin :invitation-admin
|
||||
:profile :profile-public-key
|
||||
:muteTill :muted-till
|
||||
:hideIfPermissionsNotMet :hide-if-permissions-not-met?})
|
||||
rpc->type
|
||||
unmarshal-members
|
||||
(update :last-message #(when % (messages/<-rpc %)))
|
||||
@@ -89,38 +93,41 @@
|
||||
|
||||
(defn <-rpc-js
|
||||
[^js chat]
|
||||
(-> {:name (.-name chat)
|
||||
:description (.-description chat)
|
||||
:color (<-color (.-color chat))
|
||||
:emoji (.-emoji chat)
|
||||
:timestamp (.-timestamp chat)
|
||||
:alias (.-alias chat)
|
||||
:muted (.-muted chat)
|
||||
:joined (.-joined chat)
|
||||
:muted-till (.-muteTill chat)
|
||||
:chat-id (.-id chat)
|
||||
:community-id (.-communityId chat)
|
||||
:synced-from (.-syncedFrom chat)
|
||||
:synced-to (.-syncedTo chat)
|
||||
:deleted-at-clock-value (.-deletedAtClockValue chat)
|
||||
:chat-type (.-chatType chat)
|
||||
:unviewed-messages-count (.-unviewedMessagesCount chat)
|
||||
:unviewed-mentions-count (.-unviewedMentionsCount chat)
|
||||
:last-message {:content {:text (.-text chat)
|
||||
:parsed-text (types/js->clj (.-parsedText chat))
|
||||
:response-to (.-responseTo chat)}
|
||||
:content-type (.-contentType chat)
|
||||
:community-id (.-contentCommunityId chat)
|
||||
:outgoing (boolean (.-outgoingStatus chat))
|
||||
:album-images-count (.-albumImagesCount chat)
|
||||
:from (.-from chat)
|
||||
:deleted? (.-deleted chat)
|
||||
:deleted-for-me? (.-deletedForMe chat)}
|
||||
:last-clock-value (.-lastClockValue chat)
|
||||
:profile-public-key (.-profile chat)
|
||||
:highlight (.-highlight chat)
|
||||
:active (.-active chat)
|
||||
:members (types/js->clj (.-members chat))}
|
||||
(-> {:name (.-name chat)
|
||||
:description (.-description chat)
|
||||
:color (<-color (.-color chat))
|
||||
:emoji (.-emoji chat)
|
||||
:timestamp (.-timestamp chat)
|
||||
:alias (.-alias chat)
|
||||
:muted (.-muted chat)
|
||||
:joined (.-joined chat)
|
||||
:muted-till (.-muteTill chat)
|
||||
:chat-id (.-id chat)
|
||||
:community-id (.-communityId chat)
|
||||
:synced-from (.-syncedFrom chat)
|
||||
:synced-to (.-syncedTo chat)
|
||||
:deleted-at-clock-value (.-deletedAtClockValue chat)
|
||||
:chat-type (.-chatType chat)
|
||||
:unviewed-messages-count (.-unviewedMessagesCount chat)
|
||||
:unviewed-mentions-count (.-unviewedMentionsCount chat)
|
||||
:last-message {:content {:text (.-text chat)
|
||||
:parsed-text (types/js->clj (.-parsedText
|
||||
chat))
|
||||
:response-to (.-responseTo chat)}
|
||||
:content-type (.-contentType chat)
|
||||
:community-id (.-contentCommunityId chat)
|
||||
:outgoing (boolean (.-outgoingStatus chat))
|
||||
:album-images-count (.-albumImagesCount chat)
|
||||
:from (.-from chat)
|
||||
:deleted? (.-deleted chat)
|
||||
:deleted-for-me? (.-deletedForMe chat)}
|
||||
:last-clock-value (.-lastClockValue chat)
|
||||
:profile-public-key (.-profile chat)
|
||||
:highlight (.-highlight chat)
|
||||
:active (.-active chat)
|
||||
:image (.-image chat)
|
||||
:members (types/js->clj (.-members chat))
|
||||
:hide-if-permissions-not-met (.-hideIfPermissionsNotMet chat)}
|
||||
rpc->type
|
||||
unmarshal-members))
|
||||
|
||||
|
||||
@@ -27,10 +27,11 @@
|
||||
(assoc acc
|
||||
(name k)
|
||||
(-> v
|
||||
(assoc :token-gated? (:tokenGated v)
|
||||
:can-post? (:canPost v)
|
||||
:can-view? (:canView v))
|
||||
(dissoc :canPost :tokenGated :canView)
|
||||
(assoc :token-gated? (:tokenGated v)
|
||||
:can-post? (:canPost v)
|
||||
:can-view? (:canView v)
|
||||
:hide-if-permissions-not-met? (:hideIfPermissionsNotMet v))
|
||||
(dissoc :canPost :tokenGated :canView :hideIfPermissionsNotMet)
|
||||
(update :members walk/stringify-keys))))
|
||||
{}
|
||||
chats))
|
||||
@@ -63,6 +64,7 @@
|
||||
:canJoin :can-join?
|
||||
:requestedToJoinAt :requested-to-join-at
|
||||
:isMember :is-member?
|
||||
:outroMessage :outro-message
|
||||
:adminSettings :admin-settings
|
||||
:tokenPermissions :token-permissions
|
||||
:communityTokensMetadata :tokens-metadata
|
||||
|
||||
@@ -2,18 +2,8 @@
|
||||
(:require
|
||||
[clojure.set :as set]
|
||||
[legacy.status-im.data-store.visibility-status-updates :as visibility-status-updates]
|
||||
[status-im.config :as config]
|
||||
[utils.ethereum.eip.eip55 :as eip55]))
|
||||
|
||||
(defn rpc->networks
|
||||
[networks]
|
||||
(reduce (fn [acc {:keys [id] :as network}]
|
||||
(assoc acc id network))
|
||||
{}
|
||||
(if (seq networks)
|
||||
networks
|
||||
config/default-networks)))
|
||||
|
||||
(defn rpc->visible-tokens
|
||||
[visible-tokens]
|
||||
(reduce-kv (fn [acc chain visible-tokens]
|
||||
@@ -28,25 +18,14 @@
|
||||
{}
|
||||
pinned-mailservers))
|
||||
|
||||
(defn rpc->custom-bootnodes
|
||||
[custom-bootnodes]
|
||||
(reduce-kv (fn [acc chain custom-bootnodes]
|
||||
(assoc acc (name chain) custom-bootnodes))
|
||||
{}
|
||||
custom-bootnodes))
|
||||
|
||||
(defn rpc->settings
|
||||
[settings]
|
||||
(-> settings
|
||||
(update :dapps-address eip55/address->checksum)
|
||||
(update :address eip55/address->checksum)
|
||||
(update :networks/networks rpc->networks)
|
||||
(update :networks/current-network #(if (seq %) % config/default-network))
|
||||
(update :wallet-legacy/visible-tokens rpc->visible-tokens)
|
||||
(update :pinned-mailservers rpc->pinned-mailservers)
|
||||
(update :link-previews-enabled-sites set)
|
||||
(update :custom-bootnodes rpc->custom-bootnodes)
|
||||
(update :custom-bootnodes-enabled? rpc->custom-bootnodes)
|
||||
(update :currency keyword)
|
||||
(visibility-status-updates/<-rpc-settings)
|
||||
(set/rename-keys {:compressedKey :compressed-key
|
||||
|
||||
@@ -56,8 +56,7 @@
|
||||
(rf/defn redirect-to-ens-summary
|
||||
{:events [::redirect-to-ens-summary]}
|
||||
[cofx]
|
||||
;; we reset navigation so that navigate back doesn't return
|
||||
;; into the registration flow
|
||||
;; we reset navigation so that navigate back doesn't return into the registration flow
|
||||
(rf/merge cofx
|
||||
(navigation/navigate-back-to :my-profile)
|
||||
(navigation/navigate-to :ens-confirmation {})))
|
||||
@@ -161,8 +160,8 @@
|
||||
(and (= response utils.ens/default-address) (not custom-domain?))
|
||||
(re-frame/dispatch [::name-resolved username :available])
|
||||
|
||||
;; if we get an address back, we try to get the public key associated
|
||||
;; with the username as well
|
||||
;; if we get an address back, we try to get the public key associated with the username as
|
||||
;; well
|
||||
(get addresses (eip55/address->checksum response))
|
||||
(ens/pubkey
|
||||
chain-id
|
||||
@@ -271,8 +270,7 @@
|
||||
(rf/merge cofx
|
||||
;; clear registration data
|
||||
{:db (dissoc db :ens/registration)}
|
||||
;; we reset navigation so that navigate back doesn't return
|
||||
;; into the registration flow
|
||||
;; we reset navigation so that navigate back doesn't return into the registration flow
|
||||
(navigation/navigate-back-to :my-profile)
|
||||
(navigation/navigate-to :ens-main {})))
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
(:require
|
||||
clojure.set
|
||||
legacy.status-im.backup.core
|
||||
legacy.status-im.bootnodes.core
|
||||
legacy.status-im.browser.core
|
||||
legacy.status-im.browser.permissions
|
||||
legacy.status-im.chat.models.loading
|
||||
@@ -13,7 +12,6 @@
|
||||
legacy.status-im.data-store.visibility-status-updates
|
||||
legacy.status-im.fleet.core
|
||||
legacy.status-im.group-chats.core
|
||||
[legacy.status-im.keycard.core :as keycard]
|
||||
legacy.status-im.log-level.core
|
||||
legacy.status-im.mailserver.constants
|
||||
[legacy.status-im.mailserver.core :as mailserver]
|
||||
@@ -192,14 +190,7 @@
|
||||
|
||||
(not (get db :screens/was-focused-once?))
|
||||
{:db (assoc db :screens/was-focused-once? true)})
|
||||
#(case view-id
|
||||
:keycard-settings (keycard/settings-screen-did-load %)
|
||||
:reset-card (keycard/reset-card-screen-did-load %)
|
||||
:enter-pin-settings (keycard/enter-pin-screen-did-load %)
|
||||
:keycard-login-pin (keycard/login-pin-screen-did-load %)
|
||||
:keycard-authentication-method (keycard/authentication-method-screen-did-load %)
|
||||
:multiaccounts (keycard/multiaccounts-screen-did-load %)
|
||||
nil)))
|
||||
))
|
||||
|
||||
;;TODO :replace by named events
|
||||
(rf/defn set-event
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
(ns legacy.status-im.keycard.backup-key
|
||||
(:require
|
||||
[legacy.status-im.ethereum.mnemonic :as mnemonic]
|
||||
[legacy.status-im.keycard.common :as common]
|
||||
[legacy.status-im.multiaccounts.recover.core :as multiaccounts.recover]
|
||||
[legacy.status-im.signing.core :as signing.core]
|
||||
[legacy.status-im.utils.utils :as utils]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.navigation.events :as navigation]
|
||||
[taoensso.timbre :as log]
|
||||
[utils.i18n :as i18n]
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
(rf/defn backup-card-pressed
|
||||
{:events [:keycard-settings.ui/backup-card-pressed]}
|
||||
[{:keys [db] :as cofx} backup-type]
|
||||
(log/debug "[keycard] start backup")
|
||||
(rf/merge cofx
|
||||
{:db (-> db
|
||||
(assoc-in [:keycard :creating-backup?] backup-type))}
|
||||
(when (:profile/profile db)
|
||||
(navigation/navigate-to :my-profile nil))
|
||||
(navigation/navigate-to :seed-phrase nil)))
|
||||
|
||||
(rf/defn recovery-card-pressed
|
||||
{:events [:keycard-settings.ui/recovery-card-pressed]}
|
||||
[{:keys [db] :as cofx} show-warning]
|
||||
(rf/merge cofx
|
||||
{:db (-> db
|
||||
;setting pin-retry-counter is a workaround for the way the PIN view
|
||||
;decides if it should accept PUK or PIN
|
||||
(assoc-in [:keycard :application-info :pin-retry-counter] 3)
|
||||
(assoc-in [:keycard :factory-reset-card?] true)
|
||||
(dissoc :popover/popover))
|
||||
:hide-popover nil}
|
||||
(signing.core/discard)
|
||||
(if show-warning
|
||||
(utils/show-confirmation
|
||||
{:title (i18n/label :t/keycard-recover-title)
|
||||
:content (i18n/label :t/keycard-recover-text)
|
||||
:confirm-button-text (i18n/label :t/yes)
|
||||
:cancel-button-text (i18n/label :t/no)
|
||||
:on-accept #(re-frame/dispatch [:keycard-settings.ui/backup-card-pressed
|
||||
:recovery-card])
|
||||
:on-cancel #()})
|
||||
(backup-card-pressed :recovery-card))))
|
||||
|
||||
(rf/defn start-keycard-backup
|
||||
{:events [::start-keycard-backup]}
|
||||
[{:keys [db] :as cofx}]
|
||||
{::multiaccounts.recover/import-multiaccount {:passphrase (-> db
|
||||
:profile/key-storage
|
||||
:seed-phrase
|
||||
mnemonic/sanitize-passphrase)
|
||||
:password nil
|
||||
:success-event ::create-backup-card}})
|
||||
|
||||
(rf/defn create-backup-card
|
||||
{:events [::create-backup-card]}
|
||||
[{:keys [db] :as cofx} root-data derived-data]
|
||||
(rf/merge cofx
|
||||
{:db (-> db
|
||||
(update :intro-wizard
|
||||
assoc
|
||||
:root-key root-data
|
||||
:derived derived-data
|
||||
:recovering? true
|
||||
:selected-storage-type :advanced)
|
||||
(assoc-in [:keycard :flow] :recovery)
|
||||
(update :profile/key-storage dissoc :seed-phrase))
|
||||
:dismiss-keyboard nil}
|
||||
(common/listen-to-hardware-back-button)
|
||||
(navigation/navigate-to :keycard-onboarding-intro nil)))
|
||||
@@ -1,565 +0,0 @@
|
||||
(ns legacy.status-im.keycard.card
|
||||
(:require
|
||||
[clojure.string :as string]
|
||||
[keycard.keycard :as keycard]
|
||||
[keycard.real-keycard :as real-keycard]
|
||||
[legacy.status-im.keycard.simulated-keycard :as simulated-keycard]
|
||||
[legacy.status-im.node.core :as node]
|
||||
[native-module.core :as native-module]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.config :as config]
|
||||
[taoensso.timbre :as log]
|
||||
[utils.transforms :as types]))
|
||||
|
||||
(defonce card
|
||||
(if config/keycard-test-menu-enabled?
|
||||
(simulated-keycard/SimulatedKeycard.)
|
||||
(real-keycard/RealKeycard.)))
|
||||
|
||||
(defn check-nfc-support
|
||||
[]
|
||||
(log/debug "[keycard] check-nfc-support")
|
||||
(keycard/check-nfc-support
|
||||
card
|
||||
{:on-success
|
||||
(fn [response]
|
||||
(log/debug "[keycard response] check-nfc-support")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/check-nfc-support-success response]))}))
|
||||
|
||||
(defn check-nfc-enabled
|
||||
[]
|
||||
(log/debug "[keycard] check-nfc-enabled")
|
||||
(keycard/check-nfc-enabled
|
||||
card
|
||||
{:on-success
|
||||
(fn [response]
|
||||
(log/debug "[keycard response] check-nfc-enabled")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/check-nfc-enabled-success response]))}))
|
||||
|
||||
(defn open-nfc-settings
|
||||
[]
|
||||
(log/debug "[keycard] open-nfc-settings")
|
||||
(keycard/open-nfc-settings card))
|
||||
|
||||
(defn remove-event-listener
|
||||
[event]
|
||||
(log/debug "[keycard] remove-event-listener")
|
||||
(keycard/remove-event-listener card event))
|
||||
|
||||
(defn on-card-disconnected
|
||||
[callback]
|
||||
(log/debug "[keycard] on-card-disconnected")
|
||||
(keycard/on-card-disconnected card callback))
|
||||
|
||||
(defn on-card-connected
|
||||
[callback]
|
||||
(log/debug "[keycard] on-card-connected")
|
||||
(keycard/on-card-connected card callback))
|
||||
|
||||
(defn remove-event-listeners
|
||||
[]
|
||||
(log/debug "[keycard] remove-event-listeners")
|
||||
(keycard/remove-event-listeners card))
|
||||
|
||||
(defn register-card-events
|
||||
[]
|
||||
(log/debug "[keycard] register-card-events")
|
||||
(keycard/register-card-events
|
||||
card
|
||||
{:on-card-connected
|
||||
#(re-frame/dispatch [:keycard.callback/on-card-connected])
|
||||
|
||||
:on-card-disconnected
|
||||
#(re-frame/dispatch [:keycard.callback/on-card-disconnected])
|
||||
|
||||
:on-nfc-user-cancelled
|
||||
#(re-frame/dispatch [:keycard.callback/on-nfc-user-cancelled])
|
||||
|
||||
:on-nfc-timeout
|
||||
#(re-frame/dispatch [:keycard.callback/on-nfc-timeout])
|
||||
|
||||
:on-nfc-enabled
|
||||
#(re-frame/dispatch [:keycard.callback/check-nfc-enabled-success true])
|
||||
|
||||
:on-nfc-disabled
|
||||
#(re-frame/dispatch [:keycard.callback/check-nfc-enabled-success false])}))
|
||||
|
||||
(defn- error-object->map
|
||||
[^js object]
|
||||
{:code (.-code object)
|
||||
:error (.-message object)})
|
||||
|
||||
(defn set-pairings
|
||||
[pairings]
|
||||
(log/debug "[keycard] open-nfc-settings")
|
||||
(keycard/set-pairings card {:pairings pairings}))
|
||||
|
||||
(defn get-application-info
|
||||
[{:keys [on-success] :as args}]
|
||||
(log/debug "[keycard] get-application-info")
|
||||
(keycard/get-application-info
|
||||
card
|
||||
(merge
|
||||
args
|
||||
{:on-success
|
||||
(fn [response]
|
||||
(log/debug "[keycard response succ] get-application-info")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/on-get-application-info-success
|
||||
response on-success]))
|
||||
:on-failure
|
||||
(fn [response]
|
||||
(log/debug "[keycard response fail] get-application-info")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/on-get-application-info-error
|
||||
(error-object->map response)]))})))
|
||||
|
||||
(defn factory-reset
|
||||
[{:keys [on-success] :as args}]
|
||||
(log/debug "[keycard] factory-reset")
|
||||
(keycard/factory-reset
|
||||
card
|
||||
(merge
|
||||
args
|
||||
{:on-success
|
||||
(fn [response]
|
||||
(log/debug "[keycard response succ] get-application-info")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/on-get-application-info-success
|
||||
response on-success]))
|
||||
:on-failure
|
||||
(fn [response]
|
||||
(log/debug "[keycard response fail] get-application-info")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/on-get-application-info-error
|
||||
(error-object->map response)]))})))
|
||||
|
||||
(defn install-applet
|
||||
[]
|
||||
(log/debug "[keycard] install-applet")
|
||||
(keycard/install-applet
|
||||
card
|
||||
{:on-success
|
||||
(fn [response]
|
||||
(log/debug "[keycard response succ] install-applet")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/on-install-applet-success response]))
|
||||
:on-failure
|
||||
(fn [response]
|
||||
(log/debug "[keycard response fail] install-applet")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/on-install-applet-error
|
||||
(error-object->map response)]))}))
|
||||
|
||||
(defn init-card
|
||||
[pin]
|
||||
(log/debug "[keycard] init-card")
|
||||
(keycard/init-card
|
||||
card
|
||||
{:pin pin
|
||||
:on-success
|
||||
(fn [response]
|
||||
(log/debug "[keycard response succ] init-card")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/on-init-card-success response]))
|
||||
:on-failure
|
||||
(fn [response]
|
||||
(log/debug "[keycard response fail] init-card")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/on-init-card-error
|
||||
(error-object->map response)]))}))
|
||||
|
||||
(defn install-applet-and-init-card
|
||||
[pin]
|
||||
(log/debug "[keycard] install-applet-and-init-card")
|
||||
(keycard/install-applet-and-init-card
|
||||
card
|
||||
{:pin pin
|
||||
:on-success
|
||||
(fn [response]
|
||||
(log/debug "[keycard response succ] install-applet-and-init-card")
|
||||
#(re-frame/dispatch
|
||||
[:keycard.callback/on-install-applet-and-init-card-success
|
||||
response]))
|
||||
:on-failure
|
||||
(fn [response]
|
||||
(log/debug "[keycard response fail] install-applet-and-init-card")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/on-install-applet-and-init-card-error
|
||||
(error-object->map response)]))}))
|
||||
|
||||
(defn pair
|
||||
[args]
|
||||
(log/debug "[keycard] pair")
|
||||
(keycard/pair
|
||||
card
|
||||
(merge
|
||||
args
|
||||
{:on-success
|
||||
(fn [response]
|
||||
(log/debug "[keycard response succ] pair")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/on-pair-success response]))
|
||||
:on-failure
|
||||
(fn [response]
|
||||
(log/debug "[keycard response fail] pair")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/on-pair-error (error-object->map response)]))})))
|
||||
|
||||
(defn generate-and-load-key
|
||||
[args]
|
||||
(log/debug "[keycard] generate-and-load-key")
|
||||
(keycard/generate-and-load-key
|
||||
card
|
||||
(merge
|
||||
args
|
||||
{:on-success
|
||||
(fn [response]
|
||||
(log/debug "[keycard response succ] generate-and-load-key")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/on-generate-and-load-key-success response]))
|
||||
:on-failure
|
||||
(fn [response]
|
||||
(log/debug "[keycard response fail] generate-and-load-key")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/on-generate-and-load-key-error
|
||||
(error-object->map response)]))})))
|
||||
|
||||
(defn unblock-pin
|
||||
[args]
|
||||
(log/debug "[keycard] unblock-pin")
|
||||
(keycard/unblock-pin
|
||||
card
|
||||
(merge
|
||||
args
|
||||
{:on-success
|
||||
(fn [response]
|
||||
(log/debug "[keycard response succ] unblock-pin")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/on-unblock-pin-success response]))
|
||||
:on-failure
|
||||
(fn [response]
|
||||
(log/debug "[keycard response fail] unblock-pin")
|
||||
(re-frame/dispatch [:keycard.callback/on-unblock-pin-error
|
||||
(error-object->map response)]))})))
|
||||
|
||||
(defn verify-pin
|
||||
[args]
|
||||
(log/debug "[keycard] verify-pin")
|
||||
(keycard/verify-pin
|
||||
card
|
||||
(merge
|
||||
args
|
||||
{:on-success
|
||||
(fn [response]
|
||||
(log/debug "[keycard response succ] verify-pin")
|
||||
(re-frame/dispatch [:keycard.callback/on-verify-pin-success
|
||||
response]))
|
||||
:on-failure
|
||||
(fn [response]
|
||||
(log/debug "[keycard response fail] verify-pin")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/on-verify-pin-error
|
||||
(error-object->map response)]))})))
|
||||
|
||||
(defn change-pin
|
||||
[args]
|
||||
(log/debug "[keycard] change-pin")
|
||||
(keycard/change-pin
|
||||
card
|
||||
(merge
|
||||
args
|
||||
{:on-success
|
||||
(fn [response]
|
||||
(log/debug "[keycard response succ] change-pin")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/on-change-pin-success response]))
|
||||
:on-failure
|
||||
(fn [response]
|
||||
(log/debug "[keycard response fail] change-pin")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/on-change-pin-error
|
||||
(error-object->map response)]))})))
|
||||
|
||||
(defn change-puk
|
||||
[args]
|
||||
(log/debug "[keycard] change-puk")
|
||||
(keycard/change-puk
|
||||
card
|
||||
(merge
|
||||
args
|
||||
{:on-success
|
||||
(fn [response]
|
||||
(log/debug "[keycard response succ] change-puk")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/on-change-puk-success response]))
|
||||
:on-failure
|
||||
(fn [response]
|
||||
(log/debug "[keycard response fail] change-puk")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/on-change-pin-error
|
||||
(error-object->map response)]))})))
|
||||
|
||||
(defn change-pairing
|
||||
[args]
|
||||
(log/debug "[keycard] change-pairing")
|
||||
(keycard/change-pairing
|
||||
card
|
||||
(merge
|
||||
args
|
||||
{:on-success
|
||||
(fn [response]
|
||||
(log/debug "[keycard response succ] change-pairing")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/on-change-pairing-success response]))
|
||||
:on-failure
|
||||
(fn [response]
|
||||
(log/debug "[keycard response fail] change-pairing")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/on-change-pin-error
|
||||
(error-object->map response)]))})))
|
||||
|
||||
(defn unpair
|
||||
[args]
|
||||
(log/debug "[keycard] unpair")
|
||||
(keycard/unpair
|
||||
card
|
||||
(merge
|
||||
args
|
||||
{:on-success
|
||||
(fn [response]
|
||||
(log/debug "[keycard response succ] unpair")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/on-unpair-success response]))
|
||||
:on-failure
|
||||
(fn [response]
|
||||
(log/debug "[keycard response fail] unpair")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/on-unpair-error
|
||||
(error-object->map response)]))})))
|
||||
|
||||
(defn delete
|
||||
[]
|
||||
(log/debug "[keycard] delete")
|
||||
(keycard/delete
|
||||
card
|
||||
{:on-success
|
||||
(fn [response]
|
||||
(log/debug "[keycard response succ] delete")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/on-delete-success response]))
|
||||
:on-failure
|
||||
(fn [response]
|
||||
(log/debug "[keycard response fail] delete")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/on-delete-error
|
||||
(error-object->map response)]))}))
|
||||
|
||||
(defn remove-key
|
||||
[args]
|
||||
(log/debug "[keycard] remove-key")
|
||||
(keycard/remove-key
|
||||
card
|
||||
(merge
|
||||
args
|
||||
{:on-success
|
||||
(fn [response]
|
||||
(log/debug "[keycard response succ] remove-key")
|
||||
(re-frame/dispatch [:keycard.callback/on-remove-key-success
|
||||
response]))
|
||||
:on-failure
|
||||
(fn [response]
|
||||
(log/debug "[keycard response fail] remove-key")
|
||||
(re-frame/dispatch [:keycard.callback/on-remove-key-error
|
||||
(error-object->map response)]))})))
|
||||
|
||||
(defn remove-key-with-unpair
|
||||
[args]
|
||||
(log/debug "[keycard] remove-key-with-unpair")
|
||||
(keycard/remove-key-with-unpair
|
||||
card
|
||||
(merge
|
||||
args
|
||||
{:on-success
|
||||
(fn [response]
|
||||
(log/debug "[keycard response succ] remove-key-with-unpair")
|
||||
(re-frame/dispatch [:keycard.callback/on-remove-key-success
|
||||
response]))
|
||||
:on-failure
|
||||
(fn [response]
|
||||
(log/debug "[keycard response fail] remove-key-with-unpair")
|
||||
(re-frame/dispatch [:keycard.callback/on-remove-key-error
|
||||
(error-object->map response)]))})))
|
||||
|
||||
(defn export-key
|
||||
[args]
|
||||
(log/debug "[keycard] export-key")
|
||||
(keycard/export-key
|
||||
card
|
||||
(merge
|
||||
args
|
||||
{:on-success
|
||||
(fn [_response]
|
||||
(log/debug "[keycard response succ] export-key")
|
||||
(js/alert "feature no longer supported"))
|
||||
:on-failure
|
||||
(fn [_response]
|
||||
(log/debug "[keycard response fail] export-key"))})))
|
||||
|
||||
(defn unpair-and-delete
|
||||
[args]
|
||||
(log/debug "[keycard] unpair-and-delete")
|
||||
(keycard/unpair
|
||||
card
|
||||
(merge
|
||||
args
|
||||
{:on-success
|
||||
(fn [response]
|
||||
(log/debug "[keycard response succ] unpair-and-delete")
|
||||
(re-frame/dispatch [:keycard.callback/on-unpair-and-delete-success
|
||||
response]))
|
||||
:on-failure
|
||||
(fn [response]
|
||||
(log/debug "[keycard response fail] unpair-and-delete")
|
||||
(re-frame/dispatch [:keycard.callback/on-unpair-and-delete-error
|
||||
(error-object->map response)]))})))
|
||||
|
||||
(defn import-keys
|
||||
[{:keys [on-success] :as args}]
|
||||
(log/debug "[keycard] import-keys")
|
||||
(keycard/import-keys
|
||||
card
|
||||
(assoc
|
||||
args
|
||||
:on-success
|
||||
(fn [response]
|
||||
(log/debug "[keycard response succ] import-keys")
|
||||
(re-frame/dispatch
|
||||
[(or on-success :keycard.callback/on-generate-and-load-key-success)
|
||||
response]))
|
||||
:on-failure
|
||||
(fn [response]
|
||||
(log/warn "[keycard response fail] import-keys"
|
||||
(error-object->map response))
|
||||
(re-frame/dispatch [:keycard.callback/on-get-keys-error
|
||||
(error-object->map response)])))))
|
||||
|
||||
(defn get-keys
|
||||
[{:keys [on-success] :as args}]
|
||||
(log/debug "[keycard] get-keys")
|
||||
(keycard/get-keys
|
||||
card
|
||||
(assoc
|
||||
args
|
||||
:on-success
|
||||
(fn [response]
|
||||
(log/debug "[keycard response succ] get-keys")
|
||||
(re-frame/dispatch
|
||||
[(or on-success :keycard.callback/on-get-keys-success)
|
||||
response]))
|
||||
:on-failure
|
||||
(fn [response]
|
||||
(log/warn "[keycard response fail] get-keys"
|
||||
(error-object->map response))
|
||||
(re-frame/dispatch [:keycard.callback/on-get-keys-error
|
||||
(error-object->map response)])))))
|
||||
|
||||
(defn sign
|
||||
[{:keys [on-success on-failure] :as args}]
|
||||
(log/debug "[keycard] sign")
|
||||
(keycard/sign
|
||||
card
|
||||
(merge
|
||||
args
|
||||
{:on-success
|
||||
(fn [response]
|
||||
(log/debug "[keycard response succ] sign")
|
||||
(if on-success
|
||||
(on-success response)
|
||||
(re-frame/dispatch [:keycard.callback/on-sign-success response])))
|
||||
:on-failure
|
||||
(fn [response]
|
||||
(log/debug "[keycard response fail] sign")
|
||||
(if on-failure
|
||||
(on-failure response)
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/on-sign-error
|
||||
(error-object->map response)])))})))
|
||||
|
||||
(defn install-cash-applet
|
||||
[]
|
||||
(log/debug "[keycard] install-cash-applet")
|
||||
(keycard/install-cash-applet
|
||||
card
|
||||
{:on-success
|
||||
(fn [response]
|
||||
(log/debug "[keycard response succ] install-cash-applet")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/on-install-applet-success response]))
|
||||
:on-failure
|
||||
(fn [response]
|
||||
(log/debug "[keycard response fail] install-cash-applet")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/on-install-applet-error
|
||||
(error-object->map response)]))}))
|
||||
|
||||
(defn sign-typed-data
|
||||
[{card-hash :hash}]
|
||||
(log/debug "[keycard] sign-typed-data")
|
||||
(keycard/sign-typed-data
|
||||
card
|
||||
{:hash card-hash
|
||||
:on-success
|
||||
(fn [response]
|
||||
(log/debug "[keycard response succ] sign-typed-data")
|
||||
(re-frame/dispatch [:keycard.callback/on-sign-success
|
||||
response]))
|
||||
:on-failure
|
||||
(fn [response]
|
||||
(log/debug "[keycard response fail] sign-typed-data")
|
||||
(re-frame/dispatch
|
||||
[:keycard.callback/on-sign-error
|
||||
(error-object->map response)]))}))
|
||||
|
||||
(defn save-multiaccount-and-login
|
||||
[_])
|
||||
|
||||
(defn login
|
||||
[{:keys [key-uid multiaccount-data password] :as args}]
|
||||
(if config/keycard-test-menu-enabled?
|
||||
(native-module/login-with-config key-uid multiaccount-data password node/login-node-config)
|
||||
(native-module/login-with-keycard (assoc args :node-config {:ProcessBackedupMessages false}))))
|
||||
|
||||
(def account-password (native-module/sha3 "no password"))
|
||||
|
||||
(defn send-transaction-with-signature
|
||||
[{:keys [transaction signature on-completed]}]
|
||||
(if config/keycard-test-menu-enabled?
|
||||
(native-module/send-transaction transaction account-password on-completed)
|
||||
(native-module/send-transaction-with-signature transaction signature on-completed)))
|
||||
|
||||
(defn start-nfc
|
||||
[args]
|
||||
(keycard/start-nfc card args))
|
||||
|
||||
(defn stop-nfc
|
||||
[args]
|
||||
(keycard/stop-nfc card args))
|
||||
|
||||
(defn set-nfc-message
|
||||
[args]
|
||||
(keycard/set-nfc-message card args))
|
||||
|
||||
(defn delete-multiaccount-before-migration
|
||||
[{:keys [key-uid on-success on-error]}]
|
||||
(if config/keycard-test-menu-enabled?
|
||||
(on-success)
|
||||
(native-module/delete-multiaccount
|
||||
key-uid
|
||||
(fn [result]
|
||||
(let [{:keys [error]} (types/json->clj result)]
|
||||
(if-not (string/blank? error)
|
||||
(on-error error)
|
||||
(on-success)))))))
|
||||
@@ -1,216 +0,0 @@
|
||||
(ns legacy.status-im.keycard.change-pin
|
||||
(:require
|
||||
[legacy.status-im.keycard.common :as common]
|
||||
[legacy.status-im.keycard.onboarding :as onboarding]
|
||||
[status-im.navigation.events :as navigation]
|
||||
[taoensso.timbre :as log]
|
||||
[utils.i18n :as i18n]
|
||||
[utils.re-frame :as rf]
|
||||
[utils.security.core :as security]))
|
||||
|
||||
(rf/defn change-credentials-pressed
|
||||
{:events [:keycard-settings.ui/change-credentials-pressed]}
|
||||
[{:keys [db] :as cofx} changing]
|
||||
(rf/merge cofx
|
||||
{:db
|
||||
(assoc-in db
|
||||
[:keycard :pin]
|
||||
{:enter-step :current
|
||||
:current []
|
||||
:puk []
|
||||
:original []
|
||||
:confirmation []
|
||||
:puk-original []
|
||||
:puk-confirmation []
|
||||
:status nil
|
||||
:error-label nil
|
||||
:on-verified (case changing
|
||||
:pin :keycard/proceed-to-change-pin
|
||||
:puk :keycard/proceed-to-change-puk
|
||||
:pairing :keycard/proceed-to-change-pairing)})}
|
||||
(common/navigate-to-enter-pin-screen)))
|
||||
|
||||
(rf/defn proceed-to-change-pin
|
||||
{:events [:keycard/proceed-to-change-pin]}
|
||||
[{:keys [db] :as cofx}]
|
||||
(rf/merge cofx
|
||||
{:db (-> db
|
||||
(assoc-in [:keycard :pin :enter-step] :original)
|
||||
(assoc-in [:keycard :pin :status] nil))}
|
||||
(navigation/navigate-replace :enter-pin-settings nil)))
|
||||
|
||||
(rf/defn proceed-to-change-puk
|
||||
{:events [:keycard/proceed-to-change-puk]}
|
||||
[{:keys [db] :as cofx}]
|
||||
(rf/merge cofx
|
||||
{:db (-> db
|
||||
(assoc-in [:keycard :pin :enter-step] :puk-original)
|
||||
(assoc-in [:keycard :pin :status] nil))}
|
||||
(navigation/navigate-replace :enter-pin-settings nil)))
|
||||
|
||||
(rf/defn proceed-to-change-pairing
|
||||
{:events [:keycard/proceed-to-change-pairing]}
|
||||
[{:keys [db] :as cofx}]
|
||||
(navigation/navigate-replace cofx :change-pairing-code nil))
|
||||
|
||||
(rf/defn discard-pin-change
|
||||
{:events [::on-cancel]}
|
||||
[{:keys [db] :as cofx}]
|
||||
(rf/merge cofx
|
||||
(common/clear-pin)
|
||||
(common/hide-connection-sheet)
|
||||
(if (get-in db [:keycard :pin :puk-restore?])
|
||||
(navigation/navigate-to :multiaccounts nil)
|
||||
(navigation/set-stack-root :profile-stack [:my-profile :keycard-settings]))))
|
||||
|
||||
(rf/defn change-pin
|
||||
{:events [:keycard/change-pin]}
|
||||
[{:keys [db] :as cofx}]
|
||||
(let [setup-step (get-in db [:keycard :setup-step])]
|
||||
(log/debug "[keycard] change-pin"
|
||||
"setup-step"
|
||||
setup-step)
|
||||
(if (= setup-step :pin)
|
||||
(onboarding/load-preparing-screen cofx)
|
||||
(common/show-connection-sheet
|
||||
cofx
|
||||
{:sheet-options {:on-cancel [::on-cancel]}
|
||||
:on-card-connected :keycard/change-pin
|
||||
:handler
|
||||
(fn [{:keys [db] :as cofx}]
|
||||
(let [new-pin (common/vector->string
|
||||
(get-in db [:keycard :pin :original]))
|
||||
current-pin (common/vector->string
|
||||
(get-in db [:keycard :pin :current]))]
|
||||
(rf/merge
|
||||
cofx
|
||||
{:db (assoc-in db [:keycard :pin :status] :verifying)
|
||||
|
||||
:keycard/change-pin
|
||||
{:new-pin new-pin
|
||||
:current-pin current-pin}})))}))))
|
||||
|
||||
(rf/defn change-puk
|
||||
{:events [:keycard/change-puk]}
|
||||
[{:keys [db] :as cofx}]
|
||||
(common/show-connection-sheet
|
||||
cofx
|
||||
{:sheet-options {:on-cancel [::on-cancel]}
|
||||
:on-card-connected :keycard/change-puk
|
||||
:handler
|
||||
(fn [{:keys [db] :as cofx}]
|
||||
(let [puk (common/vector->string
|
||||
(get-in db [:keycard :pin :puk-original]))
|
||||
pin (common/vector->string
|
||||
(get-in db [:keycard :pin :current]))]
|
||||
(rf/merge
|
||||
cofx
|
||||
{:db (assoc-in db [:keycard :pin :status] :verifying)
|
||||
:keycard/change-puk {:puk puk
|
||||
:pin pin}})))}))
|
||||
|
||||
(rf/defn change-pairing
|
||||
{:events [:keycard/change-pairing]}
|
||||
[{:keys [db] :as cofx}]
|
||||
(common/show-connection-sheet
|
||||
cofx
|
||||
{:sheet-options {:on-cancel [::on-cancel]}
|
||||
:on-card-connected :keycard/change-pairing
|
||||
:handler
|
||||
(fn [{:keys [db] :as cofx}]
|
||||
(let [pairing (get-in db [:keycard :pin :pairing-code])
|
||||
pin (common/vector->string
|
||||
(get-in db [:keycard :pin :current]))]
|
||||
(rf/merge
|
||||
cofx
|
||||
{:db (assoc-in db [:keycard :pin :status] :verifying)
|
||||
:keycard/change-pairing {:pairing pairing
|
||||
:pin pin}})))}))
|
||||
|
||||
(rf/defn change-pairing-code
|
||||
{:events [:keycard/change-pairing-code]}
|
||||
[{:keys [db] :as cofx} pairing]
|
||||
(rf/merge
|
||||
cofx
|
||||
{:db (assoc-in db [:keycard :pin :pairing-code] (security/unmask pairing))}
|
||||
(change-pairing)))
|
||||
|
||||
(rf/defn on-change-pin-success
|
||||
{:events [:keycard.callback/on-change-pin-success]}
|
||||
[{:keys [db] :as cofx}]
|
||||
(let [pin (get-in db [:keycard :pin :original])
|
||||
puk-restore? (get-in db [:keycard :pin :puk-restore?])]
|
||||
(rf/merge cofx
|
||||
{:db (assoc-in db
|
||||
[:keycard :pin]
|
||||
{:status nil
|
||||
:login pin
|
||||
:confirmation []
|
||||
:error-label nil})
|
||||
:effects.utils/show-popup {:title ""
|
||||
:content (i18n/label :t/pin-changed)}}
|
||||
(common/hide-connection-sheet)
|
||||
(if puk-restore?
|
||||
(navigation/navigate-to :multiaccounts nil)
|
||||
(navigation/set-stack-root :profile-stack [:my-profile :keycard-settings]))
|
||||
(when (:profile/login db)
|
||||
(common/get-keys-from-keycard)))))
|
||||
|
||||
(rf/defn on-change-puk-success
|
||||
{:events [:keycard.callback/on-change-puk-success]}
|
||||
[{:keys [db] :as cofx}]
|
||||
(rf/merge cofx
|
||||
{:db (assoc-in db
|
||||
[:keycard :pin]
|
||||
{:status nil
|
||||
:puk-original []
|
||||
:puk-confirmation []
|
||||
:error-label nil})
|
||||
:effects.utils/show-popup {:title ""
|
||||
:content (i18n/label :t/puk-changed)}}
|
||||
(common/hide-connection-sheet)
|
||||
(navigation/set-stack-root :profile-stack [:my-profile :keycard-settings])))
|
||||
|
||||
(rf/defn on-change-pairing-success
|
||||
{:events [:keycard.callback/on-change-pairing-success]}
|
||||
[{:keys [db] :as cofx}]
|
||||
(rf/merge cofx
|
||||
{:db (assoc-in db
|
||||
[:keycard :pin]
|
||||
{:status nil
|
||||
:pairing-code nil
|
||||
:error-label nil})
|
||||
:effects.utils/show-popup {:title ""
|
||||
:content (i18n/label :t/pairing-changed)}}
|
||||
(common/hide-connection-sheet)
|
||||
(navigation/set-stack-root :profile-stack [:my-profile :keycard-settings])))
|
||||
|
||||
(rf/defn on-change-pin-error
|
||||
{:events [:keycard.callback/on-change-pin-error]}
|
||||
[{:keys [db] :as cofx} error]
|
||||
(log/debug "[keycard] change pin error" error)
|
||||
(let [tag-was-lost? (common/tag-lost? (:error error))
|
||||
pin-retries (common/pin-retries (:error error))]
|
||||
(rf/merge
|
||||
cofx
|
||||
(if tag-was-lost?
|
||||
(rf/merge cofx
|
||||
{:db (assoc-in db [:keycard :pin :status] nil)}
|
||||
(common/set-on-card-connected :keycard/change-pin))
|
||||
(if-not (nil? pin-retries)
|
||||
(rf/merge cofx
|
||||
{:db (-> db
|
||||
(assoc-in [:keycard :application-info :pin-retry-counter] pin-retries)
|
||||
(update-in [:keycard :pin]
|
||||
assoc
|
||||
:status :error
|
||||
:enter-step :current
|
||||
:puk []
|
||||
:current []
|
||||
:original []
|
||||
:confirmation []
|
||||
:sign []
|
||||
:error-label :t/pin-mismatch))}
|
||||
(when (zero? pin-retries) (common/frozen-keycard-popup))
|
||||
(navigation/navigate-to :enter-pin-settings nil))
|
||||
(common/show-wrong-keycard-alert))))))
|
||||