Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f93a27f18b |
@@ -1,5 +0,0 @@
|
||||
{:lint-as
|
||||
{rewrite-clj.zip/subedit-> clojure.core/->
|
||||
rewrite-clj.zip/subedit->> clojure.core/->>
|
||||
rewrite-clj.zip/edit-> clojure.core/->
|
||||
rewrite-clj.zip/edit->> clojure.core/->>}}
|
||||
@@ -1 +0,0 @@
|
||||
{:hooks {:analyze-call {taoensso.encore/defalias taoensso.encore/defalias}}}
|
||||
@@ -1,16 +0,0 @@
|
||||
(ns taoensso.encore
|
||||
(:require
|
||||
[clj-kondo.hooks-api :as hooks]))
|
||||
|
||||
(defn defalias [{:keys [node]}]
|
||||
(let [[sym-raw src-raw] (rest (:children node))
|
||||
src (if src-raw src-raw sym-raw)
|
||||
sym (if src-raw
|
||||
sym-raw
|
||||
(symbol (name (hooks/sexpr src))))]
|
||||
{:node (with-meta
|
||||
(hooks/list-node
|
||||
[(hooks/token-node 'def)
|
||||
(hooks/token-node (hooks/sexpr sym))
|
||||
(hooks/token-node (hooks/sexpr src))])
|
||||
(meta src))}))
|
||||
@@ -1,26 +1,26 @@
|
||||
;; -*- mode: clojure -*-
|
||||
;; vi: ft=clojure
|
||||
{:width 105
|
||||
:remove {:fn-force-nl #{:noarg1-body}}
|
||||
{:width 105
|
||||
:style [;; community style
|
||||
;; https://github.com/kkinnear/zprint/blob/main/doc/reference.md#community
|
||||
:community
|
||||
|
||||
:style
|
||||
[;; community style https://github.com/kkinnear/zprint/blob/main/doc/reference.md#community
|
||||
:community
|
||||
;; no comma in map
|
||||
:no-comma
|
||||
|
||||
;; no comma in map
|
||||
:no-comma
|
||||
:custom-justify
|
||||
|
||||
:custom-justify
|
||||
;; respect all newlines
|
||||
;; https://github.com/kkinnear/zprint/blob/main/doc/reference.md#respect-nl
|
||||
:respect-nl
|
||||
|
||||
;; respect all newlines https://github.com/kkinnear/zprint/blob/main/doc/reference.md#respect-nl
|
||||
:respect-nl
|
||||
|
||||
;; respect blank line https://github.com/kkinnear/zprint/blob/main/doc/reference.md#respect-bl
|
||||
:respect-bl
|
||||
|
||||
;; hang multiline left-hand-thing https://github.com/kkinnear/zprint/issues/273
|
||||
:multi-lhs-hang]
|
||||
;; respect blank line
|
||||
;; https://github.com/kkinnear/zprint/blob/main/doc/reference.md#respect-bl
|
||||
:respect-bl
|
||||
|
||||
;; hang multiline left-hand-thing
|
||||
;; https://github.com/kkinnear/zprint/issues/273
|
||||
:multi-lhs-hang]
|
||||
:fn-map
|
||||
{"reg-sub" :arg1-pair
|
||||
"h/describe" :arg1-body
|
||||
@@ -50,9 +50,9 @@
|
||||
"assoc-some" "assoc"
|
||||
"conj-when" "conj"
|
||||
"conj-some" "conj"}
|
||||
|
||||
:remove {:fn-force-nl #{:noarg1-body}}
|
||||
:style-map
|
||||
{:no-comma {:map {:comma? false}}
|
||||
{:no-comma {:map {:comma? false}}
|
||||
:custom-justify
|
||||
{:doc "Justify everything using pre-1.1.2 approach"
|
||||
:binding {:justify? true :justify {:max-variance 1000}}
|
||||
|
||||
@@ -279,23 +279,20 @@ run-android: ##@run Build Android APK and start it on the device
|
||||
npx react-native run-android --appIdSuffix debug
|
||||
|
||||
SIMULATOR=iPhone 13
|
||||
# TODO: fix IOS_STATUS_GO_TARGETS to be either amd64 or arm64 when RN is upgraded
|
||||
run-ios: export TARGET := ios
|
||||
run-ios: export IOS_STATUS_GO_TARGETS := ios/arm64;iossimulator/amd64
|
||||
run-ios: export XCBeautify=$(shell which xcbeautify) # for react-native-cli to pick this up and to auto format output
|
||||
run-ios: export IOS_STATUS_GO_TARGETS := iossimulator/amd64
|
||||
run-ios: ##@run Build iOS app and start it in a simulator/device
|
||||
ifneq ("$(SIMULATOR)", "")
|
||||
npx react-native run-ios --simulator="$(SIMULATOR)"
|
||||
npx react-native run-ios --simulator="$(SIMULATOR)" | xcbeautify
|
||||
else
|
||||
npx react-native run-ios
|
||||
npx react-native run-ios | xcbeautify
|
||||
endif
|
||||
|
||||
show-ios-devices: ##@other shows connected ios device and its name
|
||||
xcrun xctrace list devices
|
||||
|
||||
# TODO: fix IOS_STATUS_GO_TARGETS to be either amd64 or arm64 when RN is upgraded
|
||||
run-ios-device: export TARGET := ios
|
||||
run-ios-device: export IOS_STATUS_GO_TARGETS := ios/arm64;iossimulator/amd64
|
||||
run-ios-device: export IOS_STATUS_GO_TARGETS := ios/arm64
|
||||
run-ios-device: ##@run iOS app and start it on a connected device by its name
|
||||
ifndef DEVICE_NAME
|
||||
$(error Usage: make run-ios-device DEVICE_NAME=your-device-name)
|
||||
@@ -330,7 +327,7 @@ lint-fix: ##@test Run code style checks and fix issues
|
||||
ALL_CLOJURE_FILES=$(call find_all_clojure_files) && \
|
||||
zprint '{:search-config? true}' -sw $$ALL_CLOJURE_FILES && \
|
||||
zprint '{:search-config? true}' -sw $$ALL_CLOJURE_FILES && \
|
||||
clojure-lsp --ns-exclude-regex ".*/\.clj-kondo/.*|.*/src/status_im/core\.cljs|.*/src/test_helpers/component_tests_preload\.cljs$$" clean-ns && \
|
||||
clojure-lsp --ns-exclude-regex ".*/src/status_im/core\.cljs|.*/src/test_helpers/component_tests_preload\.cljs$$" clean-ns && \
|
||||
sh scripts/lint/trailing-newline.sh --fix && \
|
||||
node_modules/.bin/prettier --write .
|
||||
|
||||
@@ -387,8 +384,9 @@ 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
|
||||
@scripts/check-metro-shadow-process.sh
|
||||
@@scripts/check-metro-shadow-process.sh
|
||||
rm -rf ./component-spec
|
||||
yarn install
|
||||
nodemon --exec 'yarn shadow-cljs compile component-test && jest --config=test/jest/jest.config.js --testEnvironment node ' -e cljs
|
||||
|
||||
component-test: export TARGET := clojure
|
||||
@@ -398,6 +396,7 @@ component-test: export JEST_USE_SILENT_REPORTER := false
|
||||
component-test: ##@test Run component tests once in NodeJS
|
||||
@scripts/check-metro-shadow-process.sh
|
||||
rm -rf ./component-spec
|
||||
yarn install
|
||||
yarn shadow-cljs compile component-test && \
|
||||
jest --clearCache && jest --config=test/jest/jest.config.js --testEnvironment node
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ buildToolsVersion=33.0.0
|
||||
supportLibVersion=28.0.0
|
||||
# This should match version from nix/pkgs/aapt2/default.nix
|
||||
gradlePluginVersion=7.4.2
|
||||
kotlinPluginVersion=1.9.0
|
||||
kotlinPluginVersion=1.7.22
|
||||
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
|
||||
+1
-3
@@ -78,9 +78,7 @@ pipeline {
|
||||
}
|
||||
stage('Upload') {
|
||||
steps { script {
|
||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||
env.DIAWI_URL = ios.uploadToDiawi()
|
||||
}
|
||||
env.DIAWI_URL = ios.uploadToDiawi()
|
||||
env.PKG_URL = env.DIAWI_URL
|
||||
jenkins.setBuildDesc(IPA: env.PKG_URL)
|
||||
} }
|
||||
|
||||
@@ -21,10 +21,8 @@ pipeline {
|
||||
/* See nix/README.md */
|
||||
NIX_IGNORE_SYMLINK_STORE = 1
|
||||
/* we source .bash_profile to be able to use nix-store */
|
||||
NIX_SSHOPTS = "-oStrictHostKeyChecking=no"
|
||||
NIX_SSHOPTS = "-o StrictHostKeyChecking=no source .profile;"
|
||||
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
|
||||
NIX_STORE_CMD = '/nix/var/nix/profiles/default/bin/nix-store'
|
||||
NIX_SSH_REMOTE = "ssh://${params.NIX_CACHE_USER}@${params.NIX_CACHE_HOST}?remote-program=${env.NIX_STORE_CMD}"
|
||||
}
|
||||
|
||||
options {
|
||||
@@ -44,21 +42,19 @@ pipeline {
|
||||
steps { script {
|
||||
nix.shell('nix-env -i openssh', sandbox: false, pure: false)
|
||||
/* some build targets don't build on MacOS */
|
||||
os = sh(script: 'uname', returnStdout: true).trim()
|
||||
arch = sh(script: 'arch', returnStdout: true).trim()
|
||||
os = sh(script: 'uname', returnStdout: true)
|
||||
arch = sh(script: 'arch', returnStdout: true)
|
||||
} }
|
||||
}
|
||||
stage('Build status-go') {
|
||||
steps { script {
|
||||
def platforms = ['mobile.android', 'mobile.ios', 'library']
|
||||
if (os != 'Darwin') { platforms.removeAll { it == 'mobile.ios' } }
|
||||
/* FIXME: "'x86_64-darwin' with features {} is required to build" */
|
||||
/* FIXME: Remove this when #16237 is merged. */
|
||||
if (arch == 'arm64') { platforms.removeAll { it == 'mobile.android' } }
|
||||
platforms.each { platform ->
|
||||
/* Allow for Android builds on Apple ARM. */
|
||||
env.NIXPKGS_SYSTEM_OVERRIDE = nixSysOverride(os, arch, platform)
|
||||
platforms.each { os ->
|
||||
nix.build(
|
||||
attr: "targets.status-go.${platform}",
|
||||
attr: "targets.status-go.${os}",
|
||||
sandbox: false,
|
||||
link: false
|
||||
)
|
||||
@@ -78,8 +74,6 @@ pipeline {
|
||||
}
|
||||
stage('Build android deps') {
|
||||
steps { script {
|
||||
/* Allow for Android builds on Apple ARM. */
|
||||
env.NIXPKGS_SYSTEM_OVERRIDE = nixSysOverride(os, arch, 'android')
|
||||
/* Build/fetch deps required to build android release. */
|
||||
nix.build(
|
||||
attr: 'targets.mobile.android.release.buildInputs',
|
||||
@@ -92,13 +86,9 @@ pipeline {
|
||||
stage('Build nix shell deps') {
|
||||
steps { script {
|
||||
def shells = ['android', 'ios', 'fastlane', 'keytool', 'clojure', 'gradle']
|
||||
if (os != 'Darwin') { shells.removeAll { it == 'ios' } }
|
||||
/* FIXME: "'x86_64-darwin' with features {} is required to build" */
|
||||
if (arch == 'arm64') { shells.removeAll { it == 'android' } }
|
||||
if (os != "Darwin") { shells.removeAll { it == 'ios' } }
|
||||
/* Build/fetch deps required to start default Nix shell. */
|
||||
shells.each { shell ->
|
||||
/* Allow for Android builds on Apple ARM. */
|
||||
env.NIXPKGS_SYSTEM_OVERRIDE = nixSysOverride(os, arch, shell)
|
||||
nix.build(
|
||||
attr: "shells.${shell}.buildInputs",
|
||||
sandbox: false,
|
||||
@@ -113,7 +103,8 @@ pipeline {
|
||||
nix.shell("""
|
||||
find /nix/store/ -mindepth 1 -maxdepth 1 -type d \
|
||||
-not -name '*.links' -and -not -name '*-status-mobile-*' \
|
||||
| xargs nix copy --to ${NIX_SSH_REMOTE}
|
||||
| xargs nix copy \
|
||||
--to ssh-ng://${params.NIX_CACHE_USER}@${params.NIX_CACHE_HOST}
|
||||
""",
|
||||
pure: false
|
||||
)
|
||||
@@ -128,11 +119,3 @@ pipeline {
|
||||
} }
|
||||
}
|
||||
}
|
||||
|
||||
def nixSysOverride(os, arch, target='android') {
|
||||
return (
|
||||
os == 'Darwin' &&
|
||||
arch == 'arm64' &&
|
||||
target =~ /.*android$/
|
||||
) ? 'x86_64-darwin' : ''
|
||||
}
|
||||
|
||||
+4
-35
@@ -212,15 +212,16 @@ Properties must be set on view level
|
||||
:bottom 0}
|
||||
```
|
||||
|
||||
### Animated styles in the style file
|
||||
### Apply animated styles in the style file
|
||||
|
||||
```clojure
|
||||
;; bad
|
||||
(defn circle
|
||||
[]
|
||||
(let [opacity (reanimated/use-shared-value 1)]
|
||||
[reanimated/view {:style [{:opacity opacity}
|
||||
style/circle-container]}]))
|
||||
[reanimated/view {:style (reanimated/apply-animations-to-style
|
||||
{:opacity opacity}
|
||||
style/circle-container)}]))
|
||||
|
||||
;; good
|
||||
(defn circle
|
||||
@@ -229,38 +230,6 @@ Properties must be set on view level
|
||||
[reanimated/view {:style (style/circle-container opacity)}]))
|
||||
```
|
||||
|
||||
### Pass a vector of styles to Reanimated view
|
||||
|
||||
Prefer to pass a vector of styles to `react-native.reanimated/view` `:style`
|
||||
prop instead of using `apply-animations-to-style` directly. For more details, check out Reanimated docs about [inline
|
||||
styles](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/your-first-animation/#defining-a-shared-value)
|
||||
and [useAnimatedStyle](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/animating-styles-and-props/#animating-styles).
|
||||
|
||||
```clojure
|
||||
(defn f-view []
|
||||
(let [scroll-x (reanimated/use-shared-value 0)
|
||||
opacity (reanimated/interpolate scroll-x [0 45 50] [1 1 0])]
|
||||
[reanimated/view
|
||||
;; bad
|
||||
{:style (reanimated/apply-animations-to-style
|
||||
{:opacity opacity
|
||||
:transform [{:translate-x scroll-x}]}
|
||||
{:flex-direction :row})}
|
||||
|
||||
;; good
|
||||
{:style [{:opacity opacity
|
||||
:transform [{:translate-x scroll-x}]}
|
||||
{:flex-direction :row}]}
|
||||
|
||||
;; other valid and good variants
|
||||
{:style [{:opacity opacity}
|
||||
{:transform [{:translate-x scroll-x}]}
|
||||
{:flex-direction :row}]}
|
||||
|
||||
{:style {:opacity opacity
|
||||
:transform [{:translate-x scroll-x}]
|
||||
:flex-direction :row}}]))
|
||||
```
|
||||
### Don't use percents to define width/height
|
||||
|
||||
In ReactNative, all layouts use the [flexbox
|
||||
|
||||
-345
@@ -1,345 +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);
|
||||
}
|
||||
}
|
||||
-66
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
-173
@@ -1,173 +0,0 @@
|
||||
package im.status.ethereum.module;
|
||||
|
||||
import com.facebook.react.bridge.ReactMethod;
|
||||
import com.facebook.react.bridge.ReactApplicationContext;
|
||||
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
||||
import com.facebook.react.bridge.Callback;
|
||||
import android.util.Log;
|
||||
import statusgo.Statusgo;
|
||||
import org.json.JSONException;
|
||||
import java.util.function.Function;
|
||||
import android.app.Activity;
|
||||
import android.view.WindowManager;
|
||||
import android.os.Build;
|
||||
import android.view.Window;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.content.SharedPreferences;
|
||||
|
||||
public class EncryptionUtils extends ReactContextBaseJavaModule {
|
||||
private static final String TAG = "EncryptionUtils";
|
||||
|
||||
private ReactApplicationContext reactContext;
|
||||
private Utils utils;
|
||||
|
||||
public EncryptionUtils(ReactApplicationContext reactContext) {
|
||||
super(reactContext);
|
||||
this.reactContext = reactContext;
|
||||
this.utils = new Utils(reactContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "EncryptionUtils";
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
private void initKeystore(final String keyUID, final Callback callback) throws JSONException {
|
||||
Log.d(TAG, "initKeystore");
|
||||
|
||||
final String commonKeydir = this.utils.pathCombine(this.utils.getNoBackupDirectory(), "/keystore");
|
||||
final String keydir = this.utils.pathCombine(commonKeydir, keyUID);
|
||||
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.initKeystore(keydir), callback);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void reEncryptDbAndKeystore(final String keyUID, final String password, final String newPassword, final Callback callback) throws JSONException {
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.changeDatabasePassword(keyUID, password, newPassword), callback);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void convertToKeycardAccount(final String keyUID, final String accountData, final String options, final String keycardUID, final String password,
|
||||
final String newPassword, final Callback callback) throws JSONException {
|
||||
final String keyStoreDir = this.utils.getKeyStorePath(keyUID);
|
||||
this.utils.executeRunnableStatusGoMethod(() -> {
|
||||
Statusgo.initKeystore(keyStoreDir);
|
||||
return Statusgo.convertToKeycardAccount(accountData, options, keycardUID, password, newPassword);
|
||||
}, callback);
|
||||
}
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
public String encodeTransfer(final String to, final String value) {
|
||||
return Statusgo.encodeTransfer(to, value);
|
||||
}
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
public String decodeParameters(final String decodeParamJSON) {
|
||||
return Statusgo.decodeParameters(decodeParamJSON);
|
||||
}
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
public String hexToNumber(final String hex) {
|
||||
return Statusgo.hexToNumber(hex);
|
||||
}
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
public String numberToHex(final String numString) {
|
||||
return Statusgo.numberToHex(numString);
|
||||
}
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
public String sha3(final String str) {
|
||||
return Statusgo.sha3(str);
|
||||
}
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
public String utf8ToHex(final String str) {
|
||||
return Statusgo.utf8ToHex(str);
|
||||
}
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
public String hexToUtf8(final String str) {
|
||||
return Statusgo.hexToUtf8(str);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void setBlankPreviewFlag(final Boolean blankPreview) {
|
||||
final SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this.reactContext);
|
||||
sharedPrefs.edit().putBoolean("BLANK_PREVIEW", blankPreview).commit();
|
||||
setSecureFlag();
|
||||
}
|
||||
|
||||
private void setSecureFlag() {
|
||||
final SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this.reactContext);
|
||||
final boolean setSecure = sharedPrefs.getBoolean("BLANK_PREVIEW", true);
|
||||
final Activity activity = this.reactContext.getCurrentActivity();
|
||||
if (activity != null) {
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
final Window window = activity.getWindow();
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH && setSecure) {
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_SECURE);
|
||||
} else {
|
||||
window.clearFlags(WindowManager.LayoutParams.FLAG_SECURE);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void hashTransaction(final String txArgsJSON, final Callback callback) throws JSONException {
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.hashTransaction(txArgsJSON), callback);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void hashMessage(final String message, final Callback callback) throws JSONException {
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.hashMessage(message), callback);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void multiformatDeserializePublicKey(final String multiCodecKey, final String base58btc, final Callback callback) throws JSONException {
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.multiformatDeserializePublicKey(multiCodecKey,base58btc), callback);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void deserializeAndCompressKey(final String desktopKey, final Callback callback) throws JSONException {
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.deserializeAndCompressKey(desktopKey), callback);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void hashTypedData(final String data, final Callback callback) throws JSONException {
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.hashTypedData(data), callback);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void hashTypedDataV4(final String data, final Callback callback) throws JSONException {
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.hashTypedDataV4(data), callback);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void signMessage(final String rpcParams, final Callback callback) throws JSONException {
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.signMessage(rpcParams), callback);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void signTypedData(final String data, final String account, final String password, final Callback callback) throws JSONException {
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.signTypedData(data, account, password), callback);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void signTypedDataV4(final String data, final String account, final String password, final Callback callback) throws JSONException {
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.signTypedDataV4(data, account, password), callback);
|
||||
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void signGroupMembership(final String content, final Callback callback) throws JSONException {
|
||||
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.signGroupMembership(content), callback);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
-227
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
-78
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
+1222
-10
File diff suppressed because it is too large
Load Diff
-7
@@ -30,13 +30,6 @@ public class StatusPackage implements ReactPackage {
|
||||
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;
|
||||
|
||||
-124
@@ -1,124 +0,0 @@
|
||||
package im.status.ethereum.module;
|
||||
|
||||
import com.facebook.react.bridge.ReactMethod;
|
||||
import com.facebook.react.bridge.ReactApplicationContext;
|
||||
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
||||
import android.app.Activity;
|
||||
import android.util.Log;
|
||||
import android.os.Build;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.CookieManager;
|
||||
import android.webkit.CookieSyncManager;
|
||||
import android.webkit.WebStorage;
|
||||
import android.view.WindowManager;
|
||||
import com.facebook.react.uimanager.UIManagerModule;
|
||||
import com.facebook.react.uimanager.UIBlock;
|
||||
import com.facebook.react.uimanager.NativeViewHierarchyManager;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.content.Context;
|
||||
|
||||
public class UIHelper extends ReactContextBaseJavaModule {
|
||||
private static final String TAG = "UIHelper";
|
||||
private ReactApplicationContext reactContext;
|
||||
|
||||
public UIHelper(ReactApplicationContext reactContext) {
|
||||
super(reactContext);
|
||||
this.reactContext = reactContext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "UIHelper";
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void setSoftInputMode(final int mode) {
|
||||
Log.d(TAG, "setSoftInputMode");
|
||||
final Activity activity = getCurrentActivity();
|
||||
if (activity == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
activity.getWindow().setSoftInputMode(mode);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@ReactMethod
|
||||
public void clearCookies() {
|
||||
Log.d(TAG, "clearCookies");
|
||||
final Activity activity = getCurrentActivity();
|
||||
if (activity == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP_MR1) {
|
||||
CookieManager.getInstance().removeAllCookies(null);
|
||||
CookieManager.getInstance().flush();
|
||||
} else {
|
||||
CookieSyncManager cookieSyncManager = CookieSyncManager.createInstance(activity);
|
||||
cookieSyncManager.startSync();
|
||||
CookieManager cookieManager = CookieManager.getInstance();
|
||||
cookieManager.removeAllCookie();
|
||||
cookieManager.removeSessionCookie();
|
||||
cookieSyncManager.stopSync();
|
||||
cookieSyncManager.sync();
|
||||
}
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void toggleWebviewDebug(final boolean val) {
|
||||
Log.d(TAG, "toggleWebviewDebug");
|
||||
final Activity activity = getCurrentActivity();
|
||||
if (activity == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
WebView.setWebContentsDebuggingEnabled(val);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void clearStorageAPIs() {
|
||||
Log.d(TAG, "clearStorageAPIs");
|
||||
final Activity activity = getCurrentActivity();
|
||||
if (activity == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
WebStorage storage = WebStorage.getInstance();
|
||||
if (storage != null) {
|
||||
storage.deleteAllData();
|
||||
}
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void resetKeyboardInputCursor(final int reactTagToReset, final int selection) {
|
||||
UIManagerModule uiManager = getReactApplicationContext().getNativeModule(UIManagerModule.class);
|
||||
uiManager.addUIBlock(new UIBlock() {
|
||||
@Override
|
||||
public void execute(NativeViewHierarchyManager nativeViewHierarchyManager) {
|
||||
InputMethodManager imm = (InputMethodManager) getReactApplicationContext().getBaseContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
if (imm != null) {
|
||||
View viewToReset = nativeViewHierarchyManager.resolveView(reactTagToReset);
|
||||
imm.restartInput(viewToReset);
|
||||
try {
|
||||
EditText textView = (EditText) viewToReset;
|
||||
textView.setSelection(selection);
|
||||
} catch (Exception e) {}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
-155
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
#import <sys/utsname.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#import "Statusgo.h"
|
||||
#import "RCTLog.h"
|
||||
|
||||
@interface AccountManager : NSObject <RCTBridgeModule>
|
||||
|
||||
@end
|
||||
@@ -1,217 +0,0 @@
|
||||
#import "AccountManager.h"
|
||||
#import "React/RCTBridge.h"
|
||||
#import "React/RCTEventDispatcher.h"
|
||||
#import "Statusgo.h"
|
||||
#import "Utils.h"
|
||||
|
||||
@implementation AccountManager
|
||||
|
||||
RCT_EXPORT_MODULE();
|
||||
|
||||
RCT_EXPORT_METHOD(createAccountAndLogin:(NSString *)request) {
|
||||
#if DEBUG
|
||||
NSLog(@"createAccountAndLogin() method called");
|
||||
#endif
|
||||
StatusgoCreateAccountAndLogin(request);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(restoreAccountAndLogin:(NSString *)request) {
|
||||
#if DEBUG
|
||||
NSLog(@"restoreAccountAndLogin() method called");
|
||||
#endif
|
||||
StatusgoRestoreAccountAndLogin(request);
|
||||
}
|
||||
|
||||
-(NSString *) prepareDirAndUpdateConfig:(NSString *)config
|
||||
withKeyUID:(NSString *)keyUID {
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
NSError *error = nil;
|
||||
NSURL *rootUrl =[[fileManager
|
||||
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
|
||||
lastObject];
|
||||
NSURL *absTestnetFolderName = [rootUrl URLByAppendingPathComponent:@"ethereum/testnet"];
|
||||
|
||||
if (![fileManager fileExistsAtPath:absTestnetFolderName.path])
|
||||
[fileManager createDirectoryAtPath:absTestnetFolderName.path withIntermediateDirectories:YES attributes:nil error:&error];
|
||||
|
||||
NSURL *flagFolderUrl = [rootUrl URLByAppendingPathComponent:@"ropsten_flag"];
|
||||
|
||||
if(![fileManager fileExistsAtPath:flagFolderUrl.path]){
|
||||
NSLog(@"remove lightchaindata");
|
||||
NSURL *absLightChainDataUrl = [absTestnetFolderName URLByAppendingPathComponent:@"StatusIM/lightchaindata"];
|
||||
if([fileManager fileExistsAtPath:absLightChainDataUrl.path]) {
|
||||
[fileManager removeItemAtPath:absLightChainDataUrl.path
|
||||
error:nil];
|
||||
}
|
||||
[fileManager createDirectoryAtPath:flagFolderUrl.path
|
||||
withIntermediateDirectories:NO
|
||||
attributes:nil
|
||||
error:&error];
|
||||
}
|
||||
|
||||
NSLog(@"after remove lightchaindata");
|
||||
|
||||
NSString *keystore = @"keystore";
|
||||
NSURL *absTestnetKeystoreUrl = [absTestnetFolderName URLByAppendingPathComponent:keystore];
|
||||
NSURL *absKeystoreUrl = [rootUrl URLByAppendingPathComponent:keystore];
|
||||
if([fileManager fileExistsAtPath:absTestnetKeystoreUrl.path]){
|
||||
NSLog(@"copy keystore");
|
||||
[fileManager copyItemAtPath:absTestnetKeystoreUrl.path toPath:absKeystoreUrl.path error:nil];
|
||||
[fileManager removeItemAtPath:absTestnetKeystoreUrl.path error:nil];
|
||||
}
|
||||
|
||||
NSLog(@"after lightChainData");
|
||||
|
||||
NSLog(@"preconfig: %@", config);
|
||||
NSData *configData = [config dataUsingEncoding:NSUTF8StringEncoding];
|
||||
NSDictionary *configJSON = [NSJSONSerialization JSONObjectWithData:configData options:NSJSONReadingMutableContainers error:nil];
|
||||
NSString *relativeDataDir = [configJSON objectForKey:@"DataDir"];
|
||||
NSString *absDataDir = [rootUrl.path stringByAppendingString:relativeDataDir];
|
||||
NSURL *absDataDirUrl = [NSURL fileURLWithPath:absDataDir];
|
||||
NSString *keystoreDir = [@"/keystore/" stringByAppendingString:keyUID];
|
||||
[configJSON setValue:keystoreDir forKey:@"KeyStoreDir"];
|
||||
[configJSON setValue:@"" forKey:@"LogDir"];
|
||||
[configJSON setValue:@"geth.log" forKey:@"LogFile"];
|
||||
NSString *resultingConfig = [Utils jsonStringWithPrettyPrint:NO fromDictionary:configJSON];
|
||||
|
||||
NSLog(@"node config %@", resultingConfig);
|
||||
|
||||
if(![fileManager fileExistsAtPath:absDataDir]) {
|
||||
[fileManager createDirectoryAtPath:absDataDir
|
||||
withIntermediateDirectories:YES attributes:nil error:nil];
|
||||
}
|
||||
|
||||
NSLog(@"logUrlPath %@ rootDir %@", @"geth.log", rootUrl.path);
|
||||
NSURL *absLogUrl = [absDataDirUrl URLByAppendingPathComponent:@"geth.log"];
|
||||
if(![fileManager fileExistsAtPath:absLogUrl.path]) {
|
||||
NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
|
||||
[dict setObject:[NSNumber numberWithInt:511] forKey:NSFilePosixPermissions];
|
||||
[fileManager createFileAtPath:absLogUrl.path contents:nil attributes:dict];
|
||||
}
|
||||
|
||||
return resultingConfig;
|
||||
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(deleteMultiaccount:(NSString *)keyUID
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
#if DEBUG
|
||||
NSLog(@"DeleteMultiaccount() method called");
|
||||
#endif
|
||||
NSURL *multiaccountKeystoreDir = [Utils getKeyStoreDirForKeyUID:keyUID];
|
||||
NSString *result = StatusgoDeleteMultiaccount(keyUID, multiaccountKeystoreDir.path);
|
||||
callback(@[result]);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(prepareDirAndUpdateConfig:(NSString *)keyUID
|
||||
config:(NSString *)config
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
#if DEBUG
|
||||
NSLog(@"PrepareDirAndUpdateConfig() method called");
|
||||
#endif
|
||||
NSString *updatedConfig = [self prepareDirAndUpdateConfig:config
|
||||
withKeyUID:keyUID];
|
||||
callback(@[updatedConfig]);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(saveAccountAndLoginWithKeycard:(NSString *)multiaccountData
|
||||
password:(NSString *)password
|
||||
settings:(NSString *)settings
|
||||
config:(NSString *)config
|
||||
accountsData:(NSString *)accountsData
|
||||
chatKey:(NSString *)chatKey) {
|
||||
#if DEBUG
|
||||
NSLog(@"SaveAccountAndLoginWithKeycard() method called");
|
||||
#endif
|
||||
[Utils getExportDbFilePath];
|
||||
NSString *keyUID = [Utils getKeyUID:multiaccountData];
|
||||
NSString *finalConfig = [self prepareDirAndUpdateConfig:config
|
||||
withKeyUID:keyUID];
|
||||
NSString *result = StatusgoSaveAccountAndLoginWithKeycard(multiaccountData, password, settings, finalConfig, accountsData, chatKey);
|
||||
NSLog(@"%@", result);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(loginWithKeycard:(NSString *)accountData
|
||||
password:(NSString *)password
|
||||
chatKey:(NSString *)chatKey
|
||||
nodeConfigJSON:(NSString *)nodeConfigJSON) {
|
||||
#if DEBUG
|
||||
NSLog(@"LoginWithKeycard() method called");
|
||||
#endif
|
||||
[Utils getExportDbFilePath];
|
||||
[Utils migrateKeystore:accountData password:password];
|
||||
|
||||
NSString *result = StatusgoLoginWithKeycard(accountData, password, chatKey, nodeConfigJSON);
|
||||
|
||||
NSLog(@"%@", result);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(loginWithConfig:(NSString *)accountData
|
||||
password:(NSString *)password
|
||||
configJSON:(NSString *)configJSON) {
|
||||
#if DEBUG
|
||||
NSLog(@"LoginWithConfig() method called");
|
||||
#endif
|
||||
[Utils getExportDbFilePath];
|
||||
[Utils migrateKeystore:accountData password:password];
|
||||
NSString *result = StatusgoLoginWithConfig(accountData, password, configJSON);
|
||||
NSLog(@"%@", result);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(loginAccount:(NSString *)request) {
|
||||
#if DEBUG
|
||||
NSLog(@"LoginAccount() method called");
|
||||
#endif
|
||||
NSString *result = StatusgoLoginAccount(request);
|
||||
NSLog(@"%@", result);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(verify:(NSString *)address
|
||||
password:(NSString *)password
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
#if DEBUG
|
||||
NSLog(@"VerifyAccountPassword() method called");
|
||||
#endif
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
NSURL *rootUrl =[[fileManager
|
||||
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
|
||||
lastObject];
|
||||
NSURL *absKeystoreUrl = [rootUrl URLByAppendingPathComponent:@"keystore"];
|
||||
|
||||
NSString *result = StatusgoVerifyAccountPassword(absKeystoreUrl.path, address, password);
|
||||
callback(@[result]);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(verifyDatabasePassword:(NSString *)keyUID
|
||||
password:(NSString *)password
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
#if DEBUG
|
||||
NSLog(@"VerifyDatabasePassword() method called");
|
||||
#endif
|
||||
NSString *result = StatusgoVerifyDatabasePassword(keyUID, password);
|
||||
callback(@[result]);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(openAccounts:(RCTResponseSenderBlock)callback) {
|
||||
#if DEBUG
|
||||
NSLog(@"OpenAccounts() method called");
|
||||
#endif
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
NSURL *rootUrl =[[fileManager
|
||||
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
|
||||
lastObject];
|
||||
|
||||
NSString *result = StatusgoOpenAccounts(rootUrl.path);
|
||||
callback(@[result]);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(logout) {
|
||||
#if DEBUG
|
||||
NSLog(@"Logout() method called");
|
||||
#endif
|
||||
NSString *result = StatusgoLogout();
|
||||
|
||||
NSLog(@"%@", result);
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,9 +0,0 @@
|
||||
#import <sys/utsname.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#import "Statusgo.h"
|
||||
#import "RCTLog.h"
|
||||
|
||||
@interface DatabaseManager : NSObject <RCTBridgeModule>
|
||||
|
||||
@end
|
||||
@@ -1,33 +0,0 @@
|
||||
#import "DatabaseManager.h"
|
||||
#import "React/RCTBridge.h"
|
||||
#import "React/RCTEventDispatcher.h"
|
||||
#import "Statusgo.h"
|
||||
#import "Utils.h"
|
||||
|
||||
@implementation DatabaseManager
|
||||
|
||||
RCT_EXPORT_MODULE();
|
||||
|
||||
RCT_EXPORT_METHOD(exportUnencryptedDatabase:(NSString *)accountData
|
||||
password:(NSString *)password
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
#if DEBUG
|
||||
NSLog(@"exportUnencryptedDatabase() method called");
|
||||
#endif
|
||||
|
||||
NSString *filePath = [Utils getExportDbFilePath];
|
||||
StatusgoExportUnencryptedDatabase(accountData, password, filePath);
|
||||
|
||||
callback(@[filePath]);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(importUnencryptedDatabase:(NSString *)accountData
|
||||
password:(NSString *)password) {
|
||||
#if DEBUG
|
||||
NSLog(@"importUnencryptedDatabase() method called");
|
||||
#endif
|
||||
"";
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
@@ -1,9 +0,0 @@
|
||||
#import <sys/utsname.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#import "Statusgo.h"
|
||||
#import "RCTLog.h"
|
||||
|
||||
@interface EncryptionUtils : NSObject <RCTBridgeModule>
|
||||
|
||||
@end
|
||||
@@ -1,200 +0,0 @@
|
||||
#import "EncryptionUtils.h"
|
||||
#import "React/RCTBridge.h"
|
||||
#import "React/RCTEventDispatcher.h"
|
||||
#import "Statusgo.h"
|
||||
#import "Utils.h"
|
||||
|
||||
@implementation EncryptionUtils
|
||||
|
||||
RCT_EXPORT_MODULE();
|
||||
|
||||
#pragma mark - InitKeystore method
|
||||
|
||||
RCT_EXPORT_METHOD(initKeystore:(NSString *)keyUID
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
#if DEBUG
|
||||
NSLog(@"initKeystore() method called");
|
||||
#endif
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
NSURL *rootUrl =[[fileManager
|
||||
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
|
||||
lastObject];
|
||||
|
||||
NSURL *commonKeystoreDir = [rootUrl URLByAppendingPathComponent:@"keystore"];
|
||||
NSURL *keystoreDir = [commonKeystoreDir URLByAppendingPathComponent:keyUID];
|
||||
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0),
|
||||
^(void)
|
||||
{
|
||||
NSString *res = StatusgoInitKeystore(keystoreDir.path);
|
||||
NSLog(@"InitKeyStore result %@", res);
|
||||
callback(@[]);
|
||||
});
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(reEncryptDbAndKeystore:(NSString *)keyUID
|
||||
currentPassword:(NSString *)currentPassword
|
||||
newPassword:(NSString *)newPassword
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
#if DEBUG
|
||||
NSLog(@"reEncryptDbAndKeystore() method called");
|
||||
#endif
|
||||
// changes password and re-encrypts keystore
|
||||
NSString *result = StatusgoChangeDatabasePassword(keyUID, currentPassword, newPassword);
|
||||
callback(@[result]);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(convertToKeycardAccount:(NSString *)keyUID
|
||||
accountData:(NSString *)accountData
|
||||
settings:(NSString *)settings
|
||||
keycardUID:(NSString *)keycardUID
|
||||
currentPassword:(NSString *)currentPassword
|
||||
newPassword:(NSString *)newPassword
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
#if DEBUG
|
||||
NSLog(@"convertToKeycardAccount() method called");
|
||||
#endif
|
||||
NSURL *multiaccountKeystoreDir = [Utils getKeyStoreDirForKeyUID:keyUID];
|
||||
StatusgoInitKeystore(multiaccountKeystoreDir.path);
|
||||
NSString *result = StatusgoConvertToKeycardAccount(accountData, settings, keycardUID, currentPassword, newPassword);
|
||||
callback(@[result]);
|
||||
}
|
||||
|
||||
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(encodeTransfer:(NSString *)to
|
||||
value:(NSString *)value) {
|
||||
return StatusgoEncodeTransfer(to,value);
|
||||
}
|
||||
|
||||
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(encodeFunctionCall:(NSString *)method
|
||||
paramsJSON:(NSString *)paramsJSON) {
|
||||
return StatusgoEncodeFunctionCall(method,paramsJSON);
|
||||
}
|
||||
|
||||
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(decodeParameters:(NSString *)decodeParamJSON) {
|
||||
return StatusgoDecodeParameters(decodeParamJSON);
|
||||
}
|
||||
|
||||
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(hexToNumber:(NSString *)hex) {
|
||||
return StatusgoHexToNumber(hex);
|
||||
}
|
||||
|
||||
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(numberToHex:(NSString *)numString) {
|
||||
return StatusgoNumberToHex(numString);
|
||||
}
|
||||
|
||||
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(sha3:(NSString *)str) {
|
||||
return StatusgoSha3(str);
|
||||
}
|
||||
|
||||
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(utf8ToHex:(NSString *)str) {
|
||||
return StatusgoUtf8ToHex(str);
|
||||
}
|
||||
|
||||
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(hexToUtf8:(NSString *)str) {
|
||||
return StatusgoHexToUtf8(str);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(setBlankPreviewFlag:(BOOL *)newValue)
|
||||
{
|
||||
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
|
||||
|
||||
[userDefaults setBool:newValue forKey:@"BLANK_PREVIEW"];
|
||||
|
||||
[userDefaults synchronize];
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(hashTransaction:(NSString *)txArgsJSON
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
#if DEBUG
|
||||
NSLog(@"HashTransaction() method called");
|
||||
#endif
|
||||
NSString *result = StatusgoHashTransaction(txArgsJSON);
|
||||
callback(@[result]);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(hashMessage:(NSString *)message
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
#if DEBUG
|
||||
NSLog(@"hashMessage() method called");
|
||||
#endif
|
||||
NSString *result = StatusgoHashMessage(message);
|
||||
callback(@[result]);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(localPairingPreflightOutboundCheck:(RCTResponseSenderBlock)callback) {
|
||||
#if DEBUG
|
||||
NSLog(@"LocalPairingPreflightOutboundCheck() method called");
|
||||
#endif
|
||||
NSString *result = StatusgoLocalPairingPreflightOutboundCheck();
|
||||
callback(@[result]);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(multiformatDeserializePublicKey:(NSString *)multiCodecKey
|
||||
base58btc:(NSString *)base58btc
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
NSString *result = StatusgoMultiformatDeserializePublicKey(multiCodecKey,base58btc);
|
||||
callback(@[result]);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(deserializeAndCompressKey:(NSString *)desktopKey
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
NSString *result = StatusgoDeserializeAndCompressKey(desktopKey);
|
||||
callback(@[result]);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(hashTypedData:(NSString *)data
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
#if DEBUG
|
||||
NSLog(@"hashTypedData() method called");
|
||||
#endif
|
||||
NSString *result = StatusgoHashTypedData(data);
|
||||
callback(@[result]);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(hashTypedDataV4:(NSString *)data
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
#if DEBUG
|
||||
NSLog(@"hashTypedDataV4() method called");
|
||||
#endif
|
||||
NSString *result = StatusgoHashTypedDataV4(data);
|
||||
callback(@[result]);
|
||||
}
|
||||
|
||||
#pragma mark - SignMessage
|
||||
|
||||
RCT_EXPORT_METHOD(signMessage:(NSString *)message
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
#if DEBUG
|
||||
NSLog(@"SignMessage() method called");
|
||||
#endif
|
||||
NSString *result = StatusgoSignMessage(message);
|
||||
callback(@[result]);
|
||||
}
|
||||
|
||||
#pragma mark - SignTypedData
|
||||
|
||||
RCT_EXPORT_METHOD(signTypedData:(NSString *)data
|
||||
account:(NSString *)account
|
||||
password:(NSString *)password
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
#if DEBUG
|
||||
NSLog(@"SignTypedData() method called");
|
||||
#endif
|
||||
NSString *result = StatusgoSignTypedData(data, account, password);
|
||||
callback(@[result]);
|
||||
}
|
||||
|
||||
#pragma mark - SignTypedDataV4
|
||||
|
||||
RCT_EXPORT_METHOD(signTypedDataV4:(NSString *)data
|
||||
account:(NSString *)account
|
||||
password:(NSString *)password
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
#if DEBUG
|
||||
NSLog(@"SignTypedDataV4() method called");
|
||||
#endif
|
||||
NSString *result = StatusgoSignTypedDataV4(data, account, password);
|
||||
callback(@[result]);
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,9 +0,0 @@
|
||||
#import <sys/utsname.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#import "Statusgo.h"
|
||||
#import "RCTLog.h"
|
||||
|
||||
@interface LogManager : NSObject <RCTBridgeModule>
|
||||
|
||||
@end
|
||||
@@ -1,115 +0,0 @@
|
||||
#import "LogManager.h"
|
||||
#import "React/RCTBridge.h"
|
||||
#import "React/RCTEventDispatcher.h"
|
||||
#import "Statusgo.h"
|
||||
#import "Utils.h"
|
||||
#import "SSZipArchive.h"
|
||||
|
||||
@implementation LogManager
|
||||
|
||||
RCT_EXPORT_MODULE();
|
||||
|
||||
#pragma mark - SendLogs method
|
||||
|
||||
RCT_EXPORT_METHOD(sendLogs:(NSString *)dbJson
|
||||
jsLogs:(NSString *)jsLogs
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
// TODO: Implement SendLogs for iOS
|
||||
#if DEBUG
|
||||
NSLog(@"SendLogs() method called, not implemented");
|
||||
#endif
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
NSError *error = nil;
|
||||
NSURL *rootUrl =[[fileManager
|
||||
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
|
||||
lastObject];
|
||||
|
||||
NSURL *zipFile = [rootUrl URLByAppendingPathComponent:@"logs.zip"];
|
||||
[fileManager removeItemAtPath:zipFile.path error:nil];
|
||||
|
||||
NSURL *logsFolderName = [rootUrl URLByAppendingPathComponent:@"logs"];
|
||||
|
||||
if (![fileManager fileExistsAtPath:logsFolderName.path])
|
||||
[fileManager createDirectoryAtPath:logsFolderName.path withIntermediateDirectories:YES attributes:nil error:&error];
|
||||
|
||||
NSURL *dbFile = [logsFolderName URLByAppendingPathComponent:@"db.json"];
|
||||
NSURL *jsLogsFile = [logsFolderName URLByAppendingPathComponent:@"Status.log"];
|
||||
#if DEBUG
|
||||
NSString *networkDirPath = @"ethereum/mainnet_rpc_dev";
|
||||
#else
|
||||
NSString *networkDirPath = @"ethereum/mainnet_rpc";
|
||||
#endif
|
||||
|
||||
#if DEBUG
|
||||
NSString *goerliNetworkDirPath = @"ethereum/goerli_rpc_dev";
|
||||
#else
|
||||
NSString *goerliNetworkDirPath = @"ethereum/goerli_rpc";
|
||||
#endif
|
||||
|
||||
NSURL *networkDir = [rootUrl URLByAppendingPathComponent:networkDirPath];
|
||||
NSURL *originalGethLogsFile = [networkDir URLByAppendingPathComponent:@"geth.log"];
|
||||
NSURL *gethLogsFile = [logsFolderName URLByAppendingPathComponent:@"mainnet_geth.log"];
|
||||
|
||||
NSURL *goerliNetworkDir = [rootUrl URLByAppendingPathComponent:goerliNetworkDirPath];
|
||||
NSURL *goerliGethLogsFile = [goerliNetworkDir URLByAppendingPathComponent:@"geth.log"];
|
||||
NSURL *goerliLogsFile = [logsFolderName URLByAppendingPathComponent:@"goerli_geth.log"];
|
||||
|
||||
NSURL *mainGethLogsFile = [rootUrl URLByAppendingPathComponent:@"geth.log"];
|
||||
NSURL *mainLogsFile = [logsFolderName URLByAppendingPathComponent:@"geth.log"];
|
||||
|
||||
[dbJson writeToFile:dbFile.path atomically:YES encoding:NSUTF8StringEncoding error:nil];
|
||||
[jsLogs writeToFile:jsLogsFile.path atomically:YES encoding:NSUTF8StringEncoding error:nil];
|
||||
|
||||
//NSString* gethLogs = StatusgoExportNodeLogs();
|
||||
//[gethLogs writeToFile:gethLogsFile.path atomically:YES encoding:NSUTF8StringEncoding error:nil];
|
||||
[fileManager copyItemAtPath:originalGethLogsFile.path toPath:gethLogsFile.path error:nil];
|
||||
[fileManager copyItemAtPath:goerliGethLogsFile.path toPath:goerliLogsFile.path error:nil];
|
||||
[fileManager copyItemAtPath:mainGethLogsFile.path toPath:mainLogsFile.path error:nil];
|
||||
|
||||
[SSZipArchive createZipFileAtPath:zipFile.path withContentsOfDirectory:logsFolderName.path];
|
||||
[fileManager removeItemAtPath:logsFolderName.path error:nil];
|
||||
|
||||
callback(@[zipFile.absoluteString]);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(initLogging:(BOOL)enabled
|
||||
mobileSystem:(BOOL)mobileSystem
|
||||
logLevel:(NSString *)logLevel
|
||||
callback:(RCTResponseSenderBlock)callback)
|
||||
{
|
||||
NSString *logDirectory = [self logFileDirectory];
|
||||
NSString *logFilePath = [logDirectory stringByAppendingPathComponent:@"geth.log"];
|
||||
|
||||
NSMutableDictionary *jsonConfig = [NSMutableDictionary dictionary];
|
||||
jsonConfig[@"Enabled"] = @(enabled);
|
||||
jsonConfig[@"MobileSystem"] = @(mobileSystem);
|
||||
jsonConfig[@"Level"] = logLevel;
|
||||
jsonConfig[@"File"] = logFilePath;
|
||||
|
||||
NSError *error = nil;
|
||||
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:jsonConfig options:0 error:&error];
|
||||
|
||||
if (error) {
|
||||
// Handle JSON serialization error
|
||||
callback(@[error.localizedDescription]);
|
||||
return;
|
||||
}
|
||||
|
||||
NSString *config = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
|
||||
|
||||
// Call your native logging initialization method here
|
||||
NSString *initResult = StatusgoInitLogging(config);
|
||||
|
||||
callback(@[initResult]);
|
||||
}
|
||||
|
||||
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(logFileDirectory) {
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
NSURL *rootUrl =[[fileManager
|
||||
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
|
||||
lastObject];
|
||||
return rootUrl.path;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
@@ -1,9 +0,0 @@
|
||||
#import <sys/utsname.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#import "Statusgo.h"
|
||||
#import "RCTLog.h"
|
||||
|
||||
@interface NetworkManager : NSObject <RCTBridgeModule>
|
||||
|
||||
@end
|
||||
@@ -1,109 +0,0 @@
|
||||
#import "NetworkManager.h"
|
||||
#import "React/RCTBridge.h"
|
||||
#import "React/RCTEventDispatcher.h"
|
||||
#import "Statusgo.h"
|
||||
#import "Utils.h"
|
||||
|
||||
@implementation NetworkManager
|
||||
|
||||
RCT_EXPORT_MODULE();
|
||||
|
||||
RCT_EXPORT_METHOD(startSearchForLocalPairingPeers:(RCTResponseSenderBlock)callback) {
|
||||
NSString *result = StatusgoStartSearchForLocalPairingPeers();
|
||||
callback(@[result]);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(getConnectionStringForBootstrappingAnotherDevice:(NSString *)configJSON
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
|
||||
NSData *configData = [configJSON dataUsingEncoding:NSUTF8StringEncoding];
|
||||
NSError *error;
|
||||
NSMutableDictionary *configDict = [NSJSONSerialization JSONObjectWithData:configData options:NSJSONReadingMutableContainers error:&error];
|
||||
NSMutableDictionary *senderConfig = configDict[@"senderConfig"];
|
||||
NSString *keyUID = senderConfig[@"keyUID"];
|
||||
NSURL *multiaccountKeystoreDir = [Utils getKeyStoreDirForKeyUID:keyUID];
|
||||
NSString *keystoreDir = multiaccountKeystoreDir.path;
|
||||
|
||||
[senderConfig setValue:keystoreDir forKey:@"keystorePath"];
|
||||
NSString *modifiedConfigJSON = [Utils jsonStringWithPrettyPrint:NO fromDictionary:configDict];
|
||||
|
||||
NSString *result = StatusgoGetConnectionStringForBootstrappingAnotherDevice(modifiedConfigJSON);
|
||||
callback(@[result]);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(inputConnectionStringForBootstrapping:(NSString *)cs
|
||||
configJSON:(NSString *)configJSON
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
|
||||
NSData *configData = [configJSON dataUsingEncoding:NSUTF8StringEncoding];
|
||||
NSError *error;
|
||||
NSMutableDictionary *configDict = [NSJSONSerialization JSONObjectWithData:configData options:NSJSONReadingMutableContainers error:&error];
|
||||
NSMutableDictionary *receiverConfig = configDict[@"receiverConfig"];
|
||||
NSMutableDictionary *nodeConfig = receiverConfig[@"nodeConfig"];
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
NSURL *rootUrl =[[fileManager URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask] lastObject];
|
||||
NSURL *multiaccountKeystoreDir = [rootUrl URLByAppendingPathComponent:@"keystore"];
|
||||
NSString *keystoreDir = multiaccountKeystoreDir.path;
|
||||
NSString *rootDataDir = rootUrl.path;
|
||||
|
||||
[receiverConfig setValue:keystoreDir forKey:@"keystorePath"];
|
||||
[nodeConfig setValue:rootDataDir forKey:@"rootDataDir"];
|
||||
NSString *modifiedConfigJSON = [Utils jsonStringWithPrettyPrint:NO fromDictionary:configDict];
|
||||
NSString *result = StatusgoInputConnectionStringForBootstrapping(cs, modifiedConfigJSON);
|
||||
callback(@[result]);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(sendTransactionWithSignature:(NSString *)txArgsJSON
|
||||
signature:(NSString *)signature
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
#if DEBUG
|
||||
NSLog(@"sendTransactionWithSignature() method called");
|
||||
#endif
|
||||
NSString *result = StatusgoSendTransactionWithSignature(txArgsJSON, signature);
|
||||
callback(@[result]);
|
||||
}
|
||||
|
||||
#pragma mark - SendTransaction
|
||||
|
||||
RCT_EXPORT_METHOD(sendTransaction:(NSString *)txArgsJSON
|
||||
password:(NSString *)password
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
#if DEBUG
|
||||
NSLog(@"SendTransaction() method called");
|
||||
#endif
|
||||
NSString *result = StatusgoSendTransaction(txArgsJSON, password);
|
||||
callback(@[result]);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(callRPC:(NSString *)payload
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
dispatch_async( dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
||||
NSString *result = StatusgoCallRPC(payload);
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
callback(@[result]);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(callPrivateRPC:(NSString *)payload
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
dispatch_async( dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
||||
NSString *result = StatusgoCallPrivateRPC(payload);
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
callback(@[result]);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
#pragma mark - Recover
|
||||
|
||||
RCT_EXPORT_METHOD(recover:(NSString *)message
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
#if DEBUG
|
||||
NSLog(@"Recover() method called");
|
||||
#endif
|
||||
NSString *result = StatusgoRecover(message);
|
||||
callback(@[result]);
|
||||
}
|
||||
|
||||
@end
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,20 +3,13 @@
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 54;
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
206C9F3E1D474E910063E3E6 /* RCTStatus.h in Copy Files */ = {isa = PBXBuildFile; fileRef = 206C9F3D1D474E910063E3E6 /* RCTStatus.h */; };
|
||||
206C9F401D474E910063E3E6 /* RCTStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 206C9F3F1D474E910063E3E6 /* RCTStatus.m */; };
|
||||
CE4E31B11D86951A0033ED64 /* Statusgo.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE4E31B01D86951A0033ED64 /* Statusgo.xcframework */; };
|
||||
E92244EB2B485F2400915F4C /* UIHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = E92244E92B485F2400915F4C /* UIHelper.m */; };
|
||||
E967A3AC2B47BD5A00FB19B2 /* Utils.m in Sources */ = {isa = PBXBuildFile; fileRef = E967A3AB2B47BD5A00FB19B2 /* Utils.m */; };
|
||||
E9BEF3602B470BF1001F6755 /* NetworkManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E9BEF35E2B470BF1001F6755 /* NetworkManager.m */; };
|
||||
E9C33AA62B4828A60074B1C5 /* DatabaseManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E9C33AA52B4828A60074B1C5 /* DatabaseManager.m */; };
|
||||
E9DB08932B4858B400F51053 /* LogManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E9DB08912B4858B400F51053 /* LogManager.m */; };
|
||||
E9F5C3322B483B6C001A7F40 /* EncryptionUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = E9F5C3312B483B6C001A7F40 /* EncryptionUtils.m */; };
|
||||
E9FC4ED12B47EEFF00E834DB /* AccountManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E9FC4ECF2B47EEFF00E834DB /* AccountManager.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
@@ -38,20 +31,6 @@
|
||||
206C9F3D1D474E910063E3E6 /* RCTStatus.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RCTStatus.h; sourceTree = "<group>"; };
|
||||
206C9F3F1D474E910063E3E6 /* RCTStatus.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RCTStatus.m; sourceTree = "<group>"; };
|
||||
CE4E31B01D86951A0033ED64 /* Statusgo.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = Statusgo.xcframework; sourceTree = "<group>"; };
|
||||
E92244E92B485F2400915F4C /* UIHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIHelper.m; sourceTree = "<group>"; };
|
||||
E92244EA2B485F2400915F4C /* UIHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIHelper.h; sourceTree = "<group>"; };
|
||||
E967A3AA2B47BD5A00FB19B2 /* Utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Utils.h; sourceTree = "<group>"; };
|
||||
E967A3AB2B47BD5A00FB19B2 /* Utils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Utils.m; sourceTree = "<group>"; };
|
||||
E9BEF35E2B470BF1001F6755 /* NetworkManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NetworkManager.m; sourceTree = "<group>"; };
|
||||
E9BEF35F2B470BF1001F6755 /* NetworkManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkManager.h; sourceTree = "<group>"; };
|
||||
E9C33AA42B4828A60074B1C5 /* DatabaseManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DatabaseManager.h; sourceTree = "<group>"; };
|
||||
E9C33AA52B4828A60074B1C5 /* DatabaseManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DatabaseManager.m; sourceTree = "<group>"; };
|
||||
E9DB08912B4858B400F51053 /* LogManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LogManager.m; sourceTree = "<group>"; };
|
||||
E9DB08922B4858B400F51053 /* LogManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LogManager.h; sourceTree = "<group>"; };
|
||||
E9F5C3302B483B6C001A7F40 /* EncryptionUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EncryptionUtils.h; sourceTree = "<group>"; };
|
||||
E9F5C3312B483B6C001A7F40 /* EncryptionUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EncryptionUtils.m; sourceTree = "<group>"; };
|
||||
E9FC4ECF2B47EEFF00E834DB /* AccountManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AccountManager.m; sourceTree = "<group>"; };
|
||||
E9FC4ED02B47EEFF00E834DB /* AccountManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccountManager.h; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -86,20 +65,6 @@
|
||||
206C9F3C1D474E910063E3E6 /* Status */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E92244EA2B485F2400915F4C /* UIHelper.h */,
|
||||
E92244E92B485F2400915F4C /* UIHelper.m */,
|
||||
E9DB08922B4858B400F51053 /* LogManager.h */,
|
||||
E9DB08912B4858B400F51053 /* LogManager.m */,
|
||||
E9F5C3302B483B6C001A7F40 /* EncryptionUtils.h */,
|
||||
E9F5C3312B483B6C001A7F40 /* EncryptionUtils.m */,
|
||||
E9C33AA42B4828A60074B1C5 /* DatabaseManager.h */,
|
||||
E9C33AA52B4828A60074B1C5 /* DatabaseManager.m */,
|
||||
E9FC4ED02B47EEFF00E834DB /* AccountManager.h */,
|
||||
E9FC4ECF2B47EEFF00E834DB /* AccountManager.m */,
|
||||
E967A3AA2B47BD5A00FB19B2 /* Utils.h */,
|
||||
E967A3AB2B47BD5A00FB19B2 /* Utils.m */,
|
||||
E9BEF35F2B470BF1001F6755 /* NetworkManager.h */,
|
||||
E9BEF35E2B470BF1001F6755 /* NetworkManager.m */,
|
||||
206C9F3D1D474E910063E3E6 /* RCTStatus.h */,
|
||||
206C9F3F1D474E910063E3E6 /* RCTStatus.m */,
|
||||
);
|
||||
@@ -162,14 +127,7 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
E9DB08932B4858B400F51053 /* LogManager.m in Sources */,
|
||||
E9F5C3322B483B6C001A7F40 /* EncryptionUtils.m in Sources */,
|
||||
E967A3AC2B47BD5A00FB19B2 /* Utils.m in Sources */,
|
||||
E92244EB2B485F2400915F4C /* UIHelper.m in Sources */,
|
||||
E9BEF3602B470BF1001F6755 /* NetworkManager.m in Sources */,
|
||||
206C9F401D474E910063E3E6 /* RCTStatus.m in Sources */,
|
||||
E9C33AA62B4828A60074B1C5 /* DatabaseManager.m in Sources */,
|
||||
E9FC4ED12B47EEFF00E834DB /* AccountManager.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
#import <sys/utsname.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#import "RCTLog.h"
|
||||
|
||||
@interface UIHelper : NSObject <RCTBridgeModule>
|
||||
|
||||
@end
|
||||
@@ -1,39 +0,0 @@
|
||||
#import "UIHelper.h"
|
||||
#import "React/RCTBridge.h"
|
||||
#import "React/RCTEventDispatcher.h"
|
||||
|
||||
@implementation UIHelper
|
||||
|
||||
RCT_EXPORT_MODULE();
|
||||
|
||||
#pragma mark - only android methods
|
||||
|
||||
RCT_EXPORT_METHOD(setSoftInputMode: (NSInteger) i) {
|
||||
#if DEBUG
|
||||
NSLog(@"setSoftInputMode() works only on Android");
|
||||
#endif
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(clearCookies) {
|
||||
NSHTTPCookie *cookie;
|
||||
NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
|
||||
|
||||
for (cookie in [storage cookies]) {
|
||||
[storage deleteCookie:cookie];
|
||||
}
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(clearStorageAPIs) {
|
||||
[[NSURLCache sharedURLCache] removeAllCachedResponses];
|
||||
|
||||
NSString *path = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) lastObject];
|
||||
NSArray *array = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:path error:nil];
|
||||
for (NSString *string in array) {
|
||||
NSLog(@"Removing %@", [path stringByAppendingPathComponent:string]);
|
||||
if ([[string pathExtension] isEqualToString:@"localstorage"])
|
||||
[[NSFileManager defaultManager] removeItemAtPath:[path stringByAppendingPathComponent:string] error:nil];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
@@ -1,16 +0,0 @@
|
||||
#import <sys/utsname.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#import "Statusgo.h"
|
||||
#import "RCTLog.h"
|
||||
|
||||
@interface Utils : NSObject <RCTBridgeModule>
|
||||
|
||||
+ (NSString *)jsonStringWithPrettyPrint:(BOOL)prettyPrint fromDictionary:(NSDictionary *)dictionary;
|
||||
+ (NSString *)jsonStringWithPrettyPrint:(BOOL)prettyPrint fromArray:(NSArray *)array;
|
||||
+ (NSURL *)getKeyStoreDirForKeyUID:(NSString *)keyUID;
|
||||
+ (NSString *)getExportDbFilePath;
|
||||
+ (NSString *)getKeyUID:(NSString *)jsonString;
|
||||
+ (void)migrateKeystore:(NSString *)accountData password:(NSString *)password;
|
||||
|
||||
@end
|
||||
@@ -1,128 +0,0 @@
|
||||
#import "Utils.h"
|
||||
#import "React/RCTBridge.h"
|
||||
#import "React/RCTEventDispatcher.h"
|
||||
#import "Statusgo.h"
|
||||
#import "Utils.h"
|
||||
|
||||
@implementation Utils
|
||||
|
||||
RCT_EXPORT_MODULE();
|
||||
|
||||
+ (NSString *)jsonStringWithPrettyPrint:(BOOL)prettyPrint fromDictionary:(NSDictionary *)dictionary {
|
||||
NSError *error;
|
||||
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dictionary
|
||||
options:(NSJSONWritingOptions)(prettyPrint ? NSJSONWritingPrettyPrinted : 0)
|
||||
error:&error];
|
||||
|
||||
if (!jsonData) {
|
||||
NSLog(@"jsonStringWithPrettyPrint: error: %@", error.localizedDescription);
|
||||
return @"{}";
|
||||
} else {
|
||||
return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
|
||||
}
|
||||
}
|
||||
|
||||
+ (NSString *)jsonStringWithPrettyPrint:(BOOL)prettyPrint fromArray:(NSArray *)array {
|
||||
NSError *error;
|
||||
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:array
|
||||
options:(NSJSONWritingOptions)(prettyPrint ? NSJSONWritingPrettyPrinted : 0)
|
||||
error:&error];
|
||||
|
||||
if (!jsonData) {
|
||||
NSLog(@"jsonStringWithPrettyPrint: error: %@", error.localizedDescription);
|
||||
return @"[]";
|
||||
} else {
|
||||
return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
|
||||
}
|
||||
}
|
||||
|
||||
+ (NSURL *)getKeyStoreDirForKeyUID:(NSString *)keyUID {
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
NSURL *rootUrl = [[fileManager URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask] lastObject];
|
||||
|
||||
NSURL *oldKeystoreDir = [rootUrl URLByAppendingPathComponent:@"keystore"];
|
||||
NSURL *multiaccountKeystoreDir = [oldKeystoreDir URLByAppendingPathComponent:keyUID];
|
||||
|
||||
return multiaccountKeystoreDir;
|
||||
}
|
||||
|
||||
+ (NSString *) getKeyUID:(NSString *)jsonString {
|
||||
NSData *data = [jsonString dataUsingEncoding:NSUTF8StringEncoding];
|
||||
NSDictionary *json = [NSJSONSerialization
|
||||
JSONObjectWithData:data
|
||||
options:NSJSONReadingMutableContainers
|
||||
error:nil];
|
||||
|
||||
return [json valueForKey:@"key-uid"];
|
||||
}
|
||||
|
||||
+ (NSString *) getExportDbFilePath {
|
||||
NSString *filePath = [NSTemporaryDirectory() stringByAppendingPathComponent:@"export.db"];
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
|
||||
if ([fileManager fileExistsAtPath:filePath]) {
|
||||
[fileManager removeItemAtPath:filePath error:nil];
|
||||
}
|
||||
|
||||
return filePath;
|
||||
}
|
||||
|
||||
+ (void) migrateKeystore:(NSString *)accountData
|
||||
password:(NSString *)password {
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
NSURL *rootUrl =[[fileManager
|
||||
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
|
||||
lastObject];
|
||||
|
||||
NSURL *keyUID = [self getKeyStoreDirForKeyUID:accountData];
|
||||
NSURL *oldKeystoreDir = [rootUrl URLByAppendingPathComponent:@"keystore"];
|
||||
NSURL *multiaccountKeystoreDir = [self getKeyStoreDirForKeyUID:keyUID.path];
|
||||
|
||||
NSArray *keys = [fileManager contentsOfDirectoryAtPath:multiaccountKeystoreDir.path error:nil];
|
||||
if (keys.count == 0) {
|
||||
NSString *migrationResult = StatusgoMigrateKeyStoreDir(accountData, password, oldKeystoreDir.path, multiaccountKeystoreDir.path);
|
||||
NSLog(@"keystore migration result %@", migrationResult);
|
||||
|
||||
NSString *initKeystoreResult = StatusgoInitKeystore(multiaccountKeystoreDir.path);
|
||||
NSLog(@"InitKeyStore result %@", initKeystoreResult);
|
||||
}
|
||||
}
|
||||
|
||||
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(backupDisabledDataDir) {
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
NSURL *rootUrl =[[fileManager
|
||||
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
|
||||
lastObject];
|
||||
return rootUrl.path;
|
||||
}
|
||||
|
||||
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(keystoreDir) {
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
NSURL *rootUrl =[[fileManager
|
||||
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
|
||||
lastObject];
|
||||
|
||||
NSURL *commonKeystoreDir = [rootUrl URLByAppendingPathComponent:@"keystore"];
|
||||
|
||||
return commonKeystoreDir.path;
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(validateMnemonic:(NSString *)seed
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
#if DEBUG
|
||||
NSLog(@"validateMnemonic() method called");
|
||||
#endif
|
||||
NSString *result = StatusgoValidateMnemonic(seed);
|
||||
callback(@[result]);
|
||||
}
|
||||
|
||||
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(checkAddressChecksum:(NSString *)address) {
|
||||
return StatusgoCheckAddressChecksum(address);
|
||||
}
|
||||
|
||||
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(toChecksumAddress:(NSString *)address) {
|
||||
return StatusgoToChecksumAddress(address);
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
+33
-613
@@ -11129,16 +11129,16 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/google/errorprone/error_prone_annotations/2.24.1",
|
||||
"path": "com/google/errorprone/error_prone_annotations/2.24.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"error_prone_annotations-2.24.1.pom": {
|
||||
"sha1": "e36d508134193b5b782a79cd834fef22f96850ea",
|
||||
"sha256": "sha256-dW0LPDkGWZ2XMUDuziZuDej08ZKvFLGQBq8Un+kO+NU="
|
||||
"error_prone_annotations-2.24.0.pom": {
|
||||
"sha1": "a267fc6adc4f7e83c84ecd3bfa3d757f0faa4c4e",
|
||||
"sha256": "sha256-MDJ5+CcjbFXBkhu9hjL941NUxcNcAma8CF+apovLcV0="
|
||||
},
|
||||
"error_prone_annotations-2.24.1.jar": {
|
||||
"sha1": "32b299e45105aa9b0df8279c74dc1edfcf313ff0",
|
||||
"sha256": "sha256-Gf4vcVXSDqCTFoUnmZ2pgQgQPuVG0ei3JrxLJ8MaPDA="
|
||||
"error_prone_annotations-2.24.0.jar": {
|
||||
"sha1": "29dca9118b577ad24533e563438feb8fad51427e",
|
||||
"sha256": "sha256-qIvYgSTI1MmFGrgjrcOo8EsKE68VydgLXs9J9aejIdI="
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -11232,12 +11232,12 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/google/errorprone/error_prone_parent/2.24.1",
|
||||
"path": "com/google/errorprone/error_prone_parent/2.24.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"error_prone_parent-2.24.1.pom": {
|
||||
"sha1": "20bcb755b5f180723ef1b055f34a1834b7410f54",
|
||||
"sha256": "sha256-y589WAUC7OXhJCnX96x1/kerhdat91zd+G+lokrvpI8="
|
||||
"error_prone_parent-2.24.0.pom": {
|
||||
"sha1": "2aca1bd2b01e085422633daa951905ea36ccd009",
|
||||
"sha256": "sha256-XfQPVmlQqy86ZF0z2LcXGB7v9OplOO+2/ZuRL+obie4="
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -16913,17 +16913,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/jvm/org.jetbrains.kotlin.jvm.gradle.plugin/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"org.jetbrains.kotlin.jvm.gradle.plugin-1.9.0.pom": {
|
||||
"sha1": "896c88badef90b092f519041d1ee201eb5d1b1a0",
|
||||
"sha256": "sha256-Bb7sz992ArEqfazluEynL3ao8E3ookIUo/WSxzYmtrc="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-android-extensions/1.6.20",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -16954,21 +16943,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-android-extensions/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-android-extensions-1.9.0.pom": {
|
||||
"sha1": "c08cc427bc37faf86bd41de0b64e8ac67899a06b",
|
||||
"sha256": "sha256-WOHIg3JukUaVIDV95u0Xw/mSnI4IsRdKJ6OtbsDrzVI="
|
||||
},
|
||||
"kotlin-android-extensions-1.9.0.jar": {
|
||||
"sha1": "ca23de2a64833d204f9af248e265274f3b8c0333",
|
||||
"sha256": "sha256-IGdbuyp7aYKnFEUYpRi5qJZfkK6JuMmHiJgBIkSh6jM="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-annotations-jvm/1.3.72",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -17044,51 +17018,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-build-common/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-build-common-1.9.0.pom": {
|
||||
"sha1": "ab861d4e7cbca289fa3d215daad0cbfb2a2cfb82",
|
||||
"sha256": "sha256-6itlfmsETYgfDT/f/BPOKIwlQYxipbBL/64XeJDs6EU="
|
||||
},
|
||||
"kotlin-build-common-1.9.0.jar": {
|
||||
"sha1": "68e075bff7dca0d2d444c19279afe6882f311a19",
|
||||
"sha256": "sha256-txTWfNj1bTe4Pqj2XdysZAXFdix9n2EV81J0o5GxW2w="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-build-tools-api/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-build-tools-api-1.9.0.pom": {
|
||||
"sha1": "ab0f33a948936b4ef2b51a8b82720fe5982184e5",
|
||||
"sha256": "sha256-iIFxmCZbm8BrPzSTWyv2qpj0gA7OvBzOQREN70m3pCE="
|
||||
},
|
||||
"kotlin-build-tools-api-1.9.0.jar": {
|
||||
"sha1": "5d33265af7283ca4d7b1f3115b83b54545f4cfab",
|
||||
"sha256": "sha256-0ZyavegKnPQtJezJLLEUjtOhXu2yZy2qHkZubaWQ7sY="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-build-tools-impl/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-build-tools-impl-1.9.0.pom": {
|
||||
"sha1": "3d7403fd4d2f8914b46b250f6746da17c5a1ba47",
|
||||
"sha256": "sha256-3Qrb3SO5XBP8N2JAqCoL/F1k37eBON7GJASX6QVtQIw="
|
||||
},
|
||||
"kotlin-build-tools-impl-1.9.0.jar": {
|
||||
"sha1": "1ce2bdaf6dd80d4e7748058231059766e298a6de",
|
||||
"sha256": "sha256-1yw3nxx1eZrAxm5sMVj2iGW9/tGlw1xepBwnihuAUBo="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-compiler-embeddable/1.6.20",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -17119,21 +17048,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-compiler-embeddable/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-compiler-embeddable-1.9.0.pom": {
|
||||
"sha1": "079ce81c461cfa0c3ad6b05b4a40b23bf821dbd2",
|
||||
"sha256": "sha256-7jyHHO39bM9A0ESUQJbihlXeL5NF2ET+7GPMqcXkt8w="
|
||||
},
|
||||
"kotlin-compiler-embeddable-1.9.0.jar": {
|
||||
"sha1": "2c8c3a7402becca891f12739b3e9fd2dc2adbd7a",
|
||||
"sha256": "sha256-lTtQaR103SGf8/ZkRnDD5UnYfN/AphVPFgKmoKXf43M="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-compiler-runner/1.6.20",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -17164,21 +17078,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-compiler-runner/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-compiler-runner-1.9.0.pom": {
|
||||
"sha1": "f2f333b81d78150bca741b75646a042f8a69be2c",
|
||||
"sha256": "sha256-GIN9BlVntn5bzy4wTYWm4rbSRDz4En9AdnNKTo3yo2E="
|
||||
},
|
||||
"kotlin-compiler-runner-1.9.0.jar": {
|
||||
"sha1": "4cf7c2cb6bfd82876e592697d3ad9bc835b21010",
|
||||
"sha256": "sha256-BbWlXUlJFhpxT838ZKXwTYejZMm73IZBs7t6VVfkPqo="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-daemon-client/1.6.20",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -17209,21 +17108,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-daemon-client/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-daemon-client-1.9.0.pom": {
|
||||
"sha1": "af448a4a8fdd5c0bff3d93fa78a2e495779e18a5",
|
||||
"sha256": "sha256-sv50dBgjzM6JMXCWkg3LnOXBa460Z5jTn9jmdwPFidc="
|
||||
},
|
||||
"kotlin-daemon-client-1.9.0.jar": {
|
||||
"sha1": "a7aff9bf77b5c882789cc495262def8948d93c5d",
|
||||
"sha256": "sha256-WoyXfn3H8N4tka5Yva3CBBXe9M9dST5aGD+WxZeZAyA="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-daemon-embeddable/1.6.20",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -17254,51 +17138,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-daemon-embeddable/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-daemon-embeddable-1.9.0.pom": {
|
||||
"sha1": "216bc4d3f72fb679b1f79e73a730cac6e5cd3fa5",
|
||||
"sha256": "sha256-OOMsu5GFenIGy/3cON1O4L5mX0CgEV/21NF348f4kq8="
|
||||
},
|
||||
"kotlin-daemon-embeddable-1.9.0.jar": {
|
||||
"sha1": "186543f5e28cf8d9a0290fecc2cf34301c40a65c",
|
||||
"sha256": "sha256-lDGCoTfs1A5ikFjaUtszbO6bZm+AmWtlWELyCmNz35o="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-gradle-plugins-bom/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-gradle-plugins-bom-1.9.0.pom": {
|
||||
"sha1": "511e9094170ffec75cbb76b58cfe7f1a058dc046",
|
||||
"sha256": "sha256-XTmtkDDf0zsLrCn3UAAJzmKHYulP5h8BF3rhNL24D6E="
|
||||
},
|
||||
"kotlin-gradle-plugins-bom-1.9.0.module": {
|
||||
"sha1": "b6bc353c189d28e9e0419f0635df8121ae8c8cbf",
|
||||
"sha256": "sha256-/SufabguQ8tQnwhBsYvzxd99q18eC+oDT8CypZnW4pY="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-gradle-plugin-annotations/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-gradle-plugin-annotations-1.9.0.pom": {
|
||||
"sha1": "b1b0737be6ae375ea12ea9e7cbc6c6f1a4832ec1",
|
||||
"sha256": "sha256-qjXuWp0dpZMV92nH/tsshwBWD1PFaAupKwsniBpKQnE="
|
||||
},
|
||||
"kotlin-gradle-plugin-annotations-1.9.0.jar": {
|
||||
"sha1": "42d1ea51a701505256d5bd54d9152819937835dc",
|
||||
"sha256": "sha256-KiZbNbx8VYIUJukbajzU9LkWOKC8fIffz+TgX36IRzg="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-gradle-plugin-api/1.6.20",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -17341,53 +17180,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-gradle-plugin-api/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-gradle-plugin-api-1.9.0.pom": {
|
||||
"sha1": "7c80dda386f89cf10d0c3ba399176f5ad26cf057",
|
||||
"sha256": "sha256-VPHdp1Zn7esbrIpY9KNsh4wPBJGGA2vJOnAyjNnNfaw="
|
||||
},
|
||||
"kotlin-gradle-plugin-api-1.9.0-gradle70.jar": {
|
||||
"sha1": "82a9928a60c442822fccaf08aa212528a85fbf25",
|
||||
"sha256": "sha256-AhbssMeA+V47EBoOlc/DZ/LvVrBvLeqqqZJaDxF8INk="
|
||||
},
|
||||
"kotlin-gradle-plugin-api-1.9.0-gradle71.jar": {
|
||||
"sha1": "82a9928a60c442822fccaf08aa212528a85fbf25",
|
||||
"sha256": "sha256-AhbssMeA+V47EBoOlc/DZ/LvVrBvLeqqqZJaDxF8INk="
|
||||
},
|
||||
"kotlin-gradle-plugin-api-1.9.0-gradle74.jar": {
|
||||
"sha1": "82a9928a60c442822fccaf08aa212528a85fbf25",
|
||||
"sha256": "sha256-AhbssMeA+V47EBoOlc/DZ/LvVrBvLeqqqZJaDxF8INk="
|
||||
},
|
||||
"kotlin-gradle-plugin-api-1.9.0-gradle75.jar": {
|
||||
"sha1": "82a9928a60c442822fccaf08aa212528a85fbf25",
|
||||
"sha256": "sha256-AhbssMeA+V47EBoOlc/DZ/LvVrBvLeqqqZJaDxF8INk="
|
||||
},
|
||||
"kotlin-gradle-plugin-api-1.9.0-gradle76.jar": {
|
||||
"sha1": "82a9928a60c442822fccaf08aa212528a85fbf25",
|
||||
"sha256": "sha256-AhbssMeA+V47EBoOlc/DZ/LvVrBvLeqqqZJaDxF8INk="
|
||||
},
|
||||
"kotlin-gradle-plugin-api-1.9.0-gradle80.jar": {
|
||||
"sha1": "82a9928a60c442822fccaf08aa212528a85fbf25",
|
||||
"sha256": "sha256-AhbssMeA+V47EBoOlc/DZ/LvVrBvLeqqqZJaDxF8INk="
|
||||
},
|
||||
"kotlin-gradle-plugin-api-1.9.0-gradle81.jar": {
|
||||
"sha1": "82a9928a60c442822fccaf08aa212528a85fbf25",
|
||||
"sha256": "sha256-AhbssMeA+V47EBoOlc/DZ/LvVrBvLeqqqZJaDxF8INk="
|
||||
},
|
||||
"kotlin-gradle-plugin-api-1.9.0.jar": {
|
||||
"sha1": "82a9928a60c442822fccaf08aa212528a85fbf25",
|
||||
"sha256": "sha256-AhbssMeA+V47EBoOlc/DZ/LvVrBvLeqqqZJaDxF8INk="
|
||||
},
|
||||
"kotlin-gradle-plugin-api-1.9.0.module": {
|
||||
"sha1": "cede46e2a2c9f2abeaa726fef80f85e451a6b5b3",
|
||||
"sha256": "sha256-Gu1WWijZE0KsWkuhRsKFal67xjkoXFKVUhefr8dhTds="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-gradle-plugin-idea-proto/1.7.22",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -17403,21 +17195,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-gradle-plugin-idea-proto/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-gradle-plugin-idea-proto-1.9.0.pom": {
|
||||
"sha1": "19b5a92d55669744290e83b5a7d643d1fbd83f65",
|
||||
"sha256": "sha256-QeElaFOKOjQHBMlww6T2D/WAH/3OQlymjKLAtHIhclA="
|
||||
},
|
||||
"kotlin-gradle-plugin-idea-proto-1.9.0.jar": {
|
||||
"sha1": "d7e3ab4f0b7f7966e446f516fddf331475319f53",
|
||||
"sha256": "sha256-54mY6iK81fVtE5gszBJMnHM3vRUHVMvcivKhSNdslwA="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-gradle-plugin-idea/1.7.22",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -17441,29 +17218,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-gradle-plugin-idea/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-gradle-plugin-idea-1.9.0.pom": {
|
||||
"sha1": "e3c307cf7ee2c63e9535edb403466dc49aa5d5d9",
|
||||
"sha256": "sha256-W/gGnkUbY0wdxLRpLpKO9pEanrLtk3TeIPRC3AloBo0="
|
||||
},
|
||||
"kotlin-gradle-plugin-idea-1.9.0-test-fixtures.jar": {
|
||||
"sha1": "af6020bc0aa902bb438e69aa0eca58438111136b",
|
||||
"sha256": "sha256-MAj3geetkPywHc2d6pbg9ky48bMYT5T4p9jNHeGlsfI="
|
||||
},
|
||||
"kotlin-gradle-plugin-idea-1.9.0.jar": {
|
||||
"sha1": "5538265e4961666c769825f4543ab445cbc45bdc",
|
||||
"sha256": "sha256-C7JszuNyr7m1hPKFfofMLz9TK2Kk9/pFdVjzr8Or6ZU="
|
||||
},
|
||||
"kotlin-gradle-plugin-idea-1.9.0.module": {
|
||||
"sha1": "186d2bb5113962059551805961d9c80a5b06a80c",
|
||||
"sha256": "sha256-pVg82bC0AS6VWtlhn7kBe1saosJRsFltr1M0kExcpls="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-gradle-plugin-model/1.6.20",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -17506,53 +17260,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-gradle-plugin-model/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-gradle-plugin-model-1.9.0.pom": {
|
||||
"sha1": "b9b395f72a747e294548584cb93b9e48d2d8dad7",
|
||||
"sha256": "sha256-QcXjVzTqEZA+IQr5i3eHB08mQab0C0X5vpwRAAga5Y0="
|
||||
},
|
||||
"kotlin-gradle-plugin-model-1.9.0-gradle70.jar": {
|
||||
"sha1": "d64789139fb89d78f2128d6b5be8a164d8669a72",
|
||||
"sha256": "sha256-/wWqtoizSnmSp+NfncTewlhD8Tqelwrv5W3T4SKghBU="
|
||||
},
|
||||
"kotlin-gradle-plugin-model-1.9.0-gradle71.jar": {
|
||||
"sha1": "d64789139fb89d78f2128d6b5be8a164d8669a72",
|
||||
"sha256": "sha256-/wWqtoizSnmSp+NfncTewlhD8Tqelwrv5W3T4SKghBU="
|
||||
},
|
||||
"kotlin-gradle-plugin-model-1.9.0-gradle74.jar": {
|
||||
"sha1": "d64789139fb89d78f2128d6b5be8a164d8669a72",
|
||||
"sha256": "sha256-/wWqtoizSnmSp+NfncTewlhD8Tqelwrv5W3T4SKghBU="
|
||||
},
|
||||
"kotlin-gradle-plugin-model-1.9.0-gradle75.jar": {
|
||||
"sha1": "d64789139fb89d78f2128d6b5be8a164d8669a72",
|
||||
"sha256": "sha256-/wWqtoizSnmSp+NfncTewlhD8Tqelwrv5W3T4SKghBU="
|
||||
},
|
||||
"kotlin-gradle-plugin-model-1.9.0-gradle76.jar": {
|
||||
"sha1": "d64789139fb89d78f2128d6b5be8a164d8669a72",
|
||||
"sha256": "sha256-/wWqtoizSnmSp+NfncTewlhD8Tqelwrv5W3T4SKghBU="
|
||||
},
|
||||
"kotlin-gradle-plugin-model-1.9.0-gradle80.jar": {
|
||||
"sha1": "d64789139fb89d78f2128d6b5be8a164d8669a72",
|
||||
"sha256": "sha256-/wWqtoizSnmSp+NfncTewlhD8Tqelwrv5W3T4SKghBU="
|
||||
},
|
||||
"kotlin-gradle-plugin-model-1.9.0-gradle81.jar": {
|
||||
"sha1": "d64789139fb89d78f2128d6b5be8a164d8669a72",
|
||||
"sha256": "sha256-/wWqtoizSnmSp+NfncTewlhD8Tqelwrv5W3T4SKghBU="
|
||||
},
|
||||
"kotlin-gradle-plugin-model-1.9.0.jar": {
|
||||
"sha1": "d64789139fb89d78f2128d6b5be8a164d8669a72",
|
||||
"sha256": "sha256-/wWqtoizSnmSp+NfncTewlhD8Tqelwrv5W3T4SKghBU="
|
||||
},
|
||||
"kotlin-gradle-plugin-model-1.9.0.module": {
|
||||
"sha1": "cc984614ad443557e13d3a07c6dbcd8ce214eec4",
|
||||
"sha256": "sha256-ZvS5FEcM80bgXQP4otWenHRvpu3PZMcS8XagiBqsPkk="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-gradle-plugin/1.6.20",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -17595,53 +17302,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-gradle-plugin/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-gradle-plugin-1.9.0.pom": {
|
||||
"sha1": "75f5520fa218e0833a1d4332bc10cf325925f63f",
|
||||
"sha256": "sha256-RSdrCf+7uANPvQRwj5D34xtw1orgI7LPs8EdiG532DY="
|
||||
},
|
||||
"kotlin-gradle-plugin-1.9.0-gradle70.jar": {
|
||||
"sha1": "70f96081d51820be6e998ae76591ca2485298880",
|
||||
"sha256": "sha256-tpVPc4pbBeMHcvq9tFnIHVjfGz2oBqng7qcQ9Oj1Afw="
|
||||
},
|
||||
"kotlin-gradle-plugin-1.9.0-gradle71.jar": {
|
||||
"sha1": "a237533df09406429a90e4cf6eddbd665fb879ef",
|
||||
"sha256": "sha256-eb2kXiIyG1eXss3mhJ9KwFUgfVcAUxsEI+aMURdlers="
|
||||
},
|
||||
"kotlin-gradle-plugin-1.9.0-gradle74.jar": {
|
||||
"sha1": "8ca3abcf0134fac694a3d78e78cc879ac37efc40",
|
||||
"sha256": "sha256-p0Pj9keSxLrCRuE8GYSIIGskZnHvzXB7NQw+IsEWW50="
|
||||
},
|
||||
"kotlin-gradle-plugin-1.9.0-gradle75.jar": {
|
||||
"sha1": "fa282ffe215f034c063a361d338f58b14479b336",
|
||||
"sha256": "sha256-y9fMKOqRe48m9sVeYWVSYOGtQ3ZNM1edrj91pJMa/vI="
|
||||
},
|
||||
"kotlin-gradle-plugin-1.9.0-gradle76.jar": {
|
||||
"sha1": "5e15ae8365f8750303ad66e169cb8fb25e20f408",
|
||||
"sha256": "sha256-k6DXXAMnUB4h2z8pprUoju8uIjFyan/esXYMwNmi6/I="
|
||||
},
|
||||
"kotlin-gradle-plugin-1.9.0-gradle80.jar": {
|
||||
"sha1": "3e9dd06e2aabd397923535a42118bc861bcff9eb",
|
||||
"sha256": "sha256-JnLbEUAqZqYyLpzT9nV2rbtyq+jkdNkStqrzP5QGuPY="
|
||||
},
|
||||
"kotlin-gradle-plugin-1.9.0-gradle81.jar": {
|
||||
"sha1": "8cfc2ba810d67ffb9a931d3785163acb5ff859fd",
|
||||
"sha256": "sha256-2UOg4ntHRuAfg0BaSfUmoi9HGx2x1GOdb84m1xHv+/4="
|
||||
},
|
||||
"kotlin-gradle-plugin-1.9.0.jar": {
|
||||
"sha1": "a031b8e97a70eb71b3d8a9298a82d153fc40c938",
|
||||
"sha256": "sha256-yxGBud8e8LclfOPYc6mWy79G3K6qnD+OxIBWE3V5BxU="
|
||||
},
|
||||
"kotlin-gradle-plugin-1.9.0.module": {
|
||||
"sha1": "f15d8f1e4dff619035904e448de88cbbde259d28",
|
||||
"sha256": "sha256-/mOWRe2PvcW8Et588lRopNsx52O6ea26ogahTeYP0xQ="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-klib-commonizer-api/1.6.20",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -17673,31 +17333,16 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-klib-commonizer-api/1.9.0",
|
||||
"path": "org/jetbrains/kotlin/kotlin-klib-commonizer-embeddable/1.7.22",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-klib-commonizer-api-1.9.0.pom": {
|
||||
"sha1": "dc9b1e38fb03d23112825bc6ab3ab8144ef8d42a",
|
||||
"sha256": "sha256-hE+SCI/0j4v64lYh4yStw1d5CM9lD0/bJWlhC4+vaz4="
|
||||
"kotlin-klib-commonizer-embeddable-1.7.22.pom": {
|
||||
"sha1": "5b3e5c9d161d6de851b75af4b73a3cd2bf438140",
|
||||
"sha256": "sha256-Ft3srgIpxS0bNHWY5je65P8si2Nj1+AIbNa2bfzIltw="
|
||||
},
|
||||
"kotlin-klib-commonizer-api-1.9.0.jar": {
|
||||
"sha1": "35782a8198131f9ee6eec26d7bf60b1e0a508bc5",
|
||||
"sha256": "sha256-hd4ulysLtvRSjB90j0PEhmMUX8hTnsqWwT0bwNo/k10="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-klib-commonizer-embeddable/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-klib-commonizer-embeddable-1.9.0.pom": {
|
||||
"sha1": "210d03d9e5afa2938c9a6d20ce164c59277dc437",
|
||||
"sha256": "sha256-L9STJpNwf9ujj80diJL7TdPPAIC5LxJSX8cF42G2eTs="
|
||||
},
|
||||
"kotlin-klib-commonizer-embeddable-1.9.0.jar": {
|
||||
"sha1": "bae135d2d5ed2ae9c2c9b7f8300dbcb345ef8bc7",
|
||||
"sha256": "sha256-zdYmTXJPcRKakwi+JEAsqMccKrICywO2hEmdqXrdS4Q="
|
||||
"kotlin-klib-commonizer-embeddable-1.7.22.jar": {
|
||||
"sha1": "f84170d46b52ac44408be1055fb12849bfff4629",
|
||||
"sha256": "sha256-3owxqAkvto74DzSjy9+x3NQCB7Z8/4fUC1xHnsamjs4="
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -17732,21 +17377,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-native-utils/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-native-utils-1.9.0.pom": {
|
||||
"sha1": "80b8f19f18a627c23ed18cf2a44ef7eabc84da96",
|
||||
"sha256": "sha256-Kazy3vkmve3Z6yBOx3Tnhq3Ek0EGqSlJAK81FVbn52o="
|
||||
},
|
||||
"kotlin-native-utils-1.9.0.jar": {
|
||||
"sha1": "13264bd5949f9e68c5d53a6d394b800b725dc577",
|
||||
"sha256": "sha256-D0gF93S/tcG20UXf5g09ILGu4ACJbOjs8+7/hM5EAjs="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-project-model/1.6.20",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -17777,21 +17407,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-project-model/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-project-model-1.9.0.pom": {
|
||||
"sha1": "fe67d9afc6940fe0019e18fca37a37c58976536b",
|
||||
"sha256": "sha256-6sHGTGAMYAJ7jmjfrTogPEFbn6IkWB1oz6Xnc+hWa3g="
|
||||
},
|
||||
"kotlin-project-model-1.9.0.jar": {
|
||||
"sha1": "7c6006a523220e0a82f4954652c3140f7353e85a",
|
||||
"sha256": "sha256-rgk26bTGkh8D73eTYcrLu3XtKyIQR5+S9l8cushuNAw="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-reflect/1.1.3-2",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -17897,21 +17512,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-reflect/1.6.10",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-reflect-1.6.10.pom": {
|
||||
"sha1": "535560dfd5b3dba98f57b12f3e921c7a83d0aafe",
|
||||
"sha256": "sha256-V5BVJCdKAK4CiqzMJyg/a8WSWpNKBGwcxdBsjuTW1ak="
|
||||
},
|
||||
"kotlin-reflect-1.6.10.jar": {
|
||||
"sha1": "1cbe9c92c12a94eea200d23c2bbaedaf3daf5132",
|
||||
"sha256": "sha256-MnesECrheq0QpVq+x1/1aWyNEJeQOWQ0tJbnUIeFQgM="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-reflect/1.6.20",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -18002,21 +17602,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-scripting-common/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-scripting-common-1.9.0.pom": {
|
||||
"sha1": "326fa3ca7bb1705794879cbae1a9467b7d7aa09e",
|
||||
"sha256": "sha256-C/MG5PRe6xrDAk4pnUybcL4J7OmsAOcLL/mLPtQA8wc="
|
||||
},
|
||||
"kotlin-scripting-common-1.9.0.jar": {
|
||||
"sha1": "ea019fa9e3885795a81df270775e5609f7115307",
|
||||
"sha256": "sha256-KFxBwO7tWaDn3LGIuJ+BVBR/vLvVNUcc9piWzNonP4Q="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-scripting-compiler-embeddable/1.6.20",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -18047,21 +17632,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-scripting-compiler-embeddable/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-scripting-compiler-embeddable-1.9.0.pom": {
|
||||
"sha1": "cba5705bf5fb615d2b72195faa25159e83e3a264",
|
||||
"sha256": "sha256-UJ5ikUwwvT43GcDgLk5Df8vxkRa4ouZYSPbUbFTsXJ4="
|
||||
},
|
||||
"kotlin-scripting-compiler-embeddable-1.9.0.jar": {
|
||||
"sha1": "1708703c0683b8d2a0a76048544480b94d3eb458",
|
||||
"sha256": "sha256-Rp3RIGiVipevzhGIoBRFVM3tZ95aGqC/XKUwOfKdizY="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-scripting-compiler-impl-embeddable/1.6.20",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -18092,21 +17662,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-scripting-compiler-impl-embeddable/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-scripting-compiler-impl-embeddable-1.9.0.pom": {
|
||||
"sha1": "5459191b6fda205abb23fb4a767bb0f86e8cc12e",
|
||||
"sha256": "sha256-zaYp8KgbqcAKM95QJ/D4/7+fC45E5BlwNHdmu4WLTmM="
|
||||
},
|
||||
"kotlin-scripting-compiler-impl-embeddable-1.9.0.jar": {
|
||||
"sha1": "c825693be78dfcbc351a53856d75f4d11bb0e274",
|
||||
"sha256": "sha256-ZcUlbiyPvdpCbAMobmomgmfXEu+V7C05yVKSlXN4sE0="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-scripting-jvm/1.6.20",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -18137,21 +17692,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-scripting-jvm/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-scripting-jvm-1.9.0.pom": {
|
||||
"sha1": "178d3c678207d53a68cab7ce61dd89867bacdc6f",
|
||||
"sha256": "sha256-Ymj4BVjTX9qSRruneTKWkrlNWJWWVQfL6KhIkSxQ5yo="
|
||||
},
|
||||
"kotlin-scripting-jvm-1.9.0.jar": {
|
||||
"sha1": "e2e6a0bd37a72cded2fec7882199e1bdc4e8bcb4",
|
||||
"sha256": "sha256-Zp3SvGBBjgdRU/2K2NllvlaetlwvMIOIyxEDud8TUVk="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-script-runtime/1.6.20",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -18182,21 +17722,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-script-runtime/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-script-runtime-1.9.0.pom": {
|
||||
"sha1": "a52322c274112401ded9622eb8d7eb2570fae853",
|
||||
"sha256": "sha256-FNwHhdGUFP7sEgI91z64DIPQeIC3PlS48IqHj0I9seY="
|
||||
},
|
||||
"kotlin-script-runtime-1.9.0.jar": {
|
||||
"sha1": "4b3102cbbb7e1b58d9d1adf89563f00069ffa7d1",
|
||||
"sha256": "sha256-2E0MykEFD6wqlS0RBEc8Mpr/BMULNxMuV1SiCYCa3Z8="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-stdlib-common/1.2.71",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -18497,21 +18022,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-stdlib-common/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-stdlib-common-1.9.0.pom": {
|
||||
"sha1": "0a865a0c5a64618fd1dcca13d05dea4cba44c832",
|
||||
"sha256": "sha256-NmDTanD+s6vknxG5BjPkHTYnNXbwcbDhCdqbOg3wgqU="
|
||||
},
|
||||
"kotlin-stdlib-common-1.9.0.jar": {
|
||||
"sha1": "cd65c21cfd1eec4d44ef09f9f52b6d9f8a720636",
|
||||
"sha256": "sha256-KDJ0IEvXwCB4nsRvj45yr0JE1/VQszkqV+XKAGrXqiw="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.2.71",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -18692,21 +18202,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-stdlib-jdk7-1.9.0.pom": {
|
||||
"sha1": "5ce6c5278ef6e342507a96372ee534ed0b830e54",
|
||||
"sha256": "sha256-wRB08MiYqYuGPGFEcdQ409+Soewzgqbjf5NdfXGVS1o="
|
||||
},
|
||||
"kotlin-stdlib-jdk7-1.9.0.jar": {
|
||||
"sha1": "f320478990d05e0cfaadd74f9619fd6027adbf37",
|
||||
"sha256": "sha256-t5eaeqyUBV8Nnx/TtHzl/+HLYDKoQrqfvnGG8IUokXg="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.2.71",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -18872,21 +18367,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-stdlib-jdk8-1.9.0.pom": {
|
||||
"sha1": "4f04e57e4a12d4a59f620c63520681c4ff1d03e6",
|
||||
"sha256": "sha256-ZNWY3YjiUEZnMeIDBKtvBsu7urfuMitHA7a1n4gcT5I="
|
||||
},
|
||||
"kotlin-stdlib-jdk8-1.9.0.jar": {
|
||||
"sha1": "e000bd084353d84c9e888f6fb341dc1f5b79d948",
|
||||
"sha256": "sha256-pZ+iT98f+1lLrs2/D9EAEPl3zqECNtSH/jRkl3pzd/o="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-stdlib/1.1.3-2",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -19232,21 +18712,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-stdlib/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-stdlib-1.9.0.pom": {
|
||||
"sha1": "4aea0493dfd3ee18df73bcd97db791c2ea5bb383",
|
||||
"sha256": "sha256-N3UiY/Ysw+MlCFbiiO5Kc9QQLXJqd2JwNPlIBsjBCso="
|
||||
},
|
||||
"kotlin-stdlib-1.9.0.jar": {
|
||||
"sha1": "8ee15ef0c67dc83d874f412d84378d7f0eb50b63",
|
||||
"sha256": "sha256-Na7/vi21qkRgcs7lD87ki3+p4vxRyjfAzH19C8OdlS4="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-stdlib/1.9.21",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -19316,21 +18781,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-tooling-core/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-tooling-core-1.9.0.pom": {
|
||||
"sha1": "0c1335f31eaaf304a866a1ca780bb75c05df79d1",
|
||||
"sha256": "sha256-KSbD/CFJWXAcjxYNjdyGn3s/pFKv3o3RdcjnwrvHBSI="
|
||||
},
|
||||
"kotlin-tooling-core-1.9.0.jar": {
|
||||
"sha1": "7b3e809d24d27d00072fd69eb130f8a6cbd365e1",
|
||||
"sha256": "sha256-5TmiJCi5ysZ/dbLWHytuKnGDUNe7MYI8fcqJB/kJma4="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-tooling-metadata/1.6.20",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -19376,21 +18826,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-util-io/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-util-io-1.9.0.pom": {
|
||||
"sha1": "9481aa1ef0a147a6ca09cbf4a5f72915303185e5",
|
||||
"sha256": "sha256-BUBa+xn3tgbFKr6haJqi1ew9qQL+4teoV2lDOeSgQJQ="
|
||||
},
|
||||
"kotlin-util-io-1.9.0.jar": {
|
||||
"sha1": "e9b6d257f0c94bdf8a0f4ab67d6ffc199a0deba7",
|
||||
"sha256": "sha256-gdNtxt4/C+rwTDl6BrVoITujc6vO9Tlyt7gvYX1a9ws="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-util-klib/1.6.20",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -19421,21 +18856,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-util-klib/1.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-util-klib-1.9.0.pom": {
|
||||
"sha1": "45a02a0e039fcf3ef011e38917da856894dad326",
|
||||
"sha256": "sha256-acZHGaDgRjb2whMZ/lGKC1gieEu66P7YXmUfv6b4pFs="
|
||||
},
|
||||
"kotlin-util-klib-1.9.0.jar": {
|
||||
"sha1": "41df7b8939660817a283d9255d5f2e4b555eebc6",
|
||||
"sha256": "sha256-wtxr820zabdzdVq4k3uX5Tmk1F04Fb7xm+36FUsS0xM="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/markdown-jvm/0.2.1",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -20683,27 +20103,27 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/slf4j/slf4j-api/2.1.0-alpha1",
|
||||
"path": "org/slf4j/slf4j-api/2.0.9",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"slf4j-api-2.1.0-alpha1.pom": {
|
||||
"sha1": "c5362a45b3be4d9d110f5450822ea81b27adb1a0",
|
||||
"sha256": "sha256-QirqW+u6gwWzxhT6Zo7SKePJYQkw7PQvhzOO4F4minU="
|
||||
"slf4j-api-2.0.9.pom": {
|
||||
"sha1": "96a47b716e8241bca75562533e3a9fbb7ffbefb9",
|
||||
"sha256": "sha256-nDplT50KoaNLMXjr5TqJx2eS4dgfwelznL6bFhBSM4U="
|
||||
},
|
||||
"slf4j-api-2.1.0-alpha1.jar": {
|
||||
"sha1": "4e2525fc4327cc553c52e3937427c7cf2114735f",
|
||||
"sha256": "sha256-mrf/pkYgK0mdBZlaPsgvMbzLelA0XBUU2MtC7IzOo1M="
|
||||
"slf4j-api-2.0.9.jar": {
|
||||
"sha1": "7cf2726fdcfbc8610f9a71fb3ed639871f315340",
|
||||
"sha256": "sha256-CBiTDcjX3rtAMgRhFpHaWOSdQsULb/z9zgLa23w8K2w="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/slf4j/slf4j-bom/2.1.0-alpha1",
|
||||
"path": "org/slf4j/slf4j-bom/2.0.9",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"slf4j-bom-2.1.0-alpha1.pom": {
|
||||
"sha1": "f8784ee61914057bec3db57b5efea4e6b0333c6f",
|
||||
"sha256": "sha256-qOgTiZePRAcJJBuYPTHvp4cRO+EbgYwsa82e0wlv1IU="
|
||||
"slf4j-bom-2.0.9.pom": {
|
||||
"sha1": "54c55d4b55c9f82d34434fe6a36e8c6b5671588a",
|
||||
"sha256": "sha256-6u9FhIB9gSxqC2z4OdXkf1DHVDJ3GbnOCB4nHRXaYkM="
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -20731,12 +20151,12 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/slf4j/slf4j-parent/2.1.0-alpha1",
|
||||
"path": "org/slf4j/slf4j-parent/2.0.9",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"slf4j-parent-2.1.0-alpha1.pom": {
|
||||
"sha1": "ef0d60c3407004bb7e71643a13644f4bc2f3ec00",
|
||||
"sha256": "sha256-zkc1sfnIId4Lkrjb5AsHHG6jIHMuWTVZxupt+WX4c48="
|
||||
"slf4j-parent-2.0.9.pom": {
|
||||
"sha1": "fa1b5ef4b7f48daf822d408eebd3319fa6254c0f",
|
||||
"sha256": "sha256-wwfwQkFB8cUArlzw04aOSGbLIZ7V45m2bFoHxh6iH9U="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
+26
-39
@@ -2,7 +2,6 @@ androidx.activity:activity:1.0.0
|
||||
androidx.activity:activity:1.0.0-rc01
|
||||
androidx.activity:activity:1.2.4
|
||||
androidx.annotation:annotation-experimental:1.1.0
|
||||
androidx.annotation:annotation:1.0.0
|
||||
androidx.annotation:annotation:1.1.0
|
||||
androidx.annotation:annotation:1.2.0
|
||||
androidx.annotation:annotation:1.3.0
|
||||
@@ -11,7 +10,6 @@ androidx.appcompat:appcompat-resources:1.2.0
|
||||
androidx.appcompat:appcompat-resources:1.3.1
|
||||
androidx.appcompat:appcompat-resources:1.4.1
|
||||
androidx.appcompat:appcompat-resources:1.4.2
|
||||
androidx.appcompat:appcompat:1.0.0
|
||||
androidx.appcompat:appcompat:1.1.0-rc01
|
||||
androidx.appcompat:appcompat:1.2.0
|
||||
androidx.appcompat:appcompat:1.3.1
|
||||
@@ -40,7 +38,6 @@ androidx.coordinatorlayout:coordinatorlayout:1.0.0
|
||||
androidx.coordinatorlayout:coordinatorlayout:1.1.0
|
||||
androidx.core:core-ktx:1.6.0
|
||||
androidx.core:core-splashscreen:1.0.0
|
||||
androidx.core:core:1.0.0
|
||||
androidx.core:core:1.1.0
|
||||
androidx.core:core:1.1.0-rc01
|
||||
androidx.core:core:1.2.0
|
||||
@@ -128,13 +125,10 @@ androidx.tracing:tracing:1.1.0
|
||||
androidx.transition:transition:1.1.0
|
||||
androidx.transition:transition:1.2.0
|
||||
androidx.transition:transition:1.2.0-rc01
|
||||
androidx.vectordrawable:vectordrawable-animated:1.0.0
|
||||
androidx.vectordrawable:vectordrawable-animated:1.1.0
|
||||
androidx.vectordrawable:vectordrawable-animated:1.1.0-rc01
|
||||
androidx.vectordrawable:vectordrawable:1.0.0
|
||||
androidx.vectordrawable:vectordrawable:1.1.0
|
||||
androidx.vectordrawable:vectordrawable:1.1.0-rc01
|
||||
androidx.versionedparcelable:versionedparcelable:1.0.0
|
||||
androidx.versionedparcelable:versionedparcelable:1.1.0
|
||||
androidx.versionedparcelable:versionedparcelable:1.1.0-rc01
|
||||
androidx.versionedparcelable:versionedparcelable:1.1.1
|
||||
@@ -784,37 +778,35 @@ org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.2
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2
|
||||
org.jetbrains.kotlin:kotlin-android-extensions:1.6.20
|
||||
org.jetbrains.kotlin:kotlin-android-extensions:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-android-extensions:1.7.22
|
||||
org.jetbrains.kotlin:kotlin-annotations-jvm:1.3.72
|
||||
org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.6.20
|
||||
org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.7.22
|
||||
org.jetbrains.kotlin:kotlin-build-common:1.6.20
|
||||
org.jetbrains.kotlin:kotlin-build-tools-api:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-build-tools-impl:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-build-common:1.7.22
|
||||
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.6.20
|
||||
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.22
|
||||
org.jetbrains.kotlin:kotlin-compiler-runner:1.6.20
|
||||
org.jetbrains.kotlin:kotlin-compiler-runner:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-compiler-runner:1.7.22
|
||||
org.jetbrains.kotlin:kotlin-daemon-client:1.6.20
|
||||
org.jetbrains.kotlin:kotlin-daemon-client:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-daemon-client:1.7.22
|
||||
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.6.20
|
||||
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-gradle-plugins-bom:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-gradle-plugin-annotations:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.7.22
|
||||
org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.6.20
|
||||
org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-gradle-plugin-idea-proto:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-gradle-plugin-idea:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.22
|
||||
org.jetbrains.kotlin:kotlin-gradle-plugin-idea-proto:1.7.22
|
||||
org.jetbrains.kotlin:kotlin-gradle-plugin-idea:1.7.22
|
||||
org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.6.20
|
||||
org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.7.22
|
||||
org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.20
|
||||
org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.22
|
||||
org.jetbrains.kotlin:kotlin-klib-commonizer-api:1.6.20
|
||||
org.jetbrains.kotlin:kotlin-klib-commonizer-api:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-klib-commonizer-api:1.7.22
|
||||
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:1.7.22
|
||||
org.jetbrains.kotlin:kotlin-native-utils:1.6.20
|
||||
org.jetbrains.kotlin:kotlin-native-utils:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-native-utils:1.7.22
|
||||
org.jetbrains.kotlin:kotlin-project-model:1.6.20
|
||||
org.jetbrains.kotlin:kotlin-project-model:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-project-model:1.7.22
|
||||
org.jetbrains.kotlin:kotlin-reflect:1.1.3-2
|
||||
org.jetbrains.kotlin:kotlin-reflect:1.2.0
|
||||
org.jetbrains.kotlin:kotlin-reflect:1.3.20
|
||||
@@ -822,17 +814,17 @@ org.jetbrains.kotlin:kotlin-reflect:1.3.50
|
||||
org.jetbrains.kotlin:kotlin-reflect:1.3.72
|
||||
org.jetbrains.kotlin:kotlin-reflect:1.4.32
|
||||
org.jetbrains.kotlin:kotlin-reflect:1.5.31
|
||||
org.jetbrains.kotlin:kotlin-reflect:1.6.10
|
||||
org.jetbrains.kotlin:kotlin-reflect:1.7.10
|
||||
org.jetbrains.kotlin:kotlin-reflect:1.7.22
|
||||
org.jetbrains.kotlin:kotlin-scripting-common:1.6.20
|
||||
org.jetbrains.kotlin:kotlin-scripting-common:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-scripting-common:1.7.22
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.6.20
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.7.22
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.6.20
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.7.22
|
||||
org.jetbrains.kotlin:kotlin-scripting-jvm:1.6.20
|
||||
org.jetbrains.kotlin:kotlin-scripting-jvm:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-script-runtime:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-scripting-jvm:1.7.22
|
||||
org.jetbrains.kotlin:kotlin-script-runtime:1.7.22
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.2.71
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.20
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.50
|
||||
@@ -841,7 +833,6 @@ org.jetbrains.kotlin:kotlin-stdlib-common:1.4.32
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.5.31
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.6.20
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.7.22
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.71
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.20
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.50
|
||||
@@ -850,7 +841,6 @@ org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.32
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.20
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.22
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.2.71
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.20
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.50
|
||||
@@ -858,7 +848,6 @@ org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.72
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.32
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.22
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-stdlib:1.1.3-2
|
||||
org.jetbrains.kotlin:kotlin-stdlib:1.2.71
|
||||
org.jetbrains.kotlin:kotlin-stdlib:1.3.20
|
||||
@@ -868,13 +857,12 @@ org.jetbrains.kotlin:kotlin-stdlib:1.4.32
|
||||
org.jetbrains.kotlin:kotlin-stdlib:1.5.31
|
||||
org.jetbrains.kotlin:kotlin-stdlib:1.6.20
|
||||
org.jetbrains.kotlin:kotlin-stdlib:1.7.22
|
||||
org.jetbrains.kotlin:kotlin-stdlib:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-tooling-core:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-tooling-core:1.7.22
|
||||
org.jetbrains.kotlin:kotlin-tooling-metadata:1.6.20
|
||||
org.jetbrains.kotlin:kotlin-util-io:1.6.20
|
||||
org.jetbrains.kotlin:kotlin-util-io:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-util-io:1.7.22
|
||||
org.jetbrains.kotlin:kotlin-util-klib:1.6.20
|
||||
org.jetbrains.kotlin:kotlin-util-klib:1.9.0
|
||||
org.jetbrains.kotlin:kotlin-util-klib:1.7.22
|
||||
org.jetbrains.trove4j:trove4j:20160824
|
||||
org.jetbrains:annotations:13.0
|
||||
org.jetbrains:markdown-jvm:0.2.1
|
||||
@@ -942,5 +930,4 @@ org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.7.22
|
||||
com.android.tools.lint:lint-gradle:30.4.2
|
||||
com.android.tools.build:gradle:7.4.2
|
||||
com.android.tools.build:aapt2:7.4.2-8841542
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2
|
||||
org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.9.0
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2
|
||||
@@ -697,7 +697,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.4.0/error_prone_annotations-2.4.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.7.1/error_prone_annotations-2.7.1.pom
|
||||
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.24.1/error_prone_annotations-2.24.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.24.0/error_prone_annotations-2.24.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.0.18/error_prone_parent-2.0.18.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.2.0/error_prone_parent-2.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.3.1/error_prone_parent-2.3.1.pom
|
||||
@@ -706,7 +706,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.4.0/error_prone_parent-2.4.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.7.1/error_prone_parent-2.7.1.pom
|
||||
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.24.1/error_prone_parent-2.24.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.24.0/error_prone_parent-2.24.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/flatbuffers/flatbuffers-java/1.12.0/flatbuffers-java-1.12.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/google/1/google-1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.pom
|
||||
@@ -1116,55 +1116,36 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-co
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-core/1.5.2/kotlinx-coroutines-core-1.5.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlinx/kotlinx-metadata-jvm/0.1.0/kotlinx-metadata-jvm-0.1.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/jvm/org.jetbrains.kotlin.jvm.gradle.plugin/1.7.22/org.jetbrains.kotlin.jvm.gradle.plugin-1.7.22.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/jvm/org.jetbrains.kotlin.jvm.gradle.plugin/1.9.0/org.jetbrains.kotlin.jvm.gradle.plugin-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-android-extensions/1.6.20/kotlin-android-extensions-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-android-extensions/1.7.22/kotlin-android-extensions-1.7.22.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-android-extensions/1.9.0/kotlin-android-extensions-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-annotations-jvm/1.3.72/kotlin-annotations-jvm-1.3.72.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-annotation-processing-gradle/1.6.20/kotlin-annotation-processing-gradle-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-annotation-processing-gradle/1.7.22/kotlin-annotation-processing-gradle-1.7.22.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-build-common/1.6.20/kotlin-build-common-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-build-common/1.7.22/kotlin-build-common-1.7.22.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-build-common/1.9.0/kotlin-build-common-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-build-tools-api/1.9.0/kotlin-build-tools-api-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-build-tools-impl/1.9.0/kotlin-build-tools-impl-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.6.20/kotlin-compiler-embeddable-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.7.22/kotlin-compiler-embeddable-1.7.22.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.9.0/kotlin-compiler-embeddable-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-compiler-runner/1.6.20/kotlin-compiler-runner-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-compiler-runner/1.7.22/kotlin-compiler-runner-1.7.22.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-compiler-runner/1.9.0/kotlin-compiler-runner-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-daemon-client/1.6.20/kotlin-daemon-client-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-daemon-client/1.7.22/kotlin-daemon-client-1.7.22.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-daemon-client/1.9.0/kotlin-daemon-client-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-daemon-embeddable/1.6.20/kotlin-daemon-embeddable-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-daemon-embeddable/1.7.22/kotlin-daemon-embeddable-1.7.22.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-daemon-embeddable/1.9.0/kotlin-daemon-embeddable-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugins-bom/1.9.0/kotlin-gradle-plugins-bom-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin-annotations/1.9.0/kotlin-gradle-plugin-annotations-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin-api/1.6.20/kotlin-gradle-plugin-api-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin-api/1.7.22/kotlin-gradle-plugin-api-1.7.22.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin-api/1.9.0/kotlin-gradle-plugin-api-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin-idea-proto/1.7.22/kotlin-gradle-plugin-idea-proto-1.7.22.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin-idea-proto/1.9.0/kotlin-gradle-plugin-idea-proto-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin-idea/1.7.22/kotlin-gradle-plugin-idea-1.7.22.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin-idea/1.9.0/kotlin-gradle-plugin-idea-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin-model/1.6.20/kotlin-gradle-plugin-model-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin-model/1.7.22/kotlin-gradle-plugin-model-1.7.22.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin-model/1.9.0/kotlin-gradle-plugin-model-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.6.20/kotlin-gradle-plugin-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.7.22/kotlin-gradle-plugin-1.7.22.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.9.0/kotlin-gradle-plugin-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-klib-commonizer-api/1.6.20/kotlin-klib-commonizer-api-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-klib-commonizer-api/1.7.22/kotlin-klib-commonizer-api-1.7.22.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-klib-commonizer-api/1.9.0/kotlin-klib-commonizer-api-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-klib-commonizer-embeddable/1.9.0/kotlin-klib-commonizer-embeddable-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-klib-commonizer-embeddable/1.7.22/kotlin-klib-commonizer-embeddable-1.7.22.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-native-utils/1.6.20/kotlin-native-utils-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-native-utils/1.7.22/kotlin-native-utils-1.7.22.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-native-utils/1.9.0/kotlin-native-utils-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-project-model/1.6.20/kotlin-project-model-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-project-model/1.7.22/kotlin-project-model-1.7.22.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-project-model/1.9.0/kotlin-project-model-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.1.3-2/kotlin-reflect-1.1.3-2.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.2.0/kotlin-reflect-1.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.3.20/kotlin-reflect-1.3.20.pom
|
||||
@@ -1172,26 +1153,20 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.3.50/
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.3.72/kotlin-reflect-1.3.72.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.4.32/kotlin-reflect-1.4.32.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.5.31/kotlin-reflect-1.5.31.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.6.10/kotlin-reflect-1.6.10.pom
|
||||
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.10/kotlin-reflect-1.7.10.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/2.0.0-Beta2/kotlin-reflect-2.0.0-Beta2.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.9.0/kotlin-scripting-common-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-scripting-compiler-embeddable/1.6.20/kotlin-scripting-compiler-embeddable-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-scripting-compiler-embeddable/1.7.22/kotlin-scripting-compiler-embeddable-1.7.22.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-scripting-compiler-embeddable/1.9.0/kotlin-scripting-compiler-embeddable-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-scripting-compiler-impl-embeddable/1.6.20/kotlin-scripting-compiler-impl-embeddable-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-scripting-compiler-impl-embeddable/1.7.22/kotlin-scripting-compiler-impl-embeddable-1.7.22.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-scripting-compiler-impl-embeddable/1.9.0/kotlin-scripting-compiler-impl-embeddable-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-scripting-jvm/1.6.20/kotlin-scripting-jvm-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-scripting-jvm/1.7.22/kotlin-scripting-jvm-1.7.22.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-scripting-jvm/1.9.0/kotlin-scripting-jvm-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-script-runtime/1.6.20/kotlin-script-runtime-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-script-runtime/1.7.22/kotlin-script-runtime-1.7.22.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-script-runtime/1.9.0/kotlin-script-runtime-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.2.71/kotlin-stdlib-common-1.2.71.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.3.0/kotlin-stdlib-common-1.3.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.3.20/kotlin-stdlib-common-1.3.20.pom
|
||||
@@ -1212,7 +1187,6 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.6.21/kotlin-stdlib-common-1.6.21.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.7.10/kotlin-stdlib-common-1.7.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.7.22/kotlin-stdlib-common-1.7.22.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.9.0/kotlin-stdlib-common-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.2.71/kotlin-stdlib-jdk7-1.2.71.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.3.20/kotlin-stdlib-jdk7-1.3.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.3.50/kotlin-stdlib-jdk7-1.3.50.pom
|
||||
@@ -1225,7 +1199,6 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.5
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.6.20/kotlin-stdlib-jdk7-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.7.10/kotlin-stdlib-jdk7-1.7.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.7.22/kotlin-stdlib-jdk7-1.7.22.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.9.0/kotlin-stdlib-jdk7-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.2.71/kotlin-stdlib-jdk8-1.2.71.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.20/kotlin-stdlib-jdk8-1.3.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.50/kotlin-stdlib-jdk8-1.3.50.pom
|
||||
@@ -1237,7 +1210,6 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.5
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.5.31/kotlin-stdlib-jdk8-1.5.31.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.7.10/kotlin-stdlib-jdk8-1.7.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.7.22/kotlin-stdlib-jdk8-1.7.22.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.9.0/kotlin-stdlib-jdk8-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.1.3-2/kotlin-stdlib-1.1.3-2.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.0/kotlin-stdlib-1.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.20/kotlin-stdlib-1.2.20.pom
|
||||
@@ -1261,18 +1233,14 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.6.20/k
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.6.21/kotlin-stdlib-1.6.21.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.7.10/kotlin-stdlib-1.7.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.7.22/kotlin-stdlib-1.7.22.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-Beta2/kotlin-stdlib-2.0.0-Beta2.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.9.0/kotlin-tooling-core-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-tooling-metadata/1.6.20/kotlin-tooling-metadata-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-util-io/1.6.20/kotlin-util-io-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-util-io/1.7.22/kotlin-util-io-1.7.22.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-util-io/1.9.0/kotlin-util-io-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-util-klib/1.6.20/kotlin-util-klib-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-util-klib/1.7.22/kotlin-util-klib-1.7.22.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-util-klib/1.9.0/kotlin-util-klib-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/markdown-jvm/0.2.1/markdown-jvm-0.2.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/markdown/0.2.1/markdown-0.2.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.pom
|
||||
@@ -1355,11 +1323,11 @@ https://repo.maven.apache.org/maven2/org/robolectric/utils-reflector/4.7.3/utils
|
||||
https://repo.maven.apache.org/maven2/org/robolectric/utils/4.7.3/utils-4.7.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/1.7.21/slf4j-api-1.7.21.pom
|
||||
https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/1.7.30/slf4j-api-1.7.30.pom
|
||||
https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/2.1.0-alpha1/slf4j-api-2.1.0-alpha1.pom
|
||||
https://repo.maven.apache.org/maven2/org/slf4j/slf4j-bom/2.1.0-alpha1/slf4j-bom-2.1.0-alpha1.pom
|
||||
https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/2.0.9/slf4j-api-2.0.9.pom
|
||||
https://repo.maven.apache.org/maven2/org/slf4j/slf4j-bom/2.0.9/slf4j-bom-2.0.9.pom
|
||||
https://repo.maven.apache.org/maven2/org/slf4j/slf4j-parent/1.7.21/slf4j-parent-1.7.21.pom
|
||||
https://repo.maven.apache.org/maven2/org/slf4j/slf4j-parent/1.7.30/slf4j-parent-1.7.30.pom
|
||||
https://repo.maven.apache.org/maven2/org/slf4j/slf4j-parent/2.1.0-alpha1/slf4j-parent-2.1.0-alpha1.pom
|
||||
https://repo.maven.apache.org/maven2/org/slf4j/slf4j-parent/2.0.9/slf4j-parent-2.0.9.pom
|
||||
https://repo.maven.apache.org/maven2/org/sonatype/oss/oss-parent/4/oss-parent-4.pom
|
||||
https://repo.maven.apache.org/maven2/org/sonatype/oss/oss-parent/5/oss-parent-5.pom
|
||||
https://repo.maven.apache.org/maven2/org/sonatype/oss/oss-parent/7/oss-parent-7.pom
|
||||
|
||||
@@ -50,8 +50,7 @@ org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.7.22
|
||||
com.android.tools.lint:lint-gradle:30.4.2
|
||||
com.android.tools.build:gradle:7.4.2
|
||||
com.android.tools.build:aapt2:7.4.2-8841542
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2
|
||||
org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.9.0' \
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2' \
|
||||
>> "${DEPS_LIST}"
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,6 @@ name: default: let
|
||||
logEnvOverride = value:
|
||||
builtins.trace "getEnvWithDefault ${name} (default: ${toString default}): ${value}" value;
|
||||
in
|
||||
if envOverride != "" && envOverride != default
|
||||
if envOverride != ""
|
||||
then logEnvOverride envOverride
|
||||
else default
|
||||
|
||||
@@ -89,7 +89,7 @@ if [[ -n "${nixResultPath}" ]]; then
|
||||
toDelete=$(findByResult "${nixResultPath}")
|
||||
else
|
||||
# use regular expression that should match all status-mobile build artifacts
|
||||
toDelete=$(findByRegex '.*-status-(mobile|go)-(shell|source|build|patched-npm-gradle-modules).*')
|
||||
toDelete=$(findByRegex '.*-status-(react|go)-(shell|source|build|patched-npm-gradle-modules).*')
|
||||
fi
|
||||
|
||||
# remove duplicates and return
|
||||
|
||||
@@ -102,12 +102,6 @@
|
||||
"rn-snoopy": "git+https://github.com/status-im/rn-snoopy.git#refs/tags/v2.0.2-status",
|
||||
"shadow-cljs": "2.26.2"
|
||||
},
|
||||
"resolutions": {
|
||||
"_comment": "This prevents random metro crashes till we upgrade to react-native 0.73.x",
|
||||
"metro": "^0.79.1",
|
||||
"metro-config": "^0.79.1",
|
||||
"metro-core": "^0.79.1"
|
||||
},
|
||||
"binary": {
|
||||
"module_name": "status_nodejs_addon",
|
||||
"module_path": "./lib/binding/",
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 9.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 9.4 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB |
@@ -2,7 +2,7 @@
|
||||
|
||||
set -eof pipefail
|
||||
|
||||
FILES=$(comm -23 <(sort <(git ls-files --cached --others --exclude-standard)) <(sort <(git ls-files --deleted)) | grep --ignore-case -E '\.(java|cpp|nix|json|sh|md|js|clj|cljs|cljc|edn|kt|m)$')
|
||||
FILES=$(comm -23 <(sort <(git ls-files --cached --others --exclude-standard)) <(sort <(git ls-files --deleted)) | grep --ignore-case -E '\.(java|cpp|nix|json|sh|md|js|clj|cljs|cljc|edn)$')
|
||||
N_FILES=$(echo "$FILES" | wc -l)
|
||||
LINT_SHOULD_FIX=0
|
||||
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
import { useDerivedValue, withTiming, interpolate, useAnimatedScrollHandler, runOnJS } from 'react-native-reanimated';
|
||||
|
||||
export function navigationHeaderOpacity(distanceFromListTop, isAllLoaded, isCalculationsComplete, startPosition) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
const isCalculationsCompleteValue = isCalculationsComplete.value;
|
||||
if (distanceFromListTop.value < startPosition && isAllLoaded.value) {
|
||||
return isCalculationsCompleteValue ? withTiming(0) : 0;
|
||||
} else {
|
||||
return isCalculationsCompleteValue ? withTiming(1) : 1;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function navigationHeaderPosition(distanceFromListTop, isAllLoaded, topBarHeight, startPosition) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
return distanceFromListTop.value < startPosition && isAllLoaded.value ? withTiming(topBarHeight) : withTiming(0);
|
||||
});
|
||||
}
|
||||
|
||||
export function interpolateNavigationViewOpacity(props) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
const {
|
||||
'all-loaded?': isAllLoaded,
|
||||
'end-position': endPosition,
|
||||
'start-position': startPosition,
|
||||
'distance-from-list-top': distanceFromListTop,
|
||||
} = props;
|
||||
if (isAllLoaded.value) {
|
||||
return interpolate(distanceFromListTop.value, [startPosition, endPosition], [0, 1], {
|
||||
extrapolateLeft: 'clamp',
|
||||
extrapolateRight: 'clamp',
|
||||
});
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function messagesListOnScroll(distanceFromListTop, chatListScrollY, callback) {
|
||||
return function (event) {
|
||||
'worklet';
|
||||
const currentY = event.contentOffset.y;
|
||||
const layoutHeight = event.layoutMeasurement.height;
|
||||
const contentSizeY = event.contentSize.height - layoutHeight;
|
||||
const newDistance = contentSizeY - currentY;
|
||||
distanceFromListTop.value = newDistance;
|
||||
chatListScrollY.value = currentY;
|
||||
runOnJS(callback)(layoutHeight, newDistance);
|
||||
};
|
||||
}
|
||||
|
||||
export function placeholderOpacity(isCalculationsComplete) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
return isCalculationsComplete.value ? 0 : 1;
|
||||
});
|
||||
}
|
||||
|
||||
export function placeholderZIndex(isCalculationsComplete) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
return isCalculationsComplete.value ? 0 : 2;
|
||||
});
|
||||
}
|
||||
|
||||
export function scrollDownButtonOpacity(chatListScrollY, isComposerFocused, windowHeight) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
if (isComposerFocused.value) {
|
||||
return 0;
|
||||
} else {
|
||||
return chatListScrollY.value > windowHeight * 0.75 ? 1 : 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function jumpToButtonOpacity(scrollDownButtonOpacity, isComposerFocused) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
return withTiming(scrollDownButtonOpacity.value == 1 || isComposerFocused.value ? 0 : 1);
|
||||
});
|
||||
}
|
||||
|
||||
export function jumpToButtonPosition(scrollDownButtonOpacity, isComposerFocused) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
return withTiming(scrollDownButtonOpacity.value == 1 || isComposerFocused.value ? 35 : 0);
|
||||
});
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
import { useDerivedValue, withTiming } from 'react-native-reanimated';
|
||||
|
||||
export function scrollDownButtonOpacity(chatListScrollY, isComposerFocused, windowHeight) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
if (isComposerFocused.value) {
|
||||
return 0;
|
||||
} else {
|
||||
return chatListScrollY.value > windowHeight * 0.75 ? 1 : 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function jumpToButtonOpacity(scrollDownButtonOpacity, isComposerFocused) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
return withTiming(scrollDownButtonOpacity.value == 1 || isComposerFocused.value ? 0 : 1);
|
||||
});
|
||||
}
|
||||
|
||||
export function jumpToButtonPosition(scrollDownButtonOpacity, isComposerFocused) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
return withTiming(scrollDownButtonOpacity.value == 1 || isComposerFocused.value ? 35 : 0);
|
||||
});
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
import { withTiming, runOnJS } from 'react-native-reanimated';
|
||||
|
||||
export function messagesListOnScroll(distanceFromListTop, chatListScrollY, callback) {
|
||||
return function (event) {
|
||||
'worklet';
|
||||
const currentY = event.contentOffset.y;
|
||||
const layoutHeight = event.layoutMeasurement.height;
|
||||
const contentSizeY = event.contentSize.height - layoutHeight;
|
||||
const newDistance = contentSizeY - currentY;
|
||||
distanceFromListTop.value = newDistance;
|
||||
chatListScrollY.value = currentY;
|
||||
runOnJS(callback)(layoutHeight, newDistance);
|
||||
};
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
import { useDerivedValue, withTiming, interpolate } from 'react-native-reanimated';
|
||||
|
||||
export function navigationHeaderOpacity(distanceFromListTop, isAllLoaded, isCalculationsComplete, startPosition) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
const isCalculationsCompleteValue = isCalculationsComplete.value;
|
||||
if (distanceFromListTop.value < startPosition && isAllLoaded.value) {
|
||||
return isCalculationsCompleteValue ? withTiming(0) : 0;
|
||||
} else {
|
||||
return isCalculationsCompleteValue ? withTiming(1) : 1;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function navigationHeaderPosition(distanceFromListTop, isAllLoaded, topBarHeight, startPosition) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
return distanceFromListTop.value < startPosition && isAllLoaded.value ? withTiming(topBarHeight) : withTiming(0);
|
||||
});
|
||||
}
|
||||
|
||||
export function interpolateNavigationViewOpacity(props) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
const {
|
||||
'all-loaded?': isAllLoaded,
|
||||
'end-position': endPosition,
|
||||
'start-position': startPosition,
|
||||
'distance-from-list-top': distanceFromListTop,
|
||||
} = props;
|
||||
if (isAllLoaded.value) {
|
||||
return interpolate(distanceFromListTop.value, [startPosition, endPosition], [0, 1], {
|
||||
extrapolateLeft: 'clamp',
|
||||
extrapolateRight: 'clamp',
|
||||
});
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
import { useDerivedValue } from 'react-native-reanimated';
|
||||
|
||||
export function placeholderOpacity(isCalculationsComplete) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
return isCalculationsComplete.value ? 0 : 1;
|
||||
});
|
||||
}
|
||||
|
||||
export function placeholderZIndex(isCalculationsComplete) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
return isCalculationsComplete.value ? 0 : 2;
|
||||
});
|
||||
}
|
||||
@@ -36,13 +36,6 @@
|
||||
:always
|
||||
(update :contacts conj (:id member))))
|
||||
|
||||
(defn decode-chat-id
|
||||
[chat-id]
|
||||
(let [community-id (subs chat-id 0 constants/community-id-length)
|
||||
channel-id (subs chat-id constants/community-id-length)]
|
||||
{:community-id community-id
|
||||
:channel-id channel-id}))
|
||||
|
||||
(defn- unmarshal-members
|
||||
[{:keys [members chat-type] :as chat}]
|
||||
(cond
|
||||
|
||||
@@ -41,11 +41,3 @@
|
||||
:timestamp 2}]
|
||||
(testing "from-rpc"
|
||||
(is (= expected-chat (chats/<-rpc chat))))))
|
||||
|
||||
(deftest decode-chat-id-test
|
||||
(let [community-id "0x0322b9b84acb1631d6a31d41d9cf8e1938d352a624bc130de92869e025c7ca79c4"
|
||||
channel-id "02081bc7-20e4-4362-99e2-37669c28cc08"
|
||||
chat-id (str community-id channel-id)]
|
||||
(is (= {:community-id community-id
|
||||
:channel-id channel-id}
|
||||
(chats/decode-chat-id chat-id)))))
|
||||
|
||||
@@ -51,9 +51,3 @@
|
||||
(visibility-status-updates/<-rpc-settings)
|
||||
(set/rename-keys {:compressedKey :compressed-key
|
||||
:emojiHash :emoji-hash})))
|
||||
|
||||
(defn rpc->setting-value
|
||||
[{:keys [name] :as setting}]
|
||||
(condp = name
|
||||
:currency (update setting :value keyword)
|
||||
setting))
|
||||
|
||||
@@ -231,7 +231,7 @@
|
||||
[db]
|
||||
(into #{}
|
||||
(remove #(= (:type %) :watch)
|
||||
(map #(eip55/address->checksum (:address %)) (vals (get-in db [:wallet :accounts]))))))
|
||||
(map #(eip55/address->checksum (:address %)) (get db :profile/wallet-accounts)))))
|
||||
|
||||
;;NOTE we want to handle only last resolve
|
||||
(def resolve-last-id (atom nil))
|
||||
|
||||
@@ -79,15 +79,10 @@
|
||||
"recent-history-ready" (recent-history-fetching-ended cofx event)
|
||||
"fetching-history-error" (fetching-error cofx event)
|
||||
"non-archival-node-detected" (non-archival-node-detected cofx event)
|
||||
"pending-transaction-status-changed" {:fx
|
||||
[[:dispatch
|
||||
[:wallet/pending-transaction-status-changed-received
|
||||
event]]]}
|
||||
"wallet-owned-collectibles-filtering-done" {:fx [[:dispatch
|
||||
[:wallet/owned-collectibles-filtering-done
|
||||
event]]]}
|
||||
"wallet-get-collectibles-details-done" {:fx [[:dispatch
|
||||
[:wallet/get-collectible-details-done
|
||||
event]]]}
|
||||
"wallet-tick-reload" {:fx [[:dispatch [:wallet/reload]]]}
|
||||
(log/debug ::unknown-wallet-event :type type :event event)))
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
[react-native.permissions :as permissions]
|
||||
[react-native.platform :as platform]
|
||||
[status-im.common.biometric.events :as biometric]
|
||||
status-im.common.serialization
|
||||
status-im.common.standard-authentication.events
|
||||
[status-im.common.theme.core :as theme]
|
||||
[status-im.common.universal-links :as universal-links]
|
||||
|
||||
@@ -51,9 +51,9 @@
|
||||
|
||||
(rf/defn remove-members
|
||||
{:events [:group-chats.ui/remove-members-pressed]}
|
||||
[{{:group-chat/keys [deselected-members]} :db :as cofx} chat-id]
|
||||
[{{:keys [current-chat-id] :group-chat/keys [deselected-members]} :db :as cofx}]
|
||||
{:json-rpc/call [{:method "wakuext_removeMembersFromGroupChat"
|
||||
:params [nil chat-id deselected-members]
|
||||
:params [nil current-chat-id deselected-members]
|
||||
:js-response true
|
||||
:on-success #(re-frame/dispatch [:chat-updated % true])
|
||||
:on-error #()}]})
|
||||
@@ -97,19 +97,19 @@
|
||||
(rf/defn add-members
|
||||
"Add members to a group chat"
|
||||
{:events [:group-chats.ui/add-members-pressed]}
|
||||
[{{:group-chat/keys [selected-participants]} :db :as cofx} chat-id]
|
||||
[{{:keys [current-chat-id] :group-chat/keys [selected-participants]} :db :as cofx}]
|
||||
{:json-rpc/call [{:method "wakuext_addMembersToGroupChat"
|
||||
:params [nil chat-id selected-participants]
|
||||
:params [nil current-chat-id selected-participants]
|
||||
:js-response true
|
||||
:on-success #(re-frame/dispatch [:chat-updated % true])}]})
|
||||
|
||||
(rf/defn add-members-from-invitation
|
||||
"Add members to a group chat"
|
||||
{:events [:group-chats.ui/add-members-from-invitation]}
|
||||
[{:keys [db]} id participant chat-id]
|
||||
[{{:keys [current-chat-id] :as db} :db :as cofx} id participant]
|
||||
{:db (assoc-in db [:group-chat/invitations id :state] constants/invitation-state-approved)
|
||||
:json-rpc/call [{:method "wakuext_addMembersToGroupChat"
|
||||
:params [nil chat-id [participant]]
|
||||
:params [nil current-chat-id [participant]]
|
||||
:js-response true
|
||||
:on-success #(re-frame/dispatch [:chat-updated %])}]})
|
||||
|
||||
@@ -150,23 +150,23 @@
|
||||
|
||||
(rf/defn membership-retry
|
||||
{:events [:group-chats.ui/membership-retry]}
|
||||
[{:keys [db]} chat-id]
|
||||
{:db (assoc-in db [:chat/memberships chat-id :retry?] true)})
|
||||
[{{:keys [current-chat-id] :as db} :db}]
|
||||
{:db (assoc-in db [:chat/memberships current-chat-id :retry?] true)})
|
||||
|
||||
(rf/defn membership-message
|
||||
{:events [:group-chats.ui/update-membership-message]}
|
||||
[{:keys [db]} message chat-id]
|
||||
{:db (assoc-in db [:chat/memberships chat-id :message] message)})
|
||||
[{{:keys [current-chat-id] :as db} :db} message]
|
||||
{:db (assoc-in db [:chat/memberships current-chat-id :message] message)})
|
||||
|
||||
(rf/defn send-group-chat-membership-request
|
||||
"Send group chat membership request"
|
||||
{:events [:send-group-chat-membership-request]}
|
||||
[{{:keys [chats] :as db} :db :as cofx} chat-id]
|
||||
(let [{:keys [invitation-admin]} (get chats chat-id)
|
||||
message (get-in db [:chat/memberships chat-id :message])]
|
||||
{:db (assoc-in db [:chat/memberships chat-id] nil)
|
||||
[{{:keys [current-chat-id chats] :as db} :db :as cofx}]
|
||||
(let [{:keys [invitation-admin]} (get chats current-chat-id)
|
||||
message (get-in db [:chat/memberships current-chat-id :message])]
|
||||
{:db (assoc-in db [:chat/memberships current-chat-id] nil)
|
||||
:json-rpc/call [{:method "wakuext_sendGroupChatInvitationRequest"
|
||||
:params [nil chat-id invitation-admin message]
|
||||
:params [nil current-chat-id invitation-admin message]
|
||||
:js-response true
|
||||
:on-success #(re-frame/dispatch [:sanitize-messages-and-process-response %])}]}))
|
||||
|
||||
@@ -242,6 +242,15 @@
|
||||
[{db :db}]
|
||||
{:db (assoc db :group-chat/deselected-members #{})})
|
||||
|
||||
(rf/defn show-group-chat-profile
|
||||
{:events [:show-group-chat-profile]}
|
||||
[{:keys [db] :as cofx} chat-id]
|
||||
(rf/merge cofx
|
||||
{:db (-> db
|
||||
(assoc :new-chat-name (get-in db [:chats chat-id :name]))
|
||||
(assoc :current-chat-id chat-id))}
|
||||
(navigation/navigate-to :group-chat-profile nil)))
|
||||
|
||||
(rf/defn ui-leave-chat-pressed
|
||||
{:events [:group-chats.ui/leave-chat-pressed]}
|
||||
[{:keys [db]} chat-id]
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
(def message-max-length 100)
|
||||
|
||||
(defn request-membership
|
||||
[{:keys [state introduction-message] :as invitation} chat-id]
|
||||
[{:keys [state introduction-message] :as invitation}]
|
||||
(let [{:keys [message retry?]} @(re-frame/subscribe [:chats/current-chat-membership])
|
||||
message-length (count message)]
|
||||
[react/view {:margin-horizontal 16 :margin-top 10}
|
||||
@@ -47,7 +47,7 @@
|
||||
[react/text (i18n/label :t/introduce-yourself)]
|
||||
[quo/text-input
|
||||
{:placeholder (i18n/label :t/message)
|
||||
:on-change-text #(re-frame/dispatch [:group-chats.ui/update-membership-message % chat-id])
|
||||
:on-change-text #(re-frame/dispatch [:group-chats.ui/update-membership-message %])
|
||||
:max-length (if platform/android?
|
||||
message-max-length
|
||||
(when (>= message-length message-max-length)
|
||||
@@ -63,4 +63,4 @@
|
||||
[chat-id invitation-admin]
|
||||
(letsubs [invitations [:group-chat/invitations-by-chat-id chat-id]]
|
||||
(when invitation-admin
|
||||
[request-membership (first invitations) chat-id])))
|
||||
[request-membership (first invitations)])))
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
[rn/touchable-opacity
|
||||
{:on-press #(do
|
||||
(rf/dispatch [:pop-to-root :shell-stack])
|
||||
(rf/dispatch [:communities/navigate-to-community-overview (:id community)])
|
||||
(rf/dispatch [:navigate-to :community-overview (:id community)])
|
||||
(rf/dispatch [:chat/close]))}
|
||||
[rn/text
|
||||
{:style {:text-align :center
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
[legacy.status-im.ui.components.typography :as typography]
|
||||
[legacy.status-im.utils.utils :as utils]
|
||||
[re-frame.core :as re-frame]
|
||||
[react-native.core :as rn]
|
||||
[reagent.core :as reagent]
|
||||
[status-im.common.json-rpc.events :as json-rpc]
|
||||
[taoensso.timbre :as log]
|
||||
@@ -85,28 +86,29 @@
|
||||
|
||||
(defn stats-table
|
||||
[{:keys [total filtered-total stats]}]
|
||||
[react/scroll-view
|
||||
{:style {:padding-horizontal 8}}
|
||||
[react/view
|
||||
[react/view
|
||||
{:style {:flex-direction :row
|
||||
:justify-content :space-between
|
||||
:margin-bottom 2}}
|
||||
[legacy.status-im.ui.components.core/text {:style typography/font-semi-bold}
|
||||
(i18n/label :t/rpc-usage-total)]
|
||||
[legacy.status-im.ui.components.core/text {:style typography/font-semi-bold}
|
||||
(i18n/label :t/rpc-usage-filtered-total {:filtered-total filtered-total :total total})]]
|
||||
[react/view
|
||||
{:style {:flex-direction :column
|
||||
:flex 1}}
|
||||
(when (seq stats)
|
||||
(for [[k v] stats]
|
||||
^{:key (str k v)}
|
||||
[react/view
|
||||
{:style {:flex-direction :row
|
||||
:align-items :stretch}}
|
||||
[legacy.status-im.ui.components.core/text {:style {:flex 7}} k]
|
||||
[legacy.status-im.ui.components.core/text {:style {:flex 1}} v]]))]]])
|
||||
rn/scroll-view
|
||||
{:style {:padding-horizontal 8}}
|
||||
rn/view
|
||||
{:style {:flex-direction :row
|
||||
:justify-content :space-between
|
||||
:margin-bottom 2}}
|
||||
[legacy.status-im.ui.components.core/text {:style typography/font-semi-bold}
|
||||
(i18n/label :t/rpc-usage-total)]
|
||||
[legacy.status-im.ui.components.core/text {:style typography/font-semi-bold}
|
||||
(i18n/label :t/rpc-usage-filtered-total {:filtered-total filtered-total :total total})]
|
||||
(when (seq stats)
|
||||
(for [[k v] stats]
|
||||
^{:key (str k v)}
|
||||
[:<>
|
||||
rn/view
|
||||
{:style {:flex-direction :row
|
||||
:align-items :center
|
||||
:margin-vertical 10}}
|
||||
[legacy.status-im.ui.components.core/text {:style {:flex 1}}
|
||||
k]
|
||||
[legacy.status-im.ui.components.core/text {:style {:margin-left 16}}
|
||||
v]
|
||||
[legacy.status-im.ui.components.core/separator]])))
|
||||
|
||||
(defn prepare-stats
|
||||
[{:keys [stats]}]
|
||||
@@ -123,32 +125,30 @@
|
||||
[react/view
|
||||
{:flex 1
|
||||
:margin-horizontal 8}
|
||||
[react/view
|
||||
{:style {:flex-direction :column
|
||||
:justify-content :space-between}}
|
||||
[react/view
|
||||
{:style {:flex-direction :row
|
||||
:justify-content :space-between}}
|
||||
[legacy.status-im.ui.components.core/button
|
||||
{:on-press #(re-frame/dispatch [::reset])
|
||||
:accessibility-label :rpc-usage-reset}
|
||||
(i18n/label :t/rpc-usage-reset)]
|
||||
[legacy.status-im.ui.components.core/button
|
||||
{:on-press
|
||||
#(react/copy-to-clipboard (prepare-stats stats))
|
||||
:accessibility-label :rpc-usage-copy}
|
||||
(i18n/label :t/rpc-usage-copy)]]
|
||||
[legacy.status-im.ui.components.core/text-input
|
||||
{:on-change-text #(re-frame/dispatch [::set-filter %])
|
||||
:label (i18n/label :t/rpc-usage-filter-methods)
|
||||
:placeholder (i18n/label :t/rpc-usage-filter)
|
||||
:container-style {:margin-vertical 18}
|
||||
:before {:icon :main-icons/search
|
||||
:style {:padding-horizontal 8}}
|
||||
:default-value methods-filter
|
||||
:auto-capitalize :none
|
||||
:show-cancel false
|
||||
:auto-focus false}]]
|
||||
rn/view
|
||||
{:style {:flex-direction :row
|
||||
:margin-vertical 8
|
||||
:justify-content :space-between}}
|
||||
[legacy.status-im.ui.components.core/button
|
||||
{:on-press #(re-frame/dispatch [::reset])
|
||||
:accessibility-label :rpc-usage-reset}
|
||||
(i18n/label :t/rpc-usage-reset)]
|
||||
[legacy.status-im.ui.components.core/button
|
||||
{:on-press
|
||||
#(react/copy-to-clipboard (prepare-stats stats))
|
||||
:accessibility-label :rpc-usage-copy}
|
||||
(i18n/label :t/rpc-usage-copy)]
|
||||
[legacy.status-im.ui.components.core/text-input
|
||||
{:on-change-text #(re-frame/dispatch [::set-filter %])
|
||||
:label (i18n/label :t/rpc-usage-filter-methods)
|
||||
:placeholder (i18n/label :t/rpc-usage-filter)
|
||||
:container-style {:margin-vertical 18}
|
||||
:before {:icon :main-icons/search
|
||||
:style {:padding-horizontal 8}}
|
||||
:default-value methods-filter
|
||||
:auto-capitalize :none
|
||||
:show-cancel false
|
||||
:auto-focus false}]
|
||||
[stats-table stats]]))
|
||||
|
||||
(defn usage-info
|
||||
|
||||
@@ -31,81 +31,104 @@
|
||||
(.pollSignal native-status signal-received-callback)
|
||||
100))))
|
||||
|
||||
(def ui-helper
|
||||
(def status
|
||||
(clj->js
|
||||
{:clearCookies identity
|
||||
:clearStorageAPIs identity}))
|
||||
{:openAccounts
|
||||
(fn [callback]
|
||||
(callback (.openAccounts native-status test-dir)))
|
||||
|
||||
:multiAccountStoreDerived
|
||||
(fn [json callback]
|
||||
(callback (.multiAccountStoreDerivedAccounts native-status json)))
|
||||
|
||||
:getNodeConfig (fn [] (types/clj->json {:WakuV2Config ""}))
|
||||
|
||||
:backupDisabledDataDir (fn [] (str test-dir "/backup"))
|
||||
:keystoreDir (fn [] "")
|
||||
:logFileDirectory (fn [] (str test-dir "/log"))
|
||||
:clearCookies identity
|
||||
:clearStorageAPIs identity
|
||||
:setBlankPreviewFlag identity
|
||||
|
||||
:callPrivateRPC
|
||||
(fn [payload callback]
|
||||
(callback (.callPrivateRPC native-status payload)))
|
||||
|
||||
:createAccountAndLogin (fn [request] (.createAccountAndLogin native-status request))
|
||||
|
||||
:saveAccountAndLogin
|
||||
(fn [multiaccount-data password settings config accounts-data]
|
||||
(.saveAccountAndLogin native-status multiaccount-data password settings config accounts-data))
|
||||
|
||||
:logout
|
||||
(fn [] (.logout native-status))
|
||||
|
||||
:multiAccountGenerateAndDeriveAddresses
|
||||
(fn [json callback]
|
||||
(callback (.multiAccountGenerateAndDeriveAddresses native-status json)))
|
||||
|
||||
:multiAccountImportMnemonic
|
||||
(fn [json callback]
|
||||
(callback (.multiAccountImportMnemonic native-status json)))
|
||||
|
||||
:multiAccountLoadAccount
|
||||
(fn [json callback]
|
||||
(callback (.multiAccountLoadAccount native-status json)))
|
||||
|
||||
:multiAccountDeriveAddresses
|
||||
(fn [json callback]
|
||||
(callback (.multiAccountDeriveAddresses native-status json)))
|
||||
|
||||
(def encryption-utils
|
||||
(clj->js
|
||||
{:sha3
|
||||
(fn [s] (.sha3 native-status s))
|
||||
:setBlankPreviewFlag
|
||||
identity
|
||||
:encodeTransfer
|
||||
(fn [to-norm amount-hex]
|
||||
(.encodeTransfer native-status to-norm amount-hex))
|
||||
:hexToNumber
|
||||
(fn [hex] (.hexToNumber native-status hex))
|
||||
:decodeParameters
|
||||
(fn [decode-param-json]
|
||||
(.decodeParameters native-status decode-param-json))
|
||||
:numberToHex
|
||||
(fn [num-str] (.numberToHex native-status num-str))
|
||||
:initKeystore
|
||||
(fn [key-uid callback]
|
||||
(callback (.initKeystore native-status
|
||||
(str test-dir "/keystore/" key-uid))))
|
||||
:multiformatDeserializePublicKey
|
||||
(fn [public-key deserialization-key callback]
|
||||
(callback (.multiformatDeserializePublicKey
|
||||
native-status
|
||||
public-key
|
||||
deserialization-key)))}))
|
||||
deserialization-key)))
|
||||
|
||||
(def account-manager
|
||||
(clj->js
|
||||
{:openAccounts
|
||||
(fn [callback]
|
||||
(callback (.openAccounts native-status test-dir)))
|
||||
:createAccountAndLogin
|
||||
(fn [request] (.createAccountAndLogin native-status request))
|
||||
:logout
|
||||
(fn [] (.logout native-status))
|
||||
:multiAccountImportMnemonic
|
||||
(fn [json callback]
|
||||
(callback (.multiAccountImportMnemonic native-status json)))
|
||||
:multiAccountLoadAccount
|
||||
(fn [json callback]
|
||||
(callback (.multiAccountLoadAccount native-status json)))
|
||||
:multiAccountDeriveAddresses
|
||||
(fn [json callback]
|
||||
(callback (.multiAccountDeriveAddresses native-status json)))
|
||||
:multiAccountGenerateAndDeriveAddresses
|
||||
(fn [json callback]
|
||||
(callback (.multiAccountGenerateAndDeriveAddresses native-status json)))
|
||||
:multiAccountStoreDerived
|
||||
(fn [json callback]
|
||||
(callback (.multiAccountStoreDerivedAccounts native-status json)))}))
|
||||
:initKeystore
|
||||
(fn [key-uid callback]
|
||||
(callback (.initKeystore native-status
|
||||
(str test-dir "/keystore/" key-uid))))
|
||||
|
||||
:encodeTransfer
|
||||
(fn [to-norm amount-hex]
|
||||
(.encodeTransfer native-status to-norm amount-hex))
|
||||
|
||||
:encodeFunctionCall
|
||||
(fn [method params-json]
|
||||
(.encodeFunctionCall native-status method params-json))
|
||||
|
||||
:decodeParameters
|
||||
(fn [decode-param-json]
|
||||
(.decodeParameters native-status decode-param-json))
|
||||
|
||||
:hexToNumber
|
||||
(fn [hex] (.hexToNumber native-status hex))
|
||||
|
||||
:numberToHex
|
||||
(fn [num-str] (.numberToHex native-status num-str))
|
||||
|
||||
(def utils
|
||||
(clj->js
|
||||
{:backupDisabledDataDir
|
||||
(fn [] (str test-dir "/backup"))
|
||||
:keystoreDir (fn [] "")
|
||||
:toChecksumAddress
|
||||
(fn [address] (.toChecksumAddress native-status address))
|
||||
:checkAddressChecksum
|
||||
(fn [address] (.checkAddressChecksum native-status address))
|
||||
|
||||
:sha3
|
||||
(fn [s] (.sha3 native-status s))
|
||||
|
||||
:toChecksumAddress
|
||||
(fn [address] (.toChecksumAddress native-status address))
|
||||
|
||||
:isAddress
|
||||
(fn [address] (.isAddress native-status address))
|
||||
|
||||
:fleets
|
||||
(fn [] (.fleets native-status))
|
||||
|
||||
:validateMnemonic
|
||||
(fn [json callback] (callback (.validateMnemonic native-status json)))
|
||||
:isAddress
|
||||
(fn [address] (.isAddress native-status address))}))
|
||||
|
||||
(def log-manager
|
||||
(clj->js
|
||||
{:logFileDirectory
|
||||
(fn [] (str test-dir "/log"))
|
||||
:startLocalNotifications identity
|
||||
|
||||
:initLogging
|
||||
(fn [enabled mobile-system log-level callback]
|
||||
(callback (.initLogging native-status
|
||||
@@ -113,18 +136,3 @@
|
||||
:MobileSystem mobile-system
|
||||
:Level log-level
|
||||
:File (str test-dir "/geth.log")}))))}))
|
||||
|
||||
(def network
|
||||
(clj->js
|
||||
{:callPrivateRPC
|
||||
(fn [payload callback]
|
||||
(callback (.callPrivateRPC native-status payload)))}))
|
||||
|
||||
(def status
|
||||
(clj->js
|
||||
{:getNodeConfig
|
||||
(fn [] (types/clj->json {:WakuV2Config ""}))
|
||||
:fleets
|
||||
(fn [] (.fleets native-status))
|
||||
:startLocalNotifications
|
||||
identity}))
|
||||
|
||||
@@ -38,12 +38,6 @@
|
||||
{:NativeModules {:RNGestureHandlerModule {:Direction (fn [])}
|
||||
:PushNotifications {}
|
||||
:Status utils.test/status
|
||||
:EncryptionUtils utils.test/encryption-utils
|
||||
:AccountManager utils.test/account-manager
|
||||
:Utils utils.test/utils
|
||||
:LogManager utils.test/log-manager
|
||||
:NetworkManager utils.test/network
|
||||
:UIHelper utils.test/ui-helper
|
||||
:ReanimatedModule {:configureProps (fn [])}}
|
||||
|
||||
:View {}
|
||||
@@ -377,88 +371,81 @@
|
||||
(defn mock
|
||||
[module]
|
||||
(case module
|
||||
"react-native-languages" react-native-languages
|
||||
"react-native-background-timer" background-timer
|
||||
"react-native-image-crop-picker" image-crop-picker
|
||||
"react-native-gesture-handler" react-native-gesture-handler
|
||||
"react-native-static-safe-area-insets" react-native-static-safe-area-insets
|
||||
"react-native-config" config
|
||||
"react-native-iphone-x-helper" (clj->js {:getStatusBarHeight (fn [])
|
||||
:getBottomSpace (fn [])})
|
||||
"react-native-screens" (clj->js {})
|
||||
"react-native-reanimated" react-native-reanimated
|
||||
"react-native-redash" react-native-redash
|
||||
"react-native-fetch-polyfill" fetch
|
||||
"react-native-status-keycard" status-keycard
|
||||
"react-native-keychain" keychain
|
||||
"react-native-touch-id" touchid
|
||||
"@react-native-community/netinfo" net-info
|
||||
"react-native-dialogs" dialogs
|
||||
"react-native" react-native
|
||||
"react-native-fs" fs
|
||||
"react-native-mail" react-native-mail
|
||||
"react-native-image-resizer" image-resizer
|
||||
"react-native-haptic-feedback" react-native-haptic-feedback
|
||||
"react-native-device-info" react-native-device-info
|
||||
"react-native-push-notification" react-native-push-notification
|
||||
"react-native-linear-gradient" react-native-gradien
|
||||
"@react-native-community/masked-view" masked-view
|
||||
"react-native-blob-util" react-native-blob-util
|
||||
"react-native-navigation" react-native-navigation
|
||||
"@react-native-community/push-notification-ios" push-notification-ios
|
||||
"@react-native-community/blur" react-native-blur
|
||||
"@react-native-camera-roll/camera-roll" react-native-camera-roll
|
||||
"react-native-camera-kit" react-native-camera-kit
|
||||
"react-native-permissions" react-native-permissions
|
||||
"rn-emoji-keyboard" rn-emoji-keyboard
|
||||
"react-native-hole-view" react-native-hole-view
|
||||
"react-native-draggable-flatlist" react-native-draggable-flatlist
|
||||
"react-native-webview" react-native-webview
|
||||
"@react-native-community/audio-toolkit" react-native-audio-toolkit
|
||||
"react-native-image-viewing" react-native-image-viewing
|
||||
"react-native-share" react-native-share
|
||||
"@react-native-async-storage/async-storage" async-storage
|
||||
"react-native-svg" react-native-svg
|
||||
"react-native-transparent-video" react-native-transparent-video
|
||||
"react-native-orientation-locker" react-native-orientation-locker
|
||||
"react-native-gifted-charts" react-native-gifted-charts
|
||||
"../resources/data/emojis/en.json" (js/JSON.parse
|
||||
(slurp
|
||||
"./resources/data/emojis/en.json"))
|
||||
"../src/js/worklets/core.js" worklet-factory
|
||||
"../src/js/worklets/shell/bottom_tabs.js" #js {}
|
||||
"../src/js/worklets/shell/home_stack.js" #js {}
|
||||
"../src/js/worklets/shell/floating_screen.js" #js {}
|
||||
"../src/js/worklets/bottom_sheet.js" #js {}
|
||||
"../src/js/worklets/record_audio.js" #js {}
|
||||
"../src/js/worklets/scroll_view.js" #js {}
|
||||
"../src/js/worklets/onboarding_carousel.js" #js {}
|
||||
"../src/js/worklets/chat/messenger/lightbox.js" #js {}
|
||||
"../src/js/worklets/chat/messenger/messages.js" #js {}
|
||||
"../src/js/worklets/chat/messenger/navigation.js" #js {}
|
||||
"../src/js/worklets/chat/messenger/composer.js" #js {}
|
||||
"../src/js/worklets/chat/messenger/placeholder.js" #js {}
|
||||
"../src/js/worklets/parallax.js" #js {}
|
||||
"../src/js/worklets/identifiers_highlighting.js" #js {}
|
||||
"./fleets.js" default-fleets
|
||||
"../translations/ar.json" (js/JSON.parse (slurp "./translations/ar.json"))
|
||||
"../translations/de.json" (js/JSON.parse (slurp "./translations/de.json"))
|
||||
"../translations/en.json" (js/JSON.parse (slurp "./translations/en.json"))
|
||||
"../translations/es.json" (js/JSON.parse (slurp "./translations/es.json"))
|
||||
"../translations/es_419.json" (js/JSON.parse (slurp
|
||||
"./translations/es_419.json"))
|
||||
"../translations/fil.json" (js/JSON.parse (slurp "./translations/fil.json"))
|
||||
"../translations/fr.json" (js/JSON.parse (slurp "./translations/fr.json"))
|
||||
"../translations/id.json" (js/JSON.parse (slurp "./translations/id.json"))
|
||||
"../translations/it.json" (js/JSON.parse (slurp "./translations/it.json"))
|
||||
"../translations/ko.json" (js/JSON.parse (slurp "./translations/ko.json"))
|
||||
"../translations/pt_BR.json" (js/JSON.parse (slurp
|
||||
"./translations/pt_BR.json"))
|
||||
"../translations/ru.json" (js/JSON.parse (slurp "./translations/ru.json"))
|
||||
"../translations/tr.json" (js/JSON.parse (slurp "./translations/tr.json"))
|
||||
"../translations/zh.json" (js/JSON.parse (slurp "./translations/zh.json"))
|
||||
"../translations/zh_hant.json" (js/JSON.parse (slurp
|
||||
"./translations/zh_hant.json"))
|
||||
"../translations/zh_TW.json" (js/JSON.parse (slurp
|
||||
"./translations/zh_TW.json"))
|
||||
"react-native-languages" react-native-languages
|
||||
"react-native-background-timer" background-timer
|
||||
"react-native-image-crop-picker" image-crop-picker
|
||||
"react-native-gesture-handler" react-native-gesture-handler
|
||||
"react-native-static-safe-area-insets" react-native-static-safe-area-insets
|
||||
"react-native-config" config
|
||||
"react-native-iphone-x-helper" (clj->js {:getStatusBarHeight (fn [])
|
||||
:getBottomSpace (fn [])})
|
||||
"react-native-screens" (clj->js {})
|
||||
"react-native-reanimated" react-native-reanimated
|
||||
"react-native-redash" react-native-redash
|
||||
"react-native-fetch-polyfill" fetch
|
||||
"react-native-status-keycard" status-keycard
|
||||
"react-native-keychain" keychain
|
||||
"react-native-touch-id" touchid
|
||||
"@react-native-community/netinfo" net-info
|
||||
"react-native-dialogs" dialogs
|
||||
"react-native" react-native
|
||||
"react-native-fs" fs
|
||||
"react-native-mail" react-native-mail
|
||||
"react-native-image-resizer" image-resizer
|
||||
"react-native-haptic-feedback" react-native-haptic-feedback
|
||||
"react-native-device-info" react-native-device-info
|
||||
"react-native-push-notification" react-native-push-notification
|
||||
"react-native-linear-gradient" react-native-gradien
|
||||
"@react-native-community/masked-view" masked-view
|
||||
"react-native-blob-util" react-native-blob-util
|
||||
"react-native-navigation" react-native-navigation
|
||||
"@react-native-community/push-notification-ios" push-notification-ios
|
||||
"@react-native-community/blur" react-native-blur
|
||||
"@react-native-camera-roll/camera-roll" react-native-camera-roll
|
||||
"react-native-camera-kit" react-native-camera-kit
|
||||
"react-native-permissions" react-native-permissions
|
||||
"rn-emoji-keyboard" rn-emoji-keyboard
|
||||
"react-native-hole-view" react-native-hole-view
|
||||
"react-native-draggable-flatlist" react-native-draggable-flatlist
|
||||
"react-native-webview" react-native-webview
|
||||
"@react-native-community/audio-toolkit" react-native-audio-toolkit
|
||||
"react-native-image-viewing" react-native-image-viewing
|
||||
"react-native-share" react-native-share
|
||||
"@react-native-async-storage/async-storage" async-storage
|
||||
"react-native-svg" react-native-svg
|
||||
"react-native-transparent-video" react-native-transparent-video
|
||||
"react-native-orientation-locker" react-native-orientation-locker
|
||||
"react-native-gifted-charts" react-native-gifted-charts
|
||||
"../resources/data/emojis/en.json" (js/JSON.parse (slurp
|
||||
"./resources/data/emojis/en.json"))
|
||||
"../src/js/worklets/core.js" worklet-factory
|
||||
"../src/js/worklets/shell/bottom_tabs.js" #js {}
|
||||
"../src/js/worklets/shell/home_stack.js" #js {}
|
||||
"../src/js/worklets/shell/floating_screen.js" #js {}
|
||||
"../src/js/worklets/bottom_sheet.js" #js {}
|
||||
"../src/js/worklets/record_audio.js" #js {}
|
||||
"../src/js/worklets/scroll_view.js" #js {}
|
||||
"../src/js/worklets/onboarding_carousel.js" #js {}
|
||||
"../src/js/worklets/chat/lightbox.js" #js {}
|
||||
"../src/js/worklets/chat/messages.js" #js {}
|
||||
"../src/js/worklets/parallax.js" #js {}
|
||||
"../src/js/worklets/identifiers_highlighting.js" #js {}
|
||||
"./fleets.js" default-fleets
|
||||
"../translations/ar.json" (js/JSON.parse (slurp "./translations/ar.json"))
|
||||
"../translations/de.json" (js/JSON.parse (slurp "./translations/de.json"))
|
||||
"../translations/en.json" (js/JSON.parse (slurp "./translations/en.json"))
|
||||
"../translations/es.json" (js/JSON.parse (slurp "./translations/es.json"))
|
||||
"../translations/es_419.json" (js/JSON.parse (slurp "./translations/es_419.json"))
|
||||
"../translations/fil.json" (js/JSON.parse (slurp "./translations/fil.json"))
|
||||
"../translations/fr.json" (js/JSON.parse (slurp "./translations/fr.json"))
|
||||
"../translations/id.json" (js/JSON.parse (slurp "./translations/id.json"))
|
||||
"../translations/it.json" (js/JSON.parse (slurp "./translations/it.json"))
|
||||
"../translations/ko.json" (js/JSON.parse (slurp "./translations/ko.json"))
|
||||
"../translations/pt_BR.json" (js/JSON.parse (slurp "./translations/pt_BR.json"))
|
||||
"../translations/ru.json" (js/JSON.parse (slurp "./translations/ru.json"))
|
||||
"../translations/tr.json" (js/JSON.parse (slurp "./translations/tr.json"))
|
||||
"../translations/zh.json" (js/JSON.parse (slurp "./translations/zh.json"))
|
||||
"../translations/zh_hant.json" (js/JSON.parse (slurp
|
||||
"./translations/zh_hant.json"))
|
||||
"../translations/zh_TW.json" (js/JSON.parse (slurp "./translations/zh_TW.json"))
|
||||
nil))
|
||||
|
||||
+66
-105
@@ -11,41 +11,6 @@
|
||||
(when (exists? (.-NativeModules react-native))
|
||||
(.-Status ^js (.-NativeModules react-native))))
|
||||
|
||||
(defn account-manager
|
||||
[]
|
||||
(when (exists? (.-NativeModules react-native))
|
||||
(.-AccountManager ^js (.-NativeModules react-native))))
|
||||
|
||||
(defn encryption
|
||||
[]
|
||||
(when (exists? (.-NativeModules react-native))
|
||||
(.-EncryptionUtils ^js (.-NativeModules react-native))))
|
||||
|
||||
(defn database
|
||||
[]
|
||||
(when (exists? (.-NativeModules react-native))
|
||||
(.-DatabaseManager ^js (.-NativeModules react-native))))
|
||||
|
||||
(defn ui-helper
|
||||
[]
|
||||
(when (exists? (.-NativeModules react-native))
|
||||
(.-UIHelper ^js (.-NativeModules react-native))))
|
||||
|
||||
(defn log-manager
|
||||
[]
|
||||
(when (exists? (.-NativeModules react-native))
|
||||
(.-LogManager ^js (.-NativeModules react-native))))
|
||||
|
||||
(defn utils
|
||||
[]
|
||||
(when (exists? (.-NativeModules react-native))
|
||||
(.-Utils ^js (.-NativeModules react-native))))
|
||||
|
||||
(defn network
|
||||
[]
|
||||
(when (exists? (.-NativeModules react-native))
|
||||
(.-NetworkManager ^js (.-NativeModules react-native))))
|
||||
|
||||
(defn init
|
||||
[handler]
|
||||
(.addListener ^js (.-DeviceEventEmitter ^js react-native) "gethEvent" #(handler (.-jsonEvent ^js %))))
|
||||
@@ -53,24 +18,24 @@
|
||||
(defn clear-web-data
|
||||
[]
|
||||
(log/debug "[native-module] clear-web-data")
|
||||
(when (ui-helper)
|
||||
(.clearCookies ^js (ui-helper))
|
||||
(.clearStorageAPIs ^js (ui-helper))))
|
||||
(when (status)
|
||||
(.clearCookies ^js (status))
|
||||
(.clearStorageAPIs ^js (status))))
|
||||
|
||||
(defn init-keystore
|
||||
[key-uid callback]
|
||||
(log/debug "[native-module] init-keystore" key-uid)
|
||||
(.initKeystore ^js (encryption) key-uid callback))
|
||||
(.initKeystore ^js (status) key-uid callback))
|
||||
|
||||
(defn open-accounts
|
||||
[callback]
|
||||
(log/debug "[native-module] open-accounts")
|
||||
(.openAccounts ^js (account-manager) #(callback (types/json->clj %))))
|
||||
(.openAccounts ^js (status) #(callback (types/json->clj %))))
|
||||
|
||||
(defn prepare-dir-and-update-config
|
||||
[key-uid config callback]
|
||||
(log/debug "[native-module] prepare-dir-and-update-config")
|
||||
(.prepareDirAndUpdateConfig ^js (account-manager)
|
||||
(.prepareDirAndUpdateConfig ^js (status)
|
||||
key-uid
|
||||
config
|
||||
#(callback (types/json->clj %))))
|
||||
@@ -82,7 +47,7 @@
|
||||
(init-keystore
|
||||
key-uid
|
||||
#(.saveAccountAndLoginWithKeycard
|
||||
^js (account-manager)
|
||||
^js (status)
|
||||
multiaccount-data
|
||||
password
|
||||
settings
|
||||
@@ -98,24 +63,24 @@
|
||||
(let [config (if config (types/clj->json config) "")]
|
||||
(init-keystore
|
||||
key-uid
|
||||
#(.loginWithConfig ^js (account-manager) account-data hashed-password config))))
|
||||
#(.loginWithConfig ^js (status) account-data hashed-password config))))
|
||||
|
||||
(defn login-account
|
||||
"NOTE: beware, the password has to be sha3 hashed"
|
||||
[{:keys [keyUid] :as request}]
|
||||
(log/debug "[native-module] loginAccount")
|
||||
(log/debug "[native-module] loginWithConfig")
|
||||
(clear-web-data)
|
||||
(init-keystore
|
||||
keyUid
|
||||
#(.loginAccount ^js (account-manager) (types/clj->json request))))
|
||||
#(.loginAccount ^js (status) (types/clj->json request))))
|
||||
|
||||
(defn create-account-and-login
|
||||
[request]
|
||||
(.createAccountAndLogin ^js (account-manager) (types/clj->json request)))
|
||||
(.createAccountAndLogin ^js (status) (types/clj->json request)))
|
||||
|
||||
(defn restore-account-and-login
|
||||
[request]
|
||||
(.restoreAccountAndLogin ^js (account-manager) (types/clj->json request)))
|
||||
(.restoreAccountAndLogin ^js (status) (types/clj->json request)))
|
||||
|
||||
(defn export-db
|
||||
"NOTE: beware, the password has to be sha3 hashed"
|
||||
@@ -124,7 +89,7 @@
|
||||
(clear-web-data)
|
||||
(init-keystore
|
||||
key-uid
|
||||
#(.exportUnencryptedDatabase ^js (database) account-data hashed-password callback)))
|
||||
#(.exportUnencryptedDatabase ^js (status) account-data hashed-password callback)))
|
||||
|
||||
(defn import-db
|
||||
"NOTE: beware, the password has to be sha3 hashed"
|
||||
@@ -133,13 +98,13 @@
|
||||
(clear-web-data)
|
||||
(init-keystore
|
||||
key-uid
|
||||
#(.importUnencryptedDatabase ^js (database) account-data hashed-password)))
|
||||
#(.importUnencryptedDatabase ^js (status) account-data hashed-password)))
|
||||
|
||||
(defn logout
|
||||
[]
|
||||
(log/debug "[native-module] logout")
|
||||
(clear-web-data)
|
||||
(.logout ^js (account-manager)))
|
||||
(.logout ^js (status)))
|
||||
|
||||
(defn multiaccount-load-account
|
||||
"NOTE: beware, the password has to be sha3 hashed
|
||||
@@ -149,7 +114,7 @@
|
||||
from memory"
|
||||
[address hashed-password callback]
|
||||
(log/debug "[native-module] multiaccount-load-account")
|
||||
(.multiAccountLoadAccount ^js (account-manager)
|
||||
(.multiAccountLoadAccount ^js (status)
|
||||
(types/clj->json {:address address
|
||||
:password hashed-password})
|
||||
callback))
|
||||
@@ -162,7 +127,7 @@
|
||||
[account-id paths callback]
|
||||
(log/debug "[native-module] multiaccount-derive-addresses")
|
||||
(when (status)
|
||||
(.multiAccountDeriveAddresses ^js (account-manager)
|
||||
(.multiAccountDeriveAddresses ^js (status)
|
||||
(types/clj->json {:accountID account-id
|
||||
:paths paths})
|
||||
callback)))
|
||||
@@ -180,7 +145,7 @@
|
||||
(when (status)
|
||||
(init-keystore
|
||||
key-uid
|
||||
#(.multiAccountStoreAccount ^js (account-manager)
|
||||
#(.multiAccountStoreAccount ^js (status)
|
||||
(types/clj->json {:accountID account-id
|
||||
:password hashed-password})
|
||||
callback))))
|
||||
@@ -193,7 +158,7 @@
|
||||
account-id)
|
||||
(init-keystore
|
||||
key-uid
|
||||
#(.multiAccountStoreDerived ^js (account-manager)
|
||||
#(.multiAccountStoreDerived ^js (status)
|
||||
(types/clj->json {:accountID account-id
|
||||
:paths paths
|
||||
:password hashed-password})
|
||||
@@ -206,7 +171,7 @@
|
||||
to store the key"
|
||||
[n mnemonic-length paths callback]
|
||||
(log/debug "[native-module] multiaccount-generate-and-derive-addresses")
|
||||
(.multiAccountGenerateAndDeriveAddresses ^js (account-manager)
|
||||
(.multiAccountGenerateAndDeriveAddresses ^js (status)
|
||||
(types/clj->json {:n n
|
||||
:mnemonicPhraseLength mnemonic-length
|
||||
:bip39Passphrase ""
|
||||
@@ -216,7 +181,7 @@
|
||||
(defn multiaccount-import-mnemonic
|
||||
[mnemonic password callback]
|
||||
(log/debug "[native-module] multiaccount-import-mnemonic")
|
||||
(.multiAccountImportMnemonic ^js (account-manager)
|
||||
(.multiAccountImportMnemonic ^js (status)
|
||||
(types/clj->json {:mnemonicPhrase mnemonic
|
||||
;;NOTE this is not the multiaccount password
|
||||
:Bip39Passphrase password})
|
||||
@@ -225,7 +190,7 @@
|
||||
(defn multiaccount-import-private-key
|
||||
[private-key callback]
|
||||
(log/debug "[native-module] multiaccount-import-private-key")
|
||||
(.multiAccountImportPrivateKey ^js (account-manager)
|
||||
(.multiAccountImportPrivateKey ^js (status)
|
||||
(types/clj->json {:privateKey private-key})
|
||||
callback))
|
||||
|
||||
@@ -233,13 +198,13 @@
|
||||
"NOTE: beware, the password has to be sha3 hashed"
|
||||
[address hashed-password callback]
|
||||
(log/debug "[native-module] verify")
|
||||
(.verify ^js (account-manager) address hashed-password callback))
|
||||
(.verify ^js (status) address hashed-password callback))
|
||||
|
||||
(defn verify-database-password
|
||||
"NOTE: beware, the password has to be sha3 hashed"
|
||||
[key-uid hashed-password callback]
|
||||
(log/debug "[native-module] verify-database-password")
|
||||
(.verifyDatabasePassword ^js (account-manager) key-uid hashed-password callback))
|
||||
(.verifyDatabasePassword ^js (status) key-uid hashed-password callback))
|
||||
|
||||
(defn login-with-keycard
|
||||
[{:keys [key-uid multiaccount-data password chat-key node-config]}]
|
||||
@@ -247,51 +212,47 @@
|
||||
(clear-web-data)
|
||||
(init-keystore
|
||||
key-uid
|
||||
#(.loginWithKeycard ^js (account-manager)
|
||||
multiaccount-data
|
||||
password
|
||||
chat-key
|
||||
(types/clj->json node-config))))
|
||||
#(.loginWithKeycard ^js (status) multiaccount-data password chat-key (types/clj->json node-config))))
|
||||
|
||||
(defn set-soft-input-mode
|
||||
[mode]
|
||||
(log/debug "[native-module] set-soft-input-mode")
|
||||
(.setSoftInputMode ^js (ui-helper) mode))
|
||||
(.setSoftInputMode ^js (status) mode))
|
||||
|
||||
(defn call-rpc
|
||||
[payload callback]
|
||||
(log/debug "[native-module] call-rpc")
|
||||
(.callRPC ^js (network) payload callback))
|
||||
(.callRPC ^js (status) payload callback))
|
||||
|
||||
(defn call-private-rpc
|
||||
[payload callback]
|
||||
(.callPrivateRPC ^js (network) payload callback))
|
||||
(.callPrivateRPC ^js (status) payload callback))
|
||||
|
||||
(defn hash-transaction
|
||||
"used for keycard"
|
||||
[rpcParams callback]
|
||||
(log/debug "[native-module] hash-transaction")
|
||||
(.hashTransaction ^js (encryption) rpcParams callback))
|
||||
(.hashTransaction ^js (status) rpcParams callback))
|
||||
|
||||
(defn hash-message
|
||||
"used for keycard"
|
||||
[message callback]
|
||||
(log/debug "[native-module] hash-message")
|
||||
(.hashMessage ^js (encryption) message callback))
|
||||
(.hashMessage ^js (status) message callback))
|
||||
|
||||
(defn start-searching-for-local-pairing-peers
|
||||
"starts a UDP multicast beacon that both listens for and broadcasts to LAN peers"
|
||||
[callback]
|
||||
(log/info "[native-module] Start Searching for Local Pairing Peers"
|
||||
{:fn :start-searching-for-local-pairing-peers})
|
||||
(.startSearchForLocalPairingPeers ^js (network) callback))
|
||||
(.startSearchForLocalPairingPeers ^js (status) callback))
|
||||
|
||||
(defn local-pairing-preflight-outbound-check
|
||||
"Checks whether the device has allows connecting to the local server"
|
||||
[callback]
|
||||
(log/info "[native-module] Performing local pairing preflight check")
|
||||
(when platform/ios?
|
||||
(.localPairingPreflightOutboundCheck ^js (encryption) callback)))
|
||||
(.localPairingPreflightOutboundCheck ^js (status) callback)))
|
||||
|
||||
(defn get-connection-string-for-bootstrapping-another-device
|
||||
"Generates connection string form status-go for the purpose of local pairing on the sender end"
|
||||
@@ -299,7 +260,7 @@
|
||||
(log/info "[native-module] Fetching Connection String"
|
||||
{:fn :get-connection-string-for-bootstrapping-another-device
|
||||
:config-json config-json})
|
||||
(.getConnectionStringForBootstrappingAnotherDevice ^js (network) config-json callback))
|
||||
(.getConnectionStringForBootstrappingAnotherDevice ^js (status) config-json callback))
|
||||
|
||||
(defn input-connection-string-for-bootstrapping
|
||||
"Provides connection string to status-go for the purpose of local pairing on the receiver end"
|
||||
@@ -308,7 +269,7 @@
|
||||
{:fn :input-connection-string-for-bootstrapping
|
||||
:config-json config-json
|
||||
:connection-string connection-string})
|
||||
(.inputConnectionStringForBootstrapping ^js (network) connection-string config-json callback))
|
||||
(.inputConnectionStringForBootstrapping ^js (status) connection-string config-json callback))
|
||||
|
||||
(defn deserialize-and-compress-key
|
||||
"Provides a community id (public key) to status-go which is first deserialized
|
||||
@@ -319,7 +280,7 @@
|
||||
(log/info "[native-module] Deserializing and then compressing public key"
|
||||
{:fn :deserialize-and-compress-key
|
||||
:key input-key})
|
||||
(.deserializeAndCompressKey ^js (encryption) input-key callback))
|
||||
(.deserializeAndCompressKey ^js (status) input-key callback))
|
||||
|
||||
(defn compressed-key->public-key
|
||||
"Provides compressed key to status-go and gets back the uncompressed public key via deserialization"
|
||||
@@ -327,59 +288,59 @@
|
||||
(log/info "[native-module] Deserializing compressed key"
|
||||
{:fn :compressed-key->public-key
|
||||
:public-key public-key})
|
||||
(.multiformatDeserializePublicKey ^js (encryption) public-key deserialization-key callback))
|
||||
(.multiformatDeserializePublicKey ^js (status) public-key deserialization-key callback))
|
||||
|
||||
(defn hash-typed-data
|
||||
"used for keycard"
|
||||
[data callback]
|
||||
(log/debug "[native-module] hash-typed-data")
|
||||
(.hashTypedData ^js (encryption) data callback))
|
||||
(.hashTypedData ^js (status) data callback))
|
||||
|
||||
(defn hash-typed-data-v4
|
||||
"used for keycard"
|
||||
[data callback]
|
||||
(log/debug "[native-module] hash-typed-data-v4")
|
||||
(.hashTypedDataV4 ^js (encryption) data callback))
|
||||
(.hashTypedDataV4 ^js (status) data callback))
|
||||
|
||||
(defn send-transaction-with-signature
|
||||
"used for keycard"
|
||||
[rpcParams sig callback]
|
||||
(log/debug "[native-module] send-transaction-with-signature")
|
||||
(.sendTransactionWithSignature ^js (network) rpcParams sig callback))
|
||||
(.sendTransactionWithSignature ^js (status) rpcParams sig callback))
|
||||
|
||||
(defn sign-message
|
||||
"NOTE: beware, the password in rpcParams has to be sha3 hashed"
|
||||
[rpcParams callback]
|
||||
(log/debug "[native-module] sign-message")
|
||||
(.signMessage ^js (encryption) rpcParams callback))
|
||||
(.signMessage ^js (status) rpcParams callback))
|
||||
|
||||
(defn recover-message
|
||||
[rpcParams callback]
|
||||
(log/debug "[native-module] recover")
|
||||
(.recover ^js (network) rpcParams callback))
|
||||
(.recover ^js (status) rpcParams callback))
|
||||
|
||||
(defn send-transaction
|
||||
"NOTE: beware, the password has to be sha3 hashed"
|
||||
[rpcParams hashed-password callback]
|
||||
(log/debug "[native-module] send-transaction")
|
||||
(.sendTransaction ^js (network) rpcParams hashed-password callback))
|
||||
(.sendTransaction ^js (status) rpcParams hashed-password callback))
|
||||
|
||||
(defn sign-typed-data
|
||||
"NOTE: beware, the password has to be sha3 hashed"
|
||||
[data account hashed-password callback]
|
||||
(log/debug "[native-module] sign-typed-data")
|
||||
(.signTypedData ^js (encryption) data account hashed-password callback))
|
||||
(.signTypedData ^js (status) data account hashed-password callback))
|
||||
|
||||
(defn sign-typed-data-v4
|
||||
"NOTE: beware, the password has to be sha3 hashed"
|
||||
[data account hashed-password callback]
|
||||
(log/debug "[native-module] sign-typed-data-v4")
|
||||
(.signTypedDataV4 ^js (encryption) data account hashed-password callback))
|
||||
(.signTypedDataV4 ^js (status) data account hashed-password callback))
|
||||
|
||||
(defn send-logs
|
||||
[dbJson js-logs callback]
|
||||
(log/debug "[native-module] send-logs")
|
||||
(.sendLogs ^js (log-manager) dbJson js-logs callback))
|
||||
(.sendLogs ^js (status) dbJson js-logs callback))
|
||||
|
||||
(defn close-application
|
||||
[]
|
||||
@@ -404,7 +365,7 @@
|
||||
(defn set-blank-preview-flag
|
||||
[flag]
|
||||
(log/debug "[native-module] set-blank-preview-flag")
|
||||
(.setBlankPreviewFlag ^js (encryption) flag))
|
||||
(.setBlankPreviewFlag ^js (status) flag))
|
||||
|
||||
(defn get-device-model-info
|
||||
[]
|
||||
@@ -432,7 +393,7 @@
|
||||
(defn toggle-webview-debug
|
||||
[on]
|
||||
(log/debug "[native-module] toggle-webview-debug" on)
|
||||
(.toggleWebviewDebug ^js (ui-helper) on))
|
||||
(.toggleWebviewDebug ^js (status) on))
|
||||
|
||||
(defn rooted-device?
|
||||
[callback]
|
||||
@@ -455,72 +416,72 @@
|
||||
(defn encode-transfer
|
||||
[to-norm amount-hex]
|
||||
(log/debug "[native-module] encode-transfer")
|
||||
(.encodeTransfer ^js (encryption) to-norm amount-hex))
|
||||
(.encodeTransfer ^js (status) to-norm amount-hex))
|
||||
|
||||
(defn decode-parameters
|
||||
[bytes-string types]
|
||||
(log/debug "[native-module] decode-parameters")
|
||||
(let [json-str (.decodeParameters ^js (encryption)
|
||||
(let [json-str (.decodeParameters ^js (status)
|
||||
(types/clj->json {:bytesString bytes-string :types types}))]
|
||||
(types/json->clj json-str)))
|
||||
|
||||
(defn hex-to-number
|
||||
[hex]
|
||||
(log/debug "[native-module] hex-to-number")
|
||||
(let [json-str (.hexToNumber ^js (encryption) hex)]
|
||||
(let [json-str (.hexToNumber ^js (status) hex)]
|
||||
(types/json->clj json-str)))
|
||||
|
||||
(defn number-to-hex
|
||||
[num]
|
||||
(log/debug "[native-module] number-to-hex")
|
||||
(.numberToHex ^js (encryption) (str num)))
|
||||
(.numberToHex ^js (status) (str num)))
|
||||
|
||||
(defn sha3
|
||||
[s]
|
||||
(log/debug "[native-module] sha3")
|
||||
(when s
|
||||
(.sha3 ^js (encryption) (str s))))
|
||||
(.sha3 ^js (status) (str s))))
|
||||
|
||||
(defn utf8-to-hex
|
||||
[s]
|
||||
(log/debug "[native-module] utf8-to-hex")
|
||||
(.utf8ToHex ^js (encryption) s))
|
||||
(.utf8ToHex ^js (status) s))
|
||||
|
||||
(defn hex-to-utf8
|
||||
[s]
|
||||
(log/debug "[native-module] hex-to-utf8")
|
||||
(.hexToUtf8 ^js (encryption) s))
|
||||
(.hexToUtf8 ^js (status) s))
|
||||
|
||||
(defn check-address-checksum
|
||||
[address]
|
||||
(log/debug "[native-module] check-address-checksum")
|
||||
(let [result (.checkAddressChecksum ^js (utils) address)]
|
||||
(let [result (.checkAddressChecksum ^js (status) address)]
|
||||
(types/json->clj result)))
|
||||
|
||||
(defn address?
|
||||
[address]
|
||||
(log/debug "[native-module] address?")
|
||||
(when address
|
||||
(let [result (.isAddress ^js (utils) address)]
|
||||
(let [result (.isAddress ^js (status) address)]
|
||||
(types/json->clj result))))
|
||||
|
||||
(defn to-checksum-address
|
||||
[address]
|
||||
(log/debug "[native-module] to-checksum-address")
|
||||
(.toChecksumAddress ^js (utils) address))
|
||||
(.toChecksumAddress ^js (status) address))
|
||||
|
||||
(defn validate-mnemonic
|
||||
"Validate that a mnemonic conforms to BIP39 dictionary/checksum standards"
|
||||
[mnemonic callback]
|
||||
(log/debug "[native-module] validate-mnemonic")
|
||||
(.validateMnemonic ^js (utils) mnemonic callback))
|
||||
(.validateMnemonic ^js (status) mnemonic callback))
|
||||
|
||||
(defn delete-multiaccount
|
||||
"Delete multiaccount from database, deletes multiaccount's database and
|
||||
key files."
|
||||
[key-uid callback]
|
||||
(log/debug "[native-module] delete-multiaccount")
|
||||
(.deleteMultiaccount ^js (account-manager) key-uid callback))
|
||||
(.deleteMultiaccount ^js (status) key-uid callback))
|
||||
|
||||
(defn delete-imported-key
|
||||
"Delete imported key file."
|
||||
@@ -532,7 +493,7 @@
|
||||
[input selection]
|
||||
(log/debug "[native-module] resetKeyboardInput")
|
||||
(when platform/android?
|
||||
(.resetKeyboardInputCursor ^js (ui-helper) input selection)))
|
||||
(.resetKeyboardInputCursor ^js (status) input selection)))
|
||||
|
||||
;; passwords are hashed
|
||||
(defn reset-password
|
||||
@@ -540,12 +501,12 @@
|
||||
(log/debug "[native-module] change-database-password")
|
||||
(init-keystore
|
||||
key-uid
|
||||
#(.reEncryptDbAndKeystore ^js (encryption) key-uid current-password# new-password# callback)))
|
||||
#(.reEncryptDbAndKeystore ^js (status) key-uid current-password# new-password# callback)))
|
||||
|
||||
(defn convert-to-keycard-account
|
||||
[{:keys [key-uid] :as multiaccount-data} settings current-password# new-password callback]
|
||||
(log/debug "[native-module] convert-to-keycard-account")
|
||||
(.convertToKeycardAccount ^js (encryption)
|
||||
(.convertToKeycardAccount ^js (status)
|
||||
key-uid
|
||||
(types/clj->json multiaccount-data)
|
||||
(types/clj->json settings)
|
||||
@@ -556,7 +517,7 @@
|
||||
|
||||
(defn backup-disabled-data-dir
|
||||
[]
|
||||
(.backupDisabledDataDir ^js (utils)))
|
||||
(.backupDisabledDataDir ^js (status)))
|
||||
|
||||
(defn fleets
|
||||
[]
|
||||
@@ -564,12 +525,12 @@
|
||||
|
||||
(defn keystore-dir
|
||||
[]
|
||||
(.keystoreDir ^js (utils)))
|
||||
(.keystoreDir ^js (status)))
|
||||
|
||||
(defn log-file-directory
|
||||
[]
|
||||
(.logFileDirectory ^js (log-manager)))
|
||||
(.logFileDirectory ^js (status)))
|
||||
|
||||
(defn init-status-go-logging
|
||||
[{:keys [enable? mobile-system? log-level callback]}]
|
||||
(.initLogging ^js (log-manager) enable? mobile-system? log-level callback))
|
||||
(.initLogging ^js (status) enable? mobile-system? log-level callback))
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
(ns quo.components.buttons.slide-button.style
|
||||
(:require
|
||||
[quo.components.buttons.slide-button.constants :as constants]
|
||||
[quo.components.buttons.slide-button.utils :as utils]))
|
||||
[quo.components.buttons.slide-button.utils :as utils]
|
||||
[react-native.reanimated :as reanimated]))
|
||||
|
||||
(def absolute-fill
|
||||
{:position :absolute
|
||||
@@ -12,25 +13,28 @@
|
||||
|
||||
(defn thumb-container
|
||||
[{:keys [interpolate-track thumb-size customization-color theme]}]
|
||||
[{:transform [{:translate-x (interpolate-track :track-clamp)}]}
|
||||
(reanimated/apply-animations-to-style
|
||||
{:transform [{:translate-x (interpolate-track :track-clamp)}]}
|
||||
{:background-color (utils/main-color customization-color theme)
|
||||
:border-radius 12
|
||||
:height thumb-size
|
||||
:width thumb-size
|
||||
:align-items :center
|
||||
:overflow :hidden
|
||||
:justify-content :center}])
|
||||
:justify-content :center}))
|
||||
|
||||
(defn arrow-icon-container
|
||||
[interpolate-track]
|
||||
{:transform [{:translate-x (interpolate-track :arrow-icon-position)}]
|
||||
:flex 1
|
||||
:align-items :center
|
||||
:justify-content :center})
|
||||
(reanimated/apply-animations-to-style
|
||||
{:transform [{:translate-x (interpolate-track :arrow-icon-position)}]}
|
||||
{:flex 1
|
||||
:align-items :center
|
||||
:justify-content :center}))
|
||||
|
||||
(defn action-icon
|
||||
[interpolate-track size]
|
||||
[{:transform [{:translate-x (interpolate-track :action-icon-position)}]}
|
||||
(reanimated/apply-animations-to-style
|
||||
{:transform [{:translate-x (interpolate-track :action-icon-position)}]}
|
||||
{:height size
|
||||
:width size
|
||||
:position :absolute
|
||||
@@ -38,7 +42,7 @@
|
||||
:left 0
|
||||
:top 0
|
||||
:flex-direction :row
|
||||
:justify-content :space-around}])
|
||||
:justify-content :space-around}))
|
||||
|
||||
(defn track
|
||||
[{:keys [disabled? customization-color height blur?]}]
|
||||
@@ -53,8 +57,9 @@
|
||||
|
||||
(defn track-cover
|
||||
[interpolate-track]
|
||||
[{:left (interpolate-track :track-cover)}
|
||||
(assoc absolute-fill :overflow :hidden)])
|
||||
(reanimated/apply-animations-to-style
|
||||
{:left (interpolate-track :track-cover)}
|
||||
(assoc absolute-fill :overflow :hidden)))
|
||||
|
||||
(defn track-cover-text-container
|
||||
[track-width]
|
||||
|
||||
@@ -11,17 +11,17 @@
|
||||
(defn token-requirement-list-row
|
||||
[tokens padding?]
|
||||
[rn/view {:style (style/token-row padding?)}
|
||||
(map-indexed (fn [token-index {:keys [img-src amount sufficient? purchasable?] :as token}]
|
||||
^{:key token-index}
|
||||
[rn/view {:style style/token-tag-spacing}
|
||||
[token-tag/view
|
||||
{:token-symbol (:symbol token)
|
||||
:token-img-src img-src
|
||||
:token-value amount
|
||||
:size :size-24
|
||||
:options (cond
|
||||
sufficient? :hold
|
||||
purchasable? :add)}]])
|
||||
(map-indexed (fn [token-index token]
|
||||
(let [{:keys [amount sufficient? purchasable?]} token]
|
||||
^{:key token-index}
|
||||
[rn/view {:style style/token-tag-spacing}
|
||||
[token-tag/view
|
||||
{:token-symbol (:symbol token)
|
||||
:token-value amount
|
||||
:size :size-24
|
||||
:options (cond
|
||||
sufficient? :hold
|
||||
purchasable? :add)}]]))
|
||||
tokens)])
|
||||
|
||||
(defn- internal-view
|
||||
|
||||
@@ -76,19 +76,15 @@
|
||||
(str description " · " (i18n/label :t/on-device))])
|
||||
|
||||
(defn- context-tag-subtitle
|
||||
[{:keys [context-tag-type community-logo community-name account-name emoji customization-color]}]
|
||||
(let [tag-type (or context-tag-type :account)]
|
||||
[rn/view
|
||||
{:accessibility-label :context-tag-wrapper
|
||||
:style {:flex-wrap :wrap}}
|
||||
[context-tag/view
|
||||
{:type tag-type
|
||||
:account-name account-name
|
||||
:emoji emoji
|
||||
:community-name community-name
|
||||
:community-logo community-logo
|
||||
:size 24
|
||||
:customization-color customization-color}]]))
|
||||
[{:keys [community-logo community-name]}]
|
||||
[rn/view
|
||||
{:accessibility-label :context-tag-wrapper
|
||||
:style {:flex-wrap :wrap}}
|
||||
[context-tag/view
|
||||
{:type :community
|
||||
:community-name community-name
|
||||
:community-logo community-logo
|
||||
:size 24}]])
|
||||
|
||||
(defn- description-subtitle
|
||||
[{:keys [theme blur? description]}]
|
||||
@@ -99,8 +95,7 @@
|
||||
description])
|
||||
|
||||
(defn- subtitle
|
||||
[{:keys [type theme blur? keycard? networks description community-name community-logo
|
||||
context-tag-type account-name emoji customization-color]}]
|
||||
[{:keys [type theme blur? keycard? networks description community-name community-logo]}]
|
||||
(cond
|
||||
(= :keypair type)
|
||||
[keypair-subtitle
|
||||
@@ -123,12 +118,8 @@
|
||||
|
||||
(= :context-tag type)
|
||||
[context-tag-subtitle
|
||||
{:context-tag-type context-tag-type
|
||||
:community-logo community-logo
|
||||
:community-name community-name
|
||||
:account-name account-name
|
||||
:emoji emoji
|
||||
:customization-color customization-color}]
|
||||
{:community-logo community-logo
|
||||
:community-name community-name}]
|
||||
|
||||
(and (not= :label type) description)
|
||||
[description-subtitle
|
||||
@@ -182,7 +173,6 @@
|
||||
|
||||
(defn- view-internal
|
||||
[{:keys [title title-icon type theme description blur? community-name community-logo button-icon
|
||||
account-name emoji
|
||||
on-button-press
|
||||
on-button-long-press
|
||||
button-disabled? account-avatar-emoji account-avatar-type customization-color icon-avatar
|
||||
@@ -206,17 +196,14 @@
|
||||
:theme theme
|
||||
:blur? blur?}]
|
||||
[subtitle
|
||||
{:type type
|
||||
:theme theme
|
||||
:blur? blur?
|
||||
:keycard? keycard?
|
||||
:networks networks
|
||||
:description description
|
||||
:community-name community-name
|
||||
:community-logo community-logo
|
||||
:customization-color customization-color
|
||||
:account-name account-name
|
||||
:emoji emoji}]]
|
||||
{:type type
|
||||
:theme theme
|
||||
:blur? blur?
|
||||
:keycard? keycard?
|
||||
:networks networks
|
||||
:description description
|
||||
:community-name community-name
|
||||
:community-logo community-logo}]]
|
||||
[right-icon
|
||||
{:theme theme
|
||||
:type type
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
(ns quo.components.gradient.gradient-cover.style)
|
||||
|
||||
(defn root-container
|
||||
[opacity height]
|
||||
{:height (or height 252)
|
||||
[opacity]
|
||||
{:height 252
|
||||
:opacity opacity})
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
[react-native.linear-gradient :as linear-gradient]))
|
||||
|
||||
(defn- view-internal
|
||||
[{:keys [customization-color opacity container-style height] :or {customization-color :blue}}]
|
||||
[{:keys [customization-color opacity container-style] :or {customization-color :blue}}]
|
||||
(let [color-top (colors/custom-color customization-color 50 20)
|
||||
color-bottom (colors/custom-color customization-color 50 0)]
|
||||
[linear-gradient/linear-gradient
|
||||
@@ -14,6 +14,6 @@
|
||||
:colors [color-top color-bottom]
|
||||
:start {:x 0 :y 0}
|
||||
:end {:x 0 :y 1}
|
||||
:style (merge (style/root-container opacity height) container-style)}]))
|
||||
:style (merge (style/root-container opacity) container-style)}]))
|
||||
|
||||
(def view (quo.theme/with-theme view-internal))
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
(ns quo.components.list-items.network-list.component-spec
|
||||
(:require [quo.components.list-items.network-list.view :as network-list]
|
||||
[quo.foundations.colors :as colors]
|
||||
[test-helpers.component :as h]))
|
||||
|
||||
(defn- render
|
||||
[component]
|
||||
(h/render-with-theme-provider component :light))
|
||||
|
||||
(def props
|
||||
{:theme :light
|
||||
:state :default
|
||||
:label "Mainnet"
|
||||
:network-image 873
|
||||
:customization-color :blue
|
||||
:token-value "100.00 ETH"
|
||||
:fiat-value "€100.00"})
|
||||
|
||||
|
||||
(h/describe "List items: Network List"
|
||||
(h/test "default state explicit"
|
||||
(render [network-list/view props])
|
||||
(h/is-truthy (h/get-by-text "Mainnet")))
|
||||
|
||||
(h/test "Pressed state"
|
||||
(render [network-list/view props])
|
||||
(h/fire-event :on-press-in (h/get-by-label-text ::network-list))
|
||||
(h/wait-for #(h/has-style (h/query-by-label-text ::network-list)
|
||||
{:backgroundColor (colors/resolve-color :blue :light 5)})))
|
||||
|
||||
(h/test "Active state"
|
||||
(render [network-list/view (assoc props :state :active)])
|
||||
(h/has-style (h/query-by-label-text ::network-list)
|
||||
{:backgroundColor (colors/resolve-color :blue :light 10)}))
|
||||
|
||||
(h/test "Call on-press"
|
||||
(let [on-press (h/mock-fn)]
|
||||
(render [network-list/view (assoc props :on-press on-press)])
|
||||
(h/fire-event :on-press (h/get-by-label-text ::network-list))
|
||||
(h/was-called on-press))))
|
||||
@@ -1,41 +0,0 @@
|
||||
(ns quo.components.list-items.network-list.style
|
||||
(:require [quo.foundations.colors :as colors]))
|
||||
|
||||
(defn- background-color
|
||||
[state customization-color theme]
|
||||
(case state
|
||||
:pressed (colors/resolve-color customization-color theme 5)
|
||||
:active (colors/resolve-color customization-color theme 10)
|
||||
:transparent))
|
||||
|
||||
(defn container
|
||||
[state customization-color theme]
|
||||
{:flex-direction :row
|
||||
:justify-content :space-between
|
||||
:align-items :center
|
||||
:padding-horizontal 12
|
||||
:padding-vertical 8
|
||||
:border-radius 12
|
||||
:height 56
|
||||
:background-color (background-color state customization-color theme)})
|
||||
|
||||
(def info
|
||||
{:flex-direction :row
|
||||
:align-items :center
|
||||
:gap 2})
|
||||
|
||||
(def network-image
|
||||
{:border-width 1
|
||||
:border-radius 16
|
||||
:border-color colors/neutral-80-opa-5
|
||||
:margin-right 8
|
||||
:background-color colors/neutral-80-opa-5
|
||||
:height 32
|
||||
:width 32})
|
||||
|
||||
(def values-container
|
||||
{:align-items :flex-end})
|
||||
|
||||
(defn fiat-value
|
||||
[theme]
|
||||
{:color (colors/theme-colors colors/neutral-50 colors/neutral-40 theme)})
|
||||
@@ -1,76 +0,0 @@
|
||||
(ns quo.components.list-items.network-list.view
|
||||
(:require
|
||||
[clojure.string :as string]
|
||||
[quo.components.list-items.network-list.style :as style]
|
||||
[quo.components.markdown.text :as text]
|
||||
[quo.theme :as quo.theme]
|
||||
[react-native.core :as rn]
|
||||
[reagent.core :as reagent]
|
||||
[schema.core :as schema]))
|
||||
|
||||
(defn- info
|
||||
[{:keys [network-image label]}]
|
||||
[rn/view {:style style/info}
|
||||
[rn/image
|
||||
{:source network-image
|
||||
:style style/network-image}]
|
||||
[rn/view
|
||||
[text/text
|
||||
{:weight :semi-bold
|
||||
:style {:text-transform :capitalize}
|
||||
:number-of-lines 1}
|
||||
(if (string/blank? label) "-" label)]]])
|
||||
|
||||
(defn- values
|
||||
[{:keys [token-value fiat-value theme]}]
|
||||
[rn/view {:style style/values-container}
|
||||
[text/text
|
||||
{:weight :medium
|
||||
:size :paragraph-2
|
||||
:number-of-lines 1}
|
||||
token-value]
|
||||
[text/text
|
||||
{:style (style/fiat-value theme)
|
||||
:size :paragraph-2
|
||||
:number-of-lines 1}
|
||||
fiat-value]])
|
||||
|
||||
(def ?schema
|
||||
[:=>
|
||||
[:catn
|
||||
[:props
|
||||
[:map {:closed true}
|
||||
[:network-image :int]
|
||||
[:label :string]
|
||||
[:fiat-value :string]
|
||||
[:token-value :string]
|
||||
[:customization-color {:optional true} [:maybe :schema.common/customization-color]]
|
||||
[:state [:enum :pressed :active :default]]
|
||||
[:on-press {:optional true} [:maybe fn?]]
|
||||
[:theme :schema.common/theme]]]]
|
||||
:any])
|
||||
|
||||
(defn- view-internal
|
||||
[]
|
||||
(let [pressed? (reagent/atom false)
|
||||
on-press-in #(reset! pressed? true)
|
||||
on-press-out #(reset! pressed? false)]
|
||||
(fn [{:keys [on-press state customization-color theme]
|
||||
:as props
|
||||
:or {customization-color :blue}}]
|
||||
(let [internal-state (if @pressed?
|
||||
:pressed
|
||||
state)]
|
||||
|
||||
[rn/pressable
|
||||
{:style (style/container internal-state customization-color theme)
|
||||
:on-press-in on-press-in
|
||||
:on-press-out on-press-out
|
||||
:on-press on-press
|
||||
:accessibility-label :network-list}
|
||||
[info props]
|
||||
[values props]]))))
|
||||
|
||||
(def view
|
||||
(quo.theme/with-theme
|
||||
(schema/instrument #'view-internal ?schema)))
|
||||
+25
-28
@@ -1,4 +1,4 @@
|
||||
(ns quo.components.list-items.user
|
||||
(ns quo.components.list-items.user-list
|
||||
(:require
|
||||
[quo.components.avatars.user-avatar.view :as user-avatar]
|
||||
[quo.components.icon :as icons]
|
||||
@@ -18,14 +18,14 @@
|
||||
:align-items :center})
|
||||
|
||||
(defn action-icon
|
||||
[{:keys [type on-press on-check disabled? checked?]} theme]
|
||||
[{:keys [type on-press on-check disabled? checked?]}]
|
||||
[rn/touchable-opacity
|
||||
{:on-press (when on-press on-press)}
|
||||
(case type
|
||||
:options
|
||||
[icons/icon :i/options
|
||||
{:size 20
|
||||
:color (colors/theme-colors colors/neutral-50 colors/neutral-40 theme)}]
|
||||
:color (colors/theme-colors colors/neutral-50 colors/neutral-40)}]
|
||||
:checkbox
|
||||
[selectors/view
|
||||
{:type :checkbox
|
||||
@@ -37,33 +37,30 @@
|
||||
[text/text "not implemented"]
|
||||
[rn/view])])
|
||||
|
||||
(defn user
|
||||
(defn user-list
|
||||
[{:keys [short-chat-key primary-name secondary-name photo-path online? contact? verified?
|
||||
untrustworthy? on-press on-long-press accessory customization-color theme]}]
|
||||
[rn/touchable-highlight
|
||||
untrustworthy? on-press on-long-press accessory]}]
|
||||
[rn/touchable-opacity
|
||||
{:style container-style
|
||||
:underlay-color (colors/resolve-color customization-color theme 5)
|
||||
:accessibility-label :user-list
|
||||
:on-press (when on-press on-press)
|
||||
:on-long-press (when on-long-press on-long-press)}
|
||||
[:<>
|
||||
[user-avatar/user-avatar
|
||||
{:full-name primary-name
|
||||
:profile-picture photo-path
|
||||
:online? online?
|
||||
:size :small}]
|
||||
[rn/view {:style {:margin-horizontal 8 :flex 1}}
|
||||
[author/view
|
||||
{:primary-name primary-name
|
||||
:secondary-name secondary-name
|
||||
:contact? contact?
|
||||
:verified? verified?
|
||||
:untrustworthy? untrustworthy?
|
||||
:size 15}]
|
||||
(when short-chat-key
|
||||
[text/text
|
||||
{:size :paragraph-2
|
||||
:style {:color (colors/theme-colors colors/neutral-50 colors/neutral-40)}}
|
||||
short-chat-key])]
|
||||
(when accessory
|
||||
[action-icon accessory theme])]])
|
||||
[user-avatar/user-avatar
|
||||
{:full-name primary-name
|
||||
:profile-picture photo-path
|
||||
:online? online?
|
||||
:size :small}]
|
||||
[rn/view {:style {:margin-horizontal 8 :flex 1}}
|
||||
[author/view
|
||||
{:primary-name primary-name
|
||||
:secondary-name secondary-name
|
||||
:contact? contact?
|
||||
:verified? verified?
|
||||
:untrustworthy? untrustworthy?}]
|
||||
(when short-chat-key
|
||||
[text/text
|
||||
{:size :paragraph-1
|
||||
:style {:color (colors/theme-colors colors/neutral-50 colors/neutral-40)}}
|
||||
short-chat-key])]
|
||||
(when accessory
|
||||
[action-icon accessory])])
|
||||
@@ -38,7 +38,7 @@
|
||||
(defn icon-container
|
||||
[is-first?]
|
||||
{:margin-left (if is-first? 4 2)
|
||||
:margin-bottom 4})
|
||||
:margin-bottom 2})
|
||||
|
||||
(defn time-text
|
||||
[theme]
|
||||
|
||||
@@ -51,7 +51,8 @@
|
||||
[icons/icon :main-icons2/untrustworthy
|
||||
{:size 12
|
||||
:no-color true
|
||||
:container-style (style/icon-container contact?)}])]
|
||||
:container-style (style/icon-container contact?)}])
|
||||
]
|
||||
(when (and (not verified?) short-chat-key)
|
||||
[text/text
|
||||
{:weight :monospace
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
[react-native.linear-gradient :as linear-gradient]))
|
||||
|
||||
(defn- view-internal
|
||||
[{:keys [address theme on-press icon title customization-color container-style]}]
|
||||
[{:keys [address theme on-press icon title customization-color]}]
|
||||
[rn/pressable
|
||||
{:accessibility-label :link-card
|
||||
:on-press on-press}
|
||||
@@ -17,7 +17,7 @@
|
||||
(properties/gradient-end-color theme customization-color)]
|
||||
:start {:x 0 :y 1}
|
||||
:end {:x 1 :y 1}
|
||||
:style (merge (style/container theme) container-style)}
|
||||
:style (style/container theme)}
|
||||
[rn/view {:style style/icon-container}
|
||||
[social/view
|
||||
{:accessibility-label :social-icon
|
||||
|
||||
@@ -34,9 +34,10 @@
|
||||
(= :pinned use-case)
|
||||
theme)
|
||||
container-style)}
|
||||
[rn/text
|
||||
{:accessibility-label :emoji}
|
||||
(reaction.resource/system-emojis emoji)]
|
||||
[rn/image
|
||||
{:style {:width 15 :height 15}
|
||||
:accessibility-label :emoji
|
||||
:source (reaction.resource/get-reaction emoji)}]
|
||||
[text/text
|
||||
{:size :paragraph-2
|
||||
:weight :semi-bold
|
||||
|
||||
@@ -4,14 +4,6 @@
|
||||
(def ^:private reactions
|
||||
(resolve-all-reactions))
|
||||
|
||||
(def system-emojis
|
||||
{:reaction/thumbs-up "👍"
|
||||
:reaction/thumbs-down "👎"
|
||||
:reaction/love "❤"
|
||||
:reaction/laugh "😂"
|
||||
:reaction/sad "😢"
|
||||
:reaction/angry "😡"})
|
||||
|
||||
(defn get-reaction
|
||||
[reaction]
|
||||
(assert (keyword? reaction) "Reaction should be a keyword")
|
||||
|
||||
@@ -19,5 +19,6 @@
|
||||
(swap! pressed? not)
|
||||
(when on-press
|
||||
(on-press e)))}
|
||||
[rn/text
|
||||
(reactions.resource/system-emojis emoji)]])))
|
||||
[rn/image
|
||||
{:source (reactions.resource/get-reaction emoji)
|
||||
:style {:width 20 :height 20}}]])))
|
||||
|
||||
@@ -8,20 +8,19 @@
|
||||
|
||||
(defn- category-internal
|
||||
[{:keys [label data container-style] :as props}]
|
||||
(let [settings-item (filter identity data)]
|
||||
[rn/view {:style (merge (style/container label) container-style)}
|
||||
(when label
|
||||
[text/text
|
||||
{:weight :medium
|
||||
:size :paragraph-2
|
||||
:style (style/label props)}
|
||||
label])
|
||||
[rn/view {:style (style/settings-items props)}
|
||||
(for [item settings-item]
|
||||
^{:key item}
|
||||
[:<>
|
||||
[settings-item/view item]
|
||||
(when-not (= item (last settings-item))
|
||||
[rn/view {:style (style/settings-separator props)}])])]]))
|
||||
[rn/view {:style (merge (style/container label) container-style)}
|
||||
(when label
|
||||
[text/text
|
||||
{:weight :medium
|
||||
:size :paragraph-2
|
||||
:style (style/label props)}
|
||||
label])
|
||||
[rn/view {:style (style/settings-items props)}
|
||||
(for [item data]
|
||||
^{:key item}
|
||||
[:<>
|
||||
[settings-item/view item]
|
||||
(when-not (= item (last data))
|
||||
[rn/view {:style (style/settings-separator props)}])])]])
|
||||
|
||||
(def settings-category (quo.theme/with-theme category-internal))
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
network-image]
|
||||
:or {subtitle-type :default}}]
|
||||
[rn/view {:style style/subtitle-container}
|
||||
(when (and subtitle-type (not= :small size))
|
||||
(when (not= :small size)
|
||||
[rn/view {:style (style/subtitle-icon-container subtitle-type)}
|
||||
(case subtitle-type
|
||||
:icon [icons/icon icon
|
||||
|
||||
@@ -16,12 +16,6 @@
|
||||
:padding-top 12
|
||||
:padding-bottom 8})
|
||||
|
||||
(def gradient-bg
|
||||
{:position :absolute
|
||||
:top 0
|
||||
:left 0
|
||||
:right 0})
|
||||
|
||||
;;; Header
|
||||
(def header-container
|
||||
{:flex-direction :row
|
||||
|
||||
@@ -4,13 +4,14 @@
|
||||
[oops.core :as oops]
|
||||
[quo.components.avatars.account-avatar.view :as account-avatar]
|
||||
[quo.components.buttons.button.view :as button]
|
||||
[quo.components.gradient.gradient-cover.view :as gradient-cover]
|
||||
[quo.components.markdown.text :as text]
|
||||
[quo.components.share.qr-code.view :as qr-code]
|
||||
[quo.components.share.share-qr-code.style :as style]
|
||||
[quo.components.tabs.tab.view :as tab]
|
||||
[quo.theme]
|
||||
[react-native.blur :as blur]
|
||||
[react-native.core :as rn]
|
||||
[react-native.platform :as platform]
|
||||
[reagent.core :as reagent]
|
||||
[utils.i18n :as i18n]))
|
||||
|
||||
@@ -125,44 +126,41 @@
|
||||
[{:keys [share-qr-type qr-image-uri component-width customization-color full-name
|
||||
profile-picture emoji on-share-press]
|
||||
:as props}]
|
||||
[:<>
|
||||
[rn/view {:style style/gradient-bg}
|
||||
[gradient-cover/view {:customization-color customization-color :height 463}]]
|
||||
[rn/view {:style style/content-container}
|
||||
[rn/view {:style style/content-container}
|
||||
[rn/view
|
||||
{:style style/share-qr-container}
|
||||
[rn/view
|
||||
{:style style/share-qr-container}
|
||||
[rn/view
|
||||
{:style style/share-qr-inner-container}
|
||||
[account-avatar/view
|
||||
{:customization-color customization-color
|
||||
:emoji emoji
|
||||
:size 32}]
|
||||
[text/text
|
||||
{:size :heading-2
|
||||
:weight :semi-bold
|
||||
:style {:margin-left 8}} full-name]]
|
||||
[share-button {:on-press on-share-press}]]
|
||||
(when (#{:wallet-legacy :wallet-multichain} share-qr-type)
|
||||
[header props])
|
||||
[quo.theme/provider {:theme :light}
|
||||
[qr-code/view
|
||||
{:qr-image-uri qr-image-uri
|
||||
:size (style/qr-code-size component-width)
|
||||
:avatar (if (= share-qr-type :profile)
|
||||
:profile
|
||||
:wallet-account)
|
||||
:customization-color customization-color
|
||||
:full-name full-name
|
||||
:profile-picture profile-picture
|
||||
:emoji emoji}]]
|
||||
[rn/view {:style style/bottom-container}
|
||||
(case share-qr-type
|
||||
:profile [profile-bottom props]
|
||||
:wallet-legacy [wallet-legacy-bottom props]
|
||||
:wallet-multichain [wallet-multichain-bottom props]
|
||||
nil)]]])
|
||||
{:style style/share-qr-inner-container}
|
||||
[account-avatar/view
|
||||
{:customization-color customization-color
|
||||
:emoji emoji
|
||||
:size 32}]
|
||||
[text/text
|
||||
{:size :heading-2
|
||||
:weight :semi-bold
|
||||
:style {:margin-left 8}} full-name]]
|
||||
[share-button {:on-press on-share-press}]]
|
||||
(when (#{:wallet-legacy :wallet-multichain} share-qr-type)
|
||||
[header props])
|
||||
[quo.theme/provider {:theme :light}
|
||||
[qr-code/view
|
||||
{:qr-image-uri qr-image-uri
|
||||
:size (style/qr-code-size component-width)
|
||||
:avatar (if (= share-qr-type :profile)
|
||||
:profile
|
||||
:wallet-account)
|
||||
:customization-color customization-color
|
||||
:full-name full-name
|
||||
:profile-picture profile-picture
|
||||
:emoji emoji}]]
|
||||
[rn/view {:style style/bottom-container}
|
||||
(case share-qr-type
|
||||
:profile [profile-bottom props]
|
||||
:wallet-legacy [wallet-legacy-bottom props]
|
||||
:wallet-multichain [wallet-multichain-bottom props]
|
||||
nil)]])
|
||||
|
||||
(defn- view-internal
|
||||
(defn view
|
||||
"Receives the following properties:
|
||||
- type: :profile | :wallet-legacy | :wallet-multichain
|
||||
- qr-image-uri: Image source value.
|
||||
@@ -192,9 +190,16 @@
|
||||
Sometimes while using a blur layer on top of another on Android, this component looks
|
||||
bad because of the `blur/view`, so we can set `unblur-on-android? true` to fix it.
|
||||
"
|
||||
[props]
|
||||
[{:keys [unblur-on-android?] :as props}]
|
||||
(reagent/with-let [component-width (reagent/atom nil)
|
||||
container-component [rn/view {:background-color style/overlay-color}]]
|
||||
container-component (if (and platform/android? unblur-on-android?)
|
||||
[rn/view {:background-color style/overlay-color}]
|
||||
[blur/view
|
||||
{:blur-radius 20
|
||||
:blur-amount 20
|
||||
:blur-type :transparent
|
||||
:overlay-color style/overlay-color
|
||||
:background-color style/overlay-color}])]
|
||||
[quo.theme/provider {:theme :dark}
|
||||
[rn/view
|
||||
{:accessibility-label :share-qr-code
|
||||
@@ -206,6 +211,3 @@
|
||||
(-> props
|
||||
(assoc :component-width @component-width)
|
||||
(clojure.set/rename-keys {:type :share-qr-type}))]))]]))
|
||||
|
||||
|
||||
(def view (quo.theme/with-theme view-internal))
|
||||
|
||||
@@ -21,12 +21,7 @@
|
||||
(def collectible-image
|
||||
{:width 24
|
||||
:height 24
|
||||
:border-radius 8})
|
||||
|
||||
(def network
|
||||
{:width 24
|
||||
:height 24
|
||||
:border-radius 12})
|
||||
:border-radius 10})
|
||||
|
||||
(def token-image
|
||||
{:border-radius 12})
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
:network
|
||||
[rn/image
|
||||
{:source image-source
|
||||
:style style/network}]
|
||||
:style style/token-image}]
|
||||
:saved-address
|
||||
[wallet-user-avatar/wallet-user-avatar
|
||||
{:full-name label
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
- :token-symbol - string"
|
||||
[]
|
||||
(let [container-width (reagent/atom 0)]
|
||||
(fn [{:keys [options size blur? theme token-value token-img-src token-symbol]
|
||||
(fn [{:keys [options size blur? theme token-value token-symbol]
|
||||
:or {size :size-24}}]
|
||||
[rn/view
|
||||
{:on-layout #(reset! container-width
|
||||
@@ -42,12 +42,11 @@
|
||||
[])}
|
||||
[rn/view {:style (style/container size options blur? theme)}
|
||||
[token/view
|
||||
{:style (style/token-img size)
|
||||
:token token-symbol
|
||||
:size (case size
|
||||
:size-24 :size-20
|
||||
:size-32 :size-28)
|
||||
:image-source token-img-src}]
|
||||
{:style (style/token-img size)
|
||||
:token token-symbol
|
||||
:size (case size
|
||||
:size-24 :size-20
|
||||
:size-32 :size-28)}]
|
||||
[text/text
|
||||
{:size :paragraph-2
|
||||
:weight :medium
|
||||
|
||||
@@ -15,7 +15,9 @@
|
||||
[:token {:optional true} [:or keyword? string?]]
|
||||
[:style {:optional true} map?]
|
||||
;; Ignores `token` and uses this as parameter to `rn/image`'s source.
|
||||
[:image-source {:optional true} [:or :schema.common/image-source :string]]]]
|
||||
[:image-source {:optional true} [:or :schema.common/image-source :string]]
|
||||
;; If true, adds `data:image/png;base64,` as prefix to the string passed as `image-source`
|
||||
[:add-b64-prefix? {:optional true} boolean?]]]
|
||||
:any])
|
||||
|
||||
(defn- size->number
|
||||
@@ -50,32 +52,28 @@
|
||||
first
|
||||
string/capitalize)]])
|
||||
|
||||
(defn- normalize-b64-string
|
||||
[b64-image]
|
||||
(if (string/starts-with? b64-image "data:image/")
|
||||
b64-image
|
||||
(str b64-png-image-prefix b64-image)))
|
||||
|
||||
(defn view-internal
|
||||
"Render a token image.
|
||||
Props:
|
||||
- style: extra styles to apply to the `rn/image` component.
|
||||
- size: `:size-nn` or just `nn`, being `nn` any number. Defaults to 32.
|
||||
- token: string or keyword, it can contain upper case letters or not.
|
||||
E.g. all of these are valid and resolve to the same:
|
||||
:token/snt | :snt | :SNT | \"SNT\" | \"snt\".
|
||||
- image-source: Ignores `token` and uses this as parameter to `rn/image`'s source, it
|
||||
can be a b64 string representing an image.
|
||||
- style: extra styles to apply to the `rn/image` component.
|
||||
- size: `:size-nn` or just `nn`, being `nn` any number. Defaults to 32.
|
||||
- token: string or keyword, it can contain upper case letters or not.
|
||||
E.g. all of these are valid and resolve to the same:
|
||||
:token/snt | :snt | :SNT | \"SNT\" | \"snt\".
|
||||
- image-source: Ignores `token` and uses this as parameter to `rn/image`'s source.
|
||||
- add-b64-prefix?: If true, adds `data:image/png;base64,` as prefix to the string
|
||||
passed as `image-source`.
|
||||
"
|
||||
[{:keys [token size style image-source]
|
||||
[{:keys [token size style image-source add-b64-prefix?]
|
||||
:or {size 32}}]
|
||||
(let [img-src (if (string? image-source)
|
||||
(normalize-b64-string image-source)
|
||||
image-source)]
|
||||
(if-let [existing-source (or img-src (token-loader/get-token-image token))]
|
||||
(let [b64-string (if (and image-source add-b64-prefix?)
|
||||
(str b64-png-image-prefix image-source)
|
||||
image-source)
|
||||
source (or b64-string (token-loader/get-token-image token))]
|
||||
(if source
|
||||
[rn/image
|
||||
{:style (token-style style size)
|
||||
:source existing-source}]
|
||||
:source source}]
|
||||
[temp-empty-symbol token size style])))
|
||||
|
||||
(def view (schema/instrument #'view-internal ?schema))
|
||||
|
||||
@@ -33,22 +33,22 @@
|
||||
[rn/view
|
||||
{:style style/networks-container
|
||||
:accessibility-label :networks}
|
||||
(when (and ethereum (pos? (:amount ethereum)))
|
||||
(when (pos? ethereum)
|
||||
[network-amount
|
||||
{:network :ethereum
|
||||
:amount (str (:amount ethereum) " " (or (:token-symbol ethereum) "ETH"))
|
||||
:amount (str ethereum " ETH")
|
||||
:divider? (or show-arbitrum? show-optimism?)
|
||||
:theme theme}])
|
||||
(when show-optimism?
|
||||
[network-amount
|
||||
{:network :optimism
|
||||
:amount (str (:amount optimism) " " (or (:token-symbol optimism) "OPT"))
|
||||
:amount (str optimism " OPT")
|
||||
:divider? show-arbitrum?
|
||||
:theme theme}])
|
||||
(when show-arbitrum?
|
||||
[network-amount
|
||||
{:network :arbitrum
|
||||
:amount (str (:amount arbitrum) " " (or (:token-symbol arbitrum) "ARB"))
|
||||
:amount (str arbitrum " ARB")
|
||||
:theme theme}])]))
|
||||
|
||||
(defn- view-internal
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
(ns quo.components.wallet.token-input.style
|
||||
(:require
|
||||
[quo.foundations.colors :as colors]
|
||||
[quo.foundations.typography :as typography]))
|
||||
[quo.foundations.typography :as typography]
|
||||
[react-native.platform :as platform]))
|
||||
|
||||
(defn main-container
|
||||
[width]
|
||||
@@ -15,55 +16,23 @@
|
||||
:flex-direction :row
|
||||
:justify-content :space-between})
|
||||
|
||||
(defn token-name
|
||||
[theme]
|
||||
{:color (colors/theme-colors colors/neutral-50 colors/neutral-40 theme)
|
||||
:margin-right 8
|
||||
:padding-bottom 2})
|
||||
|
||||
(def token-label-container
|
||||
{:position :absolute
|
||||
:left 40 ; token image size + margin
|
||||
:right 0
|
||||
:bottom 0
|
||||
:top 0
|
||||
:flex-direction :row
|
||||
:align-items :flex-end})
|
||||
|
||||
(def text-input-container
|
||||
{:position :absolute
|
||||
:top 0
|
||||
:bottom 0
|
||||
:left 40 ; token image size + margin
|
||||
:right 0})
|
||||
|
||||
(def text-input-dimensions
|
||||
(-> typography/heading-1
|
||||
(dissoc :letter-spacing)
|
||||
(assoc :font-weight "600"
|
||||
:margin-right 5
|
||||
:padding-left 0
|
||||
:padding-right 0
|
||||
:padding-top 0
|
||||
:padding-bottom 0
|
||||
:height "100%")))
|
||||
|
||||
(defn text-input
|
||||
[theme error?]
|
||||
(assoc text-input-dimensions
|
||||
:color
|
||||
(if error?
|
||||
(colors/resolve-color :danger theme)
|
||||
(colors/theme-colors colors/neutral-100 colors/white theme))))
|
||||
|
||||
(defn placeholder-text
|
||||
[theme]
|
||||
(colors/theme-colors colors/neutral-40 colors/neutral-50 theme))
|
||||
(merge typography/heading-1
|
||||
{:font-weight "600"
|
||||
:margin-left 8
|
||||
:margin-right (if platform/ios? 6 4)
|
||||
:color (colors/theme-colors colors/neutral-100 colors/white theme)
|
||||
:padding 0
|
||||
:text-align :center
|
||||
:height "100%"}))
|
||||
|
||||
(defn divider
|
||||
[theme]
|
||||
{:margin-vertical 8
|
||||
:background-color (colors/theme-colors colors/neutral-10 colors/neutral-90 theme)})
|
||||
[width theme]
|
||||
{:height 1
|
||||
:width width
|
||||
:background-color (colors/theme-colors colors/neutral-10 colors/neutral-90 theme)
|
||||
:margin-vertical 8})
|
||||
|
||||
(def data-container
|
||||
{:padding-top 4
|
||||
@@ -71,7 +40,3 @@
|
||||
:flex-direction :row
|
||||
:justify-content :space-between
|
||||
:align-items :center})
|
||||
|
||||
(defn fiat-amount
|
||||
[theme]
|
||||
{:color (colors/theme-colors colors/neutral-50 colors/neutral-40 theme)})
|
||||
|
||||
@@ -7,137 +7,85 @@
|
||||
[quo.components.tags.network-tags.view :as network-tag]
|
||||
[quo.components.utilities.token.view :as token]
|
||||
[quo.components.wallet.token-input.style :as style]
|
||||
[quo.foundations.colors :as colors]
|
||||
[quo.foundations.common :as common]
|
||||
[quo.theme :as quo.theme]
|
||||
[react-native.core :as rn]
|
||||
[reagent.core :as reagent]))
|
||||
|
||||
(defn fiat-format
|
||||
[currency num-value conversion]
|
||||
(str (get common/currency-label currency) (.toFixed (* num-value conversion) 2)))
|
||||
|
||||
(defn crypto-format
|
||||
[num-value conversion crypto-decimals token]
|
||||
(str (.toFixed (/ num-value conversion) (or crypto-decimals 2))
|
||||
" "
|
||||
(string/upper-case (or (clj->js token) ""))))
|
||||
|
||||
(defn calc-value
|
||||
[{:keys [crypto? currency token value conversion crypto-decimals]}]
|
||||
(let [num-value (if (string? value)
|
||||
(or (parse-double value) 0)
|
||||
value)]
|
||||
[crypto? currency token value conversion]
|
||||
(let [num-value (if (string? value) (parse-double (or value "0")) value)]
|
||||
(if crypto?
|
||||
(fiat-format currency num-value conversion)
|
||||
(crypto-format num-value conversion crypto-decimals token))))
|
||||
|
||||
(defn- data-info
|
||||
[{:keys [theme token crypto-decimals conversion networks title crypto? currency amount error?]}]
|
||||
[rn/view {:style style/data-container}
|
||||
[network-tag/view
|
||||
{:networks networks
|
||||
:title title
|
||||
:status (when error? :error)}]
|
||||
[text/text
|
||||
{:size :paragraph-2
|
||||
:weight :medium
|
||||
:style (style/fiat-amount theme)}
|
||||
(calc-value {:crypto? crypto?
|
||||
:currency currency
|
||||
:token token
|
||||
:value amount
|
||||
:conversion conversion
|
||||
:crypto-decimals crypto-decimals})]])
|
||||
|
||||
(defn- token-name-text
|
||||
[theme text]
|
||||
[text/text
|
||||
{:style (style/token-name theme)
|
||||
:size :paragraph-2
|
||||
:weight :semi-bold}
|
||||
(string/upper-case (or (clj->js text) ""))])
|
||||
|
||||
(defn- token-label
|
||||
[{:keys [theme value text]}]
|
||||
[rn/view
|
||||
{:style style/token-label-container
|
||||
:pointer-events :none}
|
||||
[rn/text-input
|
||||
{:max-length 12
|
||||
:style style/text-input-dimensions
|
||||
:editable false
|
||||
:placeholder "0"
|
||||
:opacity 0
|
||||
:value value}]
|
||||
[token-name-text theme text]])
|
||||
|
||||
(defn input-section
|
||||
[{:keys [on-change-text value value-atom]}]
|
||||
(let [input-ref (atom nil)
|
||||
set-ref #(reset! input-ref %)
|
||||
focus-input #(when-let [ref ^js @input-ref]
|
||||
(.focus ref))
|
||||
controlled-input? (some? value)
|
||||
handle-on-change-text (fn [v]
|
||||
(when-not controlled-input?
|
||||
(reset! value-atom v))
|
||||
(when on-change-text
|
||||
(on-change-text v)))]
|
||||
(fn [{:keys [theme token customization-color show-keyboard? crypto? currency value error?]
|
||||
:or {show-keyboard? true}}]
|
||||
[rn/pressable
|
||||
{:on-press focus-input
|
||||
:style {:flex 1}}
|
||||
[token/view
|
||||
{:token token
|
||||
:size :size-32}]
|
||||
[rn/view {:style style/text-input-container}
|
||||
[rn/text-input
|
||||
(cond-> {:style (style/text-input theme error?)
|
||||
:placeholder-text-color (style/placeholder-text theme)
|
||||
:auto-focus true
|
||||
:ref set-ref
|
||||
:placeholder "0"
|
||||
:keyboard-type :numeric
|
||||
:max-length 12
|
||||
:on-change-text handle-on-change-text
|
||||
:selection-color customization-color
|
||||
:show-soft-input-on-focus show-keyboard?}
|
||||
controlled-input? (assoc :value value)
|
||||
(not controlled-input?) (assoc :default-value @value-atom))]]
|
||||
[token-label
|
||||
{:theme theme
|
||||
:text (if crypto? token currency)
|
||||
:value (if controlled-input? value @value-atom)}]])))
|
||||
(str (get common/currency-label currency) (.toFixed (* num-value conversion) 2))
|
||||
(str (.toFixed (/ num-value conversion) 2) " " (string/upper-case (or (clj->js token) ""))))))
|
||||
|
||||
(defn- view-internal
|
||||
[{:keys [on-swap]}]
|
||||
(let [width (:width (rn/get-window))
|
||||
value-atom (reagent/atom nil)
|
||||
crypto? (reagent/atom true)
|
||||
handle-on-swap (fn []
|
||||
(swap! crypto? not)
|
||||
(when on-swap
|
||||
(on-swap @crypto?)))]
|
||||
(fn [{:keys [theme container-style value] :as props}]
|
||||
[rn/view {:style (merge (style/main-container width) container-style)}
|
||||
[{external-value :value}]
|
||||
(let [width (:width (rn/get-window))
|
||||
value (reagent/atom nil)
|
||||
crypto? (reagent/atom true)
|
||||
input-ref (atom nil)
|
||||
controlled-input? (some? external-value)]
|
||||
(fn [{:keys [theme token currency conversion networks title customization-color
|
||||
on-change-text on-swap container-style show-keyboard?]
|
||||
:or {show-keyboard? true}
|
||||
external-value :value}]
|
||||
[rn/view
|
||||
{:style (merge
|
||||
(style/main-container width)
|
||||
container-style)}
|
||||
[rn/view {:style style/amount-container}
|
||||
[input-section
|
||||
(assoc props
|
||||
:value-atom value-atom
|
||||
:crypto? @crypto?)]
|
||||
[rn/pressable
|
||||
{:on-press #(when @input-ref (.focus ^js @input-ref))
|
||||
:style {:flex-direction :row
|
||||
:flex-grow 1
|
||||
:align-items :flex-end}}
|
||||
[token/view {:token token :size :size-32}]
|
||||
[rn/text-input
|
||||
(cond-> {:auto-focus true
|
||||
:ref #(reset! input-ref %)
|
||||
:placeholder "0"
|
||||
:placeholder-text-color (colors/theme-colors colors/neutral-40
|
||||
colors/neutral-50
|
||||
theme)
|
||||
:keyboard-type :numeric
|
||||
:max-length 12
|
||||
:on-change-text (fn [v]
|
||||
(when-not controlled-input?
|
||||
(reset! value v))
|
||||
(when on-change-text
|
||||
(on-change-text v)))
|
||||
:style (style/text-input theme)
|
||||
:selection-color customization-color
|
||||
:show-soft-input-on-focus show-keyboard?}
|
||||
controlled-input? (assoc :value external-value)
|
||||
(not controlled-input?) (assoc :default-value @value))]
|
||||
[text/text
|
||||
{:size :paragraph-2
|
||||
:weight :semi-bold
|
||||
:style {:color (colors/theme-colors colors/neutral-50 colors/neutral-40 theme)
|
||||
:margin-right 8
|
||||
:padding-bottom 2}}
|
||||
(string/upper-case (or (clj->js (if @crypto? token currency)) ""))]]
|
||||
[button/button
|
||||
{:icon true
|
||||
:icon-only? true
|
||||
:size 32
|
||||
:on-press handle-on-swap
|
||||
:on-press (fn []
|
||||
(swap! crypto? not)
|
||||
(when on-swap
|
||||
(on-swap @crypto?)))
|
||||
:type :outline
|
||||
:accessibility-label :reorder}
|
||||
:i/reorder]]
|
||||
[divider-line/view {:container-style (style/divider theme)}]
|
||||
[data-info
|
||||
(assoc props
|
||||
:crypto? @crypto?
|
||||
:amount (or value @value-atom))]])))
|
||||
[divider-line/view {:container-style {:margin-vertical 8}}]
|
||||
[rn/view {:style style/data-container}
|
||||
[network-tag/view {:networks networks :title title}]
|
||||
[text/text
|
||||
{:size :paragraph-2
|
||||
:weight :medium
|
||||
:style {:color (colors/theme-colors colors/neutral-50 colors/neutral-40 theme)}}
|
||||
(calc-value @crypto? currency token (or external-value @value) conversion)]]])))
|
||||
|
||||
(def view (quo.theme/with-theme view-internal))
|
||||
|
||||
+3
-5
@@ -80,14 +80,13 @@
|
||||
quo.components.list-items.community.view
|
||||
quo.components.list-items.dapp.view
|
||||
quo.components.list-items.menu-item
|
||||
quo.components.list-items.network-list.view
|
||||
quo.components.list-items.preview-list.view
|
||||
quo.components.list-items.quiz-item.view
|
||||
quo.components.list-items.saved-address.view
|
||||
quo.components.list-items.saved-contact-address.view
|
||||
quo.components.list-items.token-network.view
|
||||
quo.components.list-items.token-value.view
|
||||
quo.components.list-items.user
|
||||
quo.components.list-items.user-list
|
||||
quo.components.loaders.skeleton-list.view
|
||||
quo.components.markdown.list.view
|
||||
quo.components.markdown.text
|
||||
@@ -300,17 +299,16 @@
|
||||
(def account-list-card quo.components.list-items.account-list-card.view/view)
|
||||
(def address quo.components.list-items.address.view/view)
|
||||
(def channel quo.components.list-items.channel.view/view)
|
||||
(def community-list quo.components.list-items.community.view/view)
|
||||
(def community-list-item quo.components.list-items.community.view/view)
|
||||
(def dapp quo.components.list-items.dapp.view/view)
|
||||
(def menu-item quo.components.list-items.menu-item/menu-item)
|
||||
(def network-list quo.components.list-items.network-list.view/view)
|
||||
(def preview-list quo.components.list-items.preview-list.view/view)
|
||||
(def quiz-item quo.components.list-items.quiz-item.view/view)
|
||||
(def saved-address quo.components.list-items.saved-address.view/view)
|
||||
(def saved-contact-address quo.components.list-items.saved-contact-address.view/view)
|
||||
(def token-network quo.components.list-items.token-network.view/view)
|
||||
(def token-value quo.components.list-items.token-value.view/view)
|
||||
(def user quo.components.list-items.user/user)
|
||||
(def user-list quo.components.list-items.user-list/user-list)
|
||||
|
||||
;;;; Loaders
|
||||
(def skeleton-list quo.components.loaders.skeleton-list.view/view)
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
quo.components.list-items.channel.component-spec
|
||||
quo.components.list-items.community.component-spec
|
||||
quo.components.list-items.dapp.component-spec
|
||||
quo.components.list-items.network-list.component-spec
|
||||
quo.components.list-items.quiz-item.component-spec
|
||||
quo.components.list-items.saved-address.component-spec
|
||||
quo.components.list-items.saved-contact-address.component-spec
|
||||
|
||||
@@ -22,10 +22,8 @@
|
||||
useAnimatedScrollHandler
|
||||
runOnJS)]
|
||||
["react-native-redash" :refer (withPause)]
|
||||
[oops.core :as oops]
|
||||
[react-native.flat-list :as rn-flat-list]
|
||||
[reagent.core :as reagent]
|
||||
[utils.transforms :as transforms]
|
||||
[utils.worklets.core :as worklets.core]))
|
||||
|
||||
(def enable-layout-animations enableLayoutAnimations)
|
||||
@@ -40,20 +38,7 @@
|
||||
;; Animated Components
|
||||
(def create-animated-component (comp reagent/adapt-react-class (.-createAnimatedComponent reanimated)))
|
||||
|
||||
(def ^:private view* (reagent/adapt-react-class (.-View reanimated)))
|
||||
|
||||
(defn view
|
||||
[]
|
||||
(let [current-component (reagent/current-component)
|
||||
reagent-props (reagent/props current-component)
|
||||
children (reagent/children current-component)
|
||||
updated-props (update reagent-props :style transforms/styles-with-vectors)
|
||||
;; Some components add JS props to their children (such as TouchableWithoutFeedback), to make
|
||||
;; this component fully compatible we are passing those props to the inner component (`view*`).
|
||||
external-props (oops/gobj-get current-component "props")
|
||||
all-props (transforms/copy-js-obj-to-map external-props updated-props #(not= % "argv"))]
|
||||
(into [view* all-props] children)))
|
||||
|
||||
(def view (reagent/adapt-react-class (.-View reanimated)))
|
||||
(def text (reagent/adapt-react-class (.-Text reanimated)))
|
||||
(def scroll-view (reagent/adapt-react-class (.-ScrollView reanimated)))
|
||||
(def image (reagent/adapt-react-class (.-Image reanimated)))
|
||||
|
||||
@@ -17,19 +17,19 @@
|
||||
(fn [^js data]
|
||||
(let [^js section (.-section data)]
|
||||
(reagent/as-element [f
|
||||
{:index (.-index section)
|
||||
:title (.-title section)
|
||||
{:title (.-title section)
|
||||
:data (.-data section)}]))))
|
||||
|
||||
(defn- wrap-per-section-render-fn
|
||||
[index props]
|
||||
(-> (if-let [f (:render-fn props)]
|
||||
(assoc (dissoc props :render-fn :render-data)
|
||||
:renderItem
|
||||
(memo-wrap-render-fn f (:render-data props)))
|
||||
props)
|
||||
(update :data to-array)
|
||||
(assoc :index index)))
|
||||
[props]
|
||||
(update
|
||||
(if-let [f (:render-fn props)]
|
||||
(assoc (dissoc props :render-fn :render-data)
|
||||
:renderItem
|
||||
(memo-wrap-render-fn f (:render-data props)))
|
||||
props)
|
||||
:data
|
||||
to-array))
|
||||
|
||||
(defn section-list
|
||||
"A wrapper for SectionList.
|
||||
@@ -42,8 +42,6 @@
|
||||
props
|
||||
(when render-section-footer-fn
|
||||
{:renderSectionFooter (wrap-render-section-header-fn render-section-footer-fn)})
|
||||
{:sections (->> sections
|
||||
(map-indexed wrap-per-section-render-fn)
|
||||
(clj->js))
|
||||
{:sections (clj->js (map wrap-per-section-render-fn sections))
|
||||
:renderSectionHeader (wrap-render-section-header-fn render-section-header-fn)
|
||||
:style style})])
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
(ns status-im.common.contact-list.style)
|
||||
|
||||
(defn contacts-section-header
|
||||
[first-item?]
|
||||
{:padding-top (if first-item? 0 8)})
|
||||
@@ -1,10 +1,7 @@
|
||||
(ns status-im.common.contact-list.view
|
||||
(:require
|
||||
[quo.core :as quo]
|
||||
[react-native.core :as rn]
|
||||
[status-im.common.contact-list.style :as style]))
|
||||
[quo.core :as quo]))
|
||||
|
||||
(defn contacts-section-header
|
||||
[{:keys [title index]}]
|
||||
[rn/view (style/contacts-section-header (= index 0))
|
||||
[quo/divider-label title]])
|
||||
[{:keys [title]}]
|
||||
[quo/divider-label title])
|
||||
|
||||
@@ -6,21 +6,17 @@
|
||||
|
||||
(defn contact-list-item
|
||||
[{:keys [on-press on-long-press accessory]}
|
||||
{:keys [primary-name secondary-name public-key compressed-key ens-verified added?]}
|
||||
theme]
|
||||
(let [photo-path (rf/sub [:chats/photo-path public-key])
|
||||
online? (rf/sub [:visibility-status-updates/online? public-key])
|
||||
customization-color (rf/sub [:profile/customization-color])]
|
||||
[quo/user
|
||||
{:customization-color customization-color
|
||||
:theme theme
|
||||
:short-chat-key (address/get-shortened-compressed-key (or compressed-key public-key))
|
||||
:primary-name primary-name
|
||||
:secondary-name secondary-name
|
||||
:photo-path photo-path
|
||||
:online? online?
|
||||
:verified? ens-verified
|
||||
:contact? added?
|
||||
:on-press on-press
|
||||
:on-long-press on-long-press
|
||||
:accessory accessory}]))
|
||||
{:keys [primary-name secondary-name public-key compressed-key ens-verified added?]}]
|
||||
(let [photo-path (rf/sub [:chats/photo-path public-key])
|
||||
online? (rf/sub [:visibility-status-updates/online? public-key])]
|
||||
[quo/user-list
|
||||
{:short-chat-key (address/get-shortened-compressed-key (or compressed-key public-key))
|
||||
:primary-name primary-name
|
||||
:secondary-name secondary-name
|
||||
:photo-path photo-path
|
||||
:online? online?
|
||||
:verified? ens-verified
|
||||
:contact? added?
|
||||
:on-press on-press
|
||||
:on-long-press on-long-press
|
||||
:accessory accessory}]))
|
||||
|
||||
@@ -52,8 +52,7 @@
|
||||
:remove-listeners remove-listeners}))
|
||||
|
||||
(defn view
|
||||
[{:keys [header footer customization-color footer-container-padding gradient-cover?]
|
||||
:or {footer-container-padding (safe-area/get-top)}} &
|
||||
[{:keys [header footer customization-color gradient-cover?]} &
|
||||
children]
|
||||
(reagent/with-let [window-height (:height (rn/get-window))
|
||||
footer-container-height (reagent/atom 0)
|
||||
@@ -95,7 +94,7 @@
|
||||
children)]
|
||||
[rn/keyboard-avoiding-view
|
||||
{:style style/keyboard-avoiding-view
|
||||
:keyboard-vertical-offset (if platform/ios? footer-container-padding 0)
|
||||
:keyboard-vertical-offset (if platform/ios? (safe-area/get-top) 0)
|
||||
:pointer-events :box-none}
|
||||
[floating-container/view
|
||||
{:on-layout set-footer-container-height
|
||||
|
||||
@@ -349,7 +349,7 @@
|
||||
[chat-id]
|
||||
(entry {:icon :i/members
|
||||
:label (i18n/label :t/group-details)
|
||||
:on-press #(hide-sheet-and-dispatch [:navigate-to :group-chat-profile chat-id])
|
||||
:on-press #(hide-sheet-and-dispatch [:show-group-chat-profile chat-id])
|
||||
:danger? false
|
||||
:accessibility-label :group-details
|
||||
:sub-label nil
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user