Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f67292201f | ||
|
|
cb7e22b0e3 | ||
|
|
a4c5c57d4a | ||
|
|
8bd3f7bde1 | ||
|
|
188f763412 | ||
|
|
0105e3651c | ||
|
|
4e119e13c9 |
+37
@@ -0,0 +1,37 @@
|
||||
module.exports = {
|
||||
"testRunner": "jest",
|
||||
"testRegex": "\\.visual\\.js$",
|
||||
"runner-config": "visual-test/config.json",
|
||||
"devices": {
|
||||
"simulator": {
|
||||
"type": "ios.simulator",
|
||||
"device": {
|
||||
"type": "iPhone 11 Pro"
|
||||
}
|
||||
}
|
||||
},
|
||||
"apps": {
|
||||
"ios.release": {
|
||||
"name": "StatusIm",
|
||||
"type": "ios.app",
|
||||
"binaryPath": "ios/build/Build/Products/Release-iphonesimulator/StatusIm.app",
|
||||
"build": "make release-ios"
|
||||
},
|
||||
"ios.debug": {
|
||||
"name": "StatusIm",
|
||||
"type": "ios.app",
|
||||
"binaryPath": process.env.TEST_BINARY_PATH,
|
||||
"build": "make run-ios SIMULATOR='iPhone 11 Pro'"
|
||||
}
|
||||
},
|
||||
"configurations": {
|
||||
"ios.sim.release": {
|
||||
"device": "simulator",
|
||||
"app": "ios.release"
|
||||
},
|
||||
"ios.sim.debug": {
|
||||
"device": "simulator",
|
||||
"app": "ios.debug"
|
||||
}
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
extends: '@react-native-community',
|
||||
};
|
||||
root: true,
|
||||
extends: '@react-native-community',
|
||||
};
|
||||
|
||||
@@ -43,4 +43,4 @@ As a <user|developer|...>, I want to <task> so that <goal>.
|
||||
[comment]: # (if on Android please replicate bug whilst running adb logcat)
|
||||
```
|
||||
...
|
||||
```
|
||||
```
|
||||
@@ -1,9 +0,0 @@
|
||||
*
|
||||
!*.js
|
||||
!*/
|
||||
*.clj-kondo
|
||||
*.shadow-cljs
|
||||
modules
|
||||
result
|
||||
target
|
||||
component-spec
|
||||
+5
-7
@@ -1,9 +1,7 @@
|
||||
module.exports = {
|
||||
arrowParens: 'always',
|
||||
printWidth: 120,
|
||||
semi: true,
|
||||
singleQuote: true,
|
||||
tabWidth: 2,
|
||||
trailingComma: 'all',
|
||||
useTabs: false,
|
||||
bracketSpacing: false,
|
||||
bracketSameLine: true,
|
||||
singleQuote: true,
|
||||
trailingComma: 'all',
|
||||
tabWidth: 4,
|
||||
};
|
||||
|
||||
@@ -14,17 +14,17 @@ WHITE := $(shell tput -Txterm setaf 7)
|
||||
YELLOW := $(shell tput -Txterm setaf 3)
|
||||
RESET := $(shell tput -Txterm sgr0)
|
||||
HELP_FUN = \
|
||||
%help; \
|
||||
while(<>) { push @{$$help{$$2 // 'options'}}, [$$1, $$3] if /^([a-zA-Z\-]+)\s*:.*\#\#(?:@([a-zA-Z\-]+))?\s(.*)$$/ }; \
|
||||
print "Usage: make [target]\n\nSee STARTING_GUIDE.md for more info.\n\n"; \
|
||||
for (sort keys %help) { \
|
||||
print "${WHITE}$$_:${RESET}\n"; \
|
||||
for (@{$$help{$$_}}) { \
|
||||
$$sep = " " x (32 - length $$_->[0]); \
|
||||
print " ${YELLOW}$$_->[0]${RESET}$$sep${GREEN}$$_->[1]${RESET}\n"; \
|
||||
}; \
|
||||
print "\n"; \
|
||||
}
|
||||
%help; \
|
||||
while(<>) { push @{$$help{$$2 // 'options'}}, [$$1, $$3] if /^([a-zA-Z\-]+)\s*:.*\#\#(?:@([a-zA-Z\-]+))?\s(.*)$$/ }; \
|
||||
print "Usage: make [target]\n\nSee STARTING_GUIDE.md for more info.\n\n"; \
|
||||
for (sort keys %help) { \
|
||||
print "${WHITE}$$_:${RESET}\n"; \
|
||||
for (@{$$help{$$_}}) { \
|
||||
$$sep = " " x (32 - length $$_->[0]); \
|
||||
print " ${YELLOW}$$_->[0]${RESET}$$sep${GREEN}$$_->[1]${RESET}\n"; \
|
||||
}; \
|
||||
print "\n"; \
|
||||
}
|
||||
HOST_OS := $(shell uname | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
# This can come from Jenkins
|
||||
@@ -42,7 +42,7 @@ export NODE_OPTIONS += --openssl-legacy-provider
|
||||
export KEYSTORE_PATH ?= $(HOME)/.gradle/status-im.keystore
|
||||
|
||||
# Our custom config is located in nix/nix.conf
|
||||
export NIX_USER_CONF_FILES = $(PWD)/nix/nix.conf
|
||||
export NIX_CONF_DIR = $(PWD)/nix
|
||||
# Location of symlinks to derivations that should not be garbage collected
|
||||
export _NIX_GCROOTS = /nix/var/nix/gcroots/per-user/$(USER)/status-mobile
|
||||
# Defines which variables will be kept for Nix pure shell, use semicolon as divider
|
||||
@@ -81,10 +81,6 @@ nix-gc-protected:
|
||||
@echo -e "$(YELLOW)The following paths are protected:$(RESET)" && \
|
||||
ls -1 $(_NIX_GCROOTS) | sed 's/^/ - /'
|
||||
|
||||
nix-upgrade: SHELL := /bin/sh
|
||||
nix-upgrade: ##@nix Upgrade Nix interpreter to current version.
|
||||
nix/scripts/upgrade.sh
|
||||
|
||||
nix-gc: export TARGET := nix
|
||||
nix-gc: nix-gc-protected ##@nix Garbage collect all packages older than 20 days from /nix/store
|
||||
nix-store --gc
|
||||
@@ -301,23 +297,20 @@ define find_all_clojure_files
|
||||
$$(comm -23 <(sort <(git ls-files --cached --others --exclude-standard)) <(sort <(git ls-files --deleted)) | grep -e \.clj$$ -e \.cljs$$ -e \.cljc$$ -e \.edn)
|
||||
endef
|
||||
|
||||
lint: export TARGET := clojure
|
||||
lint: export TARGET := default
|
||||
lint: ##@test Run code style checks
|
||||
@sh scripts/lint-re-frame-in-quo-components.sh && \
|
||||
clj-kondo --config .clj-kondo/config.edn --cache false --lint src && \
|
||||
ALL_CLOJURE_FILES=$(call find_all_clojure_files) && \
|
||||
zprint '{:search-config? true}' -sfc $$ALL_CLOJURE_FILES && \
|
||||
sh scripts/lint-trailing-newline.sh && \
|
||||
yarn prettier
|
||||
zprint '{:search-config? true}' -sfc $$ALL_CLOJURE_FILES
|
||||
|
||||
# NOTE: We run the linter twice because of https://github.com/kkinnear/zprint/issues/271
|
||||
lint-fix: export TARGET := clojure
|
||||
lint-fix: export TARGET := default
|
||||
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 && \
|
||||
sh scripts/lint-trailing-newline.sh --fix && \
|
||||
yarn prettier
|
||||
zprint '{:search-config? true}' -sw $$ALL_CLOJURE_FILES
|
||||
|
||||
|
||||
shadow-server: export TARGET := clojure
|
||||
shadow-server:##@ Start shadow-cljs in server mode for watching
|
||||
@@ -344,6 +337,14 @@ test: ##@test Run tests once in NodeJS
|
||||
yarn shadow-cljs compile test && \
|
||||
node --require ./test-resources/override.js target/test/test.js
|
||||
|
||||
|
||||
run-visual-test-ios: export TARGET := clojure
|
||||
run-visual-test-ios: XCODE_DERIVED_DATA := $(HOME)/Library/Developer/Xcode/DerivedData
|
||||
run-visual-test-ios: APPLICATION_NAME := StatusIm-brfnruzfrkkycpbndmdoeyrigthc
|
||||
run-visual-test-ios: export TEST_BINARY_PATH := $(XCODE_DERIVED_DATA)/$(APPLICATION_NAME)/Build/Products/Debug-iphonesimulator/StatusIm.app
|
||||
run-visual-test-ios: ##@test Run tests once in NodeJS
|
||||
detox test --configuration ios.sim.debug
|
||||
|
||||
component-test-watch: export TARGET := clojure
|
||||
component-test-watch: export COMPONENT_TEST := true
|
||||
component-test-watch: export BABEL_ENV := test
|
||||
|
||||
@@ -389,6 +389,17 @@ dependencies {
|
||||
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
|
||||
implementation "androidx.core:core-splashscreen:1.0.0"
|
||||
|
||||
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
|
||||
exclude group:'com.facebook.fbjni'
|
||||
}
|
||||
// TODO Uncomment once Flipper does not cause webview crashes in Debug mode
|
||||
// debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
|
||||
// exclude group:'com.facebook.flipper'
|
||||
// }
|
||||
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
|
||||
exclude group:'com.facebook.flipper'
|
||||
}
|
||||
|
||||
if (enableHermes) {
|
||||
//noinspection GradleDynamicVersion
|
||||
implementation("com.facebook.react:hermes-engine:+") { // From node_modules
|
||||
@@ -411,8 +422,8 @@ dependencies {
|
||||
implementation project(':react-native-status')
|
||||
implementation project(':react-native-status-keycard')
|
||||
implementation 'com.github.status-im:function:0.0.1'
|
||||
implementation 'com.facebook.fresco:fresco:2.5.0'
|
||||
implementation 'com.facebook.fresco:animated-gif:2.5.0'
|
||||
implementation 'com.facebook.fresco:fresco:2.2.0'
|
||||
implementation 'com.facebook.fresco:animated-gif:2.2.0'
|
||||
implementation "com.squareup.okhttp3:okhttp-tls:4.9.2"
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
|
||||
* directory of this source tree.
|
||||
*/
|
||||
package im.status.ethereum;
|
||||
|
||||
import android.content.Context;
|
||||
import com.facebook.flipper.android.AndroidFlipperClient;
|
||||
import com.facebook.flipper.android.utils.FlipperUtils;
|
||||
import com.facebook.flipper.core.FlipperClient;
|
||||
import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
|
||||
import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
|
||||
import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
|
||||
import com.facebook.flipper.plugins.inspector.DescriptorMapping;
|
||||
import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
|
||||
// import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
|
||||
// import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
|
||||
import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
|
||||
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
|
||||
import com.facebook.react.ReactInstanceManager;
|
||||
import com.facebook.react.bridge.ReactContext;
|
||||
import com.facebook.react.modules.network.NetworkingModule;
|
||||
import okhttp3.OkHttpClient;
|
||||
|
||||
public class ReactNativeFlipper {
|
||||
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
|
||||
if (FlipperUtils.shouldEnableFlipper(context)) {
|
||||
final FlipperClient client = AndroidFlipperClient.getInstance(context);
|
||||
|
||||
client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
|
||||
client.addPlugin(new ReactFlipperPlugin());
|
||||
client.addPlugin(new DatabasesFlipperPlugin(context));
|
||||
client.addPlugin(new SharedPreferencesFlipperPlugin(context));
|
||||
client.addPlugin(CrashReporterPlugin.getInstance());
|
||||
|
||||
// TODO Uncomment once Flipper does not cause webview crashes in Debug mode
|
||||
// NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
|
||||
// NetworkingModule.setCustomClientBuilder(
|
||||
// new NetworkingModule.CustomClientBuilder() {
|
||||
// @Override
|
||||
// public void apply(OkHttpClient.Builder builder) {
|
||||
// builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
|
||||
// }
|
||||
// });
|
||||
// client.addPlugin(networkFlipperPlugin);
|
||||
client.start();
|
||||
|
||||
// Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
|
||||
// Hence we run if after all native modules have been initialized
|
||||
ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
|
||||
if (reactContext == null) {
|
||||
reactInstanceManager.addReactInstanceEventListener(
|
||||
new ReactInstanceManager.ReactInstanceEventListener() {
|
||||
@Override
|
||||
public void onReactContextInitialized(ReactContext reactContext) {
|
||||
reactInstanceManager.removeReactInstanceEventListener(this);
|
||||
reactContext.runOnNativeModulesQueueThread(
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
client.addPlugin(new FrescoFlipperPlugin());
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
client.addPlugin(new FrescoFlipperPlugin());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -82,6 +82,36 @@ public class MainApplication extends NavigationApplication {
|
||||
OkHttpClientProvider.setOkHttpClientFactory(new StatusOkHttpClientFactory());
|
||||
|
||||
WebView.setWebContentsDebuggingEnabled(BuildConfig.DEBUG_WEBVIEW == "1");
|
||||
//initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
|
||||
}
|
||||
/**
|
||||
* Loads Flipper in React Native templates. Call this in the onCreate method with something like
|
||||
* initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
|
||||
*
|
||||
* @param context
|
||||
* @param reactInstanceManager
|
||||
*/
|
||||
private static void initializeFlipper(
|
||||
Context context, ReactInstanceManager reactInstanceManager) {
|
||||
if (BuildConfig.DEBUG) {
|
||||
try {
|
||||
/*
|
||||
We use reflection here to pick up the class that initializes Flipper,
|
||||
since Flipper library is not available in release mode
|
||||
*/
|
||||
Class<?> aClass = Class.forName("im.status.ethereum.ReactNativeFlipper");
|
||||
aClass
|
||||
.getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
|
||||
.invoke(null, context, reactInstanceManager);
|
||||
} catch (ClassNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
} catch (NoSuchMethodException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
} catch (InvocationTargetException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,8 +5,6 @@ import org.apache.tools.ant.taskdefs.condition.Os
|
||||
* Project-wide gradle configuration properties for use by all modules
|
||||
*/
|
||||
ext {
|
||||
// kotlin_version is needed for react-native-camera-kit library
|
||||
kotlin_version = project.kotlinVersion
|
||||
RNNKotlinVersion = "1.6.20"
|
||||
RNGH_kotlinVersion = "1.6.20"
|
||||
buildToolsVersion = project.buildToolsVersion
|
||||
|
||||
@@ -49,6 +49,11 @@ org.gradle.jvmargs=-Xmx8704M
|
||||
versionCode=9999
|
||||
commitHash=unknown
|
||||
|
||||
# Flipper
|
||||
FLIPPER_VERSION=0.54.0
|
||||
|
||||
|
||||
|
||||
# Use this property to enable support to the new architecture.
|
||||
# This will allow you to use TurboModules and the Fabric render in
|
||||
# your application. You should enable this flag either if you want
|
||||
|
||||
+23
-18
@@ -1,19 +1,24 @@
|
||||
module.exports = {
|
||||
presets: ['module:metro-react-native-babel-preset'],
|
||||
plugins: ['react-native-reanimated/plugin'],
|
||||
env: {
|
||||
test: {
|
||||
presets: [
|
||||
'@babel/preset-react',
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
targets: {
|
||||
node: '14',
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
"presets": [
|
||||
"module:metro-react-native-babel-preset"
|
||||
],
|
||||
"plugins": [
|
||||
"react-native-reanimated/plugin"
|
||||
],
|
||||
"env": {
|
||||
"test": {
|
||||
"presets": [
|
||||
'@babel/preset-react',
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
targets: {
|
||||
node: '14',
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,10 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.7.9'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux && x86_64 && nix-2.14' }
|
||||
agent { label 'linux && x86_64 && nix-2.11' }
|
||||
|
||||
options {
|
||||
timestamps()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.7.9'
|
||||
|
||||
pipeline {
|
||||
|
||||
+1
-2
@@ -1,11 +1,10 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.7.9'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
|
||||
pipeline {
|
||||
agent { label 'macos && arm64 && nix-2.14 && xcode-14.3' }
|
||||
agent { label 'macos && arm64 && nix-2.11 && xcode-14.3' }
|
||||
|
||||
parameters {
|
||||
string(
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.7.9'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux && x86_64 && nix-2.14' }
|
||||
agent { label 'linux && x86_64 && nix-2.11' }
|
||||
|
||||
options {
|
||||
timestamps()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.7.9'
|
||||
|
||||
pipeline {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.7.9'
|
||||
|
||||
pipeline {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.7.9'
|
||||
|
||||
pipeline {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.7.9'
|
||||
|
||||
pipeline {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.7.9'
|
||||
|
||||
pipeline {
|
||||
@@ -29,7 +28,7 @@ pipeline {
|
||||
timestamps()
|
||||
disableConcurrentBuilds()
|
||||
/* Prevent Jenkins jobs from running forever */
|
||||
timeout(time: 120, unit: 'MINUTES')
|
||||
timeout(time: 300, unit: 'MINUTES')
|
||||
/* Limit builds retained */
|
||||
buildDiscarder(logRotator(
|
||||
numToKeepStr: '20',
|
||||
@@ -42,19 +41,18 @@ 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)
|
||||
arch = sh(script: 'arch', returnStdout: true)
|
||||
uname = sh(script: 'uname', returnStdout: true)
|
||||
} }
|
||||
}
|
||||
stage('Build status-go') {
|
||||
steps { script {
|
||||
def platforms = ['mobile.android', 'mobile.ios', 'library']
|
||||
if (os != 'Darwin') { platforms.removeAll { it == 'mobile.ios' } }
|
||||
/* FIXME: Remove this when #16237 is merged. */
|
||||
if (arch == 'arm64') { platforms.removeAll { it == 'mobile.android' } }
|
||||
def platforms = ['mobile.android', 'mobile.ios']
|
||||
if (uname != "Darwin") {
|
||||
platforms.removeAll { it == "ios" }
|
||||
}
|
||||
platforms.each { os ->
|
||||
nix.build(
|
||||
attr: "targets.status-go.${os}",
|
||||
attr: "targets.status-go.${os}.buildInputs",
|
||||
sandbox: false,
|
||||
link: false
|
||||
)
|
||||
@@ -85,16 +83,12 @@ pipeline {
|
||||
}
|
||||
stage('Build nix shell deps') {
|
||||
steps { script {
|
||||
def shells = ['android', 'ios', 'fastlane', 'keytool', 'clojure', 'gradle']
|
||||
if (os != "Darwin") { shells.removeAll { it == 'ios' } }
|
||||
/* Build/fetch deps required to start default Nix shell. */
|
||||
shells.each { shell ->
|
||||
nix.build(
|
||||
attr: "shells.${shell}.buildInputs",
|
||||
sandbox: false,
|
||||
link: false
|
||||
)
|
||||
}
|
||||
nix.build(
|
||||
attr: 'shells.default.buildInputs',
|
||||
sandbox: false,
|
||||
link: false
|
||||
)
|
||||
} }
|
||||
}
|
||||
stage('Upload') {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.7.9'
|
||||
|
||||
pipeline {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env groovy
|
||||
/**
|
||||
* This job runs daily and executes `pod repo update` on MacOS
|
||||
* This is done to avoid issues with out of date repo causing errors like:
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.7.9'
|
||||
|
||||
pipeline {
|
||||
|
||||
@@ -45,4 +45,4 @@ The `State` field in the Pivotal story is used to track the progress of a Pivota
|
||||
| 5 points | 2 - 3 days |
|
||||
| 8 points | ~1 week |
|
||||
|
||||
We should avoid 8 point stories by breaking them down into smaller stories as much as possible.
|
||||
We should avoid 8 point stories by breaking them down into smaller stories as much as possible.
|
||||
@@ -1,31 +0,0 @@
|
||||
# 0014. Team-structure
|
||||
|
||||
| Date | Tags |
|
||||
|---|---|
|
||||
| 2023-06-16 | wallet team |
|
||||
|
||||
## Status
|
||||
|
||||
Proposed
|
||||
|
||||
## Context:
|
||||
|
||||
In order to try out vertical team, which is a structure that is wanted by the company, we will be creating a wallet team within the mobile team.
|
||||
Some member of the mobile team will join the current wallet team, which is composed by developers from desktop and lead by @alaibe, on a voluntary basis.
|
||||
The responsibilities of the team are to implement the new wallet UI, with the support of the current wallet team, which will be assisting with the status-go work.
|
||||
|
||||
## Decision
|
||||
|
||||
Some team members have already expressed interest and some have been asked and accepted to join the wallet team, these team members are:
|
||||
|
||||
- @rasom
|
||||
- @OmarBasem
|
||||
- @vkjr
|
||||
- @J-Son89
|
||||
- @briansztamfater
|
||||
- @smohamedjavid
|
||||
- @ulisesmac
|
||||
|
||||
# Follow-up Actions
|
||||
|
||||
- We still need 3/4 team members to join the wallet team
|
||||
@@ -1,46 +0,0 @@
|
||||
# 0015. Team-structure
|
||||
|
||||
| Date | Tags |
|
||||
|---|---|
|
||||
| 2023-06-16 | changes in team structure |
|
||||
|
||||
## Status
|
||||
|
||||
Proposed/partially implemented
|
||||
|
||||
## Context:
|
||||
|
||||
Currently, there is only a single team lead in the mobile development team, and after a meeting with the design team, it has been identified that the mobile app lacks polishness. One of the main issues identified is a lack of oversight in certain areas. To address this problem, it has been decided to create an additional role within the team. For each section of the mobile app (communities, syncing & onboarding, activity center & shell, wallet, messaging), a person will be selected to fulfill the responsibilities outlined below.
|
||||
|
||||
## Decision
|
||||
|
||||
The decision is to create an additional role within the mobile development team for each section. The individuals selected for these roles will have the following responsibilities:
|
||||
|
||||
- Ensure GitHub issues are created for new features/designs of the section.
|
||||
- Ensure issues are adequately described and linked as best as possible.
|
||||
- Ensure issues have a grooming session where other developers can provide their feedback before working on the set of issues.
|
||||
- Ensure all relevant parties are invited, such as designers, QA, Product Owner, leads, etc., as needed (including the designer who created the feature).
|
||||
- Ensure there is consensus among the developers working on the section about the decided strategy approach. Ideally, this consensus should be documented.
|
||||
- Ensure UI quality by organizing designer reviews and guaranteeing pixel perfection.
|
||||
- Ensure overall implementation is satisfactory based on the predefined requirements.
|
||||
- Ensure alignment between desktop, web, and mobile versions for the respective section in collaboration with the mobile developers and design team.
|
||||
- Act as a point of contact for the design team with respect to the section.
|
||||
- Ensure that someone goes through the designs once they are created with the respective designer.
|
||||
- Assist the design team with technical feasibility analysis and address any product concerns.
|
||||
- Facilitate the growth of the next team member into the role.
|
||||
|
||||
The people identified for each sections are as follow:
|
||||
|
||||
- Messaging @flexsurfer, followed by @alwx
|
||||
- Syncing & Onboarding @siddarthkay
|
||||
- Communities @ilmotta
|
||||
- Activity Center & Shell @J-Son89, followed by @Parveshdhull
|
||||
- Wallet (once the vertical team is created) @J-Son89, followed by @briansztamfater
|
||||
|
||||
This will be a rotating post, every 4 months it will go to the next in line.
|
||||
|
||||
The wallet team might have longer times for rotation, as stability might be more important. That's still to be decided.
|
||||
|
||||
# Follow-up Actions
|
||||
|
||||
- Find suitable next in line for Messaging, Onboarding, Communities
|
||||
+1
-1
@@ -169,7 +169,7 @@ For VS Code users.
|
||||
### Start and connect the REPL
|
||||
|
||||
1. Open the `status-mobile` folder.
|
||||
1. Start [Status development](starting-guide.md#development) (Starting the `run-clojure` and `run-metro` jobs in split view in the VS Code integrated terminal works great.)
|
||||
1. Start [Status development](STARTING_GUIDE.md#development) (Starting the `run-clojure` and `run-metro` jobs in split view in the VS Code integrated terminal works great.)
|
||||
1. Run the VS Code command: **Calva: Connect to a running REPL Server in the project**
|
||||
1. Select the project type `shadow-cljs`
|
||||
1. Accept the suggested connection `host:port`
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
import 'node-libs-react-native/globals';
|
||||
import './result/index.js';
|
||||
import "node-libs-react-native/globals";
|
||||
import "./result/index.js";
|
||||
|
||||
@@ -26,6 +26,7 @@ abstract_target 'Status' do
|
||||
:hermes_enabled => flags[:hermes_enabled],
|
||||
:fabric_enabled => flags[:fabric_enabled],
|
||||
:use_codegen_discovery => true,
|
||||
# :flipper_configuration => FlipperConfiguration.enabled,
|
||||
# An absolute path to your application root.
|
||||
:app_path => "#{Pod::Config.instance.installation_root}/.."
|
||||
)
|
||||
|
||||
+11
-11
@@ -247,6 +247,8 @@ PODS:
|
||||
- React-Core
|
||||
- react-native-blur (4.3.3):
|
||||
- React-Core
|
||||
- react-native-camera-kit (8.0.4):
|
||||
- React
|
||||
- react-native-cameraroll (4.0.4):
|
||||
- React-Core
|
||||
- react-native-config (1.5.0):
|
||||
@@ -346,8 +348,6 @@ PODS:
|
||||
- React-perflogger (= 0.69.10)
|
||||
- ReactNativeAudioToolkit (2.0.3):
|
||||
- React
|
||||
- ReactNativeCameraKit (13.0.0):
|
||||
- React-Core
|
||||
- ReactNativeNavigation (7.27.1):
|
||||
- HMSegmentedControl
|
||||
- React-Core
|
||||
@@ -421,7 +421,7 @@ PODS:
|
||||
- React-RCTText
|
||||
- ReactCommon/turbomodule/core
|
||||
- Yoga
|
||||
- RNShare (8.2.2):
|
||||
- RNShare (7.0.1):
|
||||
- React-Core
|
||||
- RNStaticSafeAreaInsets (2.2.0):
|
||||
- React-Core
|
||||
@@ -473,6 +473,7 @@ DEPENDENCIES:
|
||||
- react-native-background-timer (from `../node_modules/react-native-background-timer`)
|
||||
- react-native-blob-util (from `../node_modules/react-native-blob-util`)
|
||||
- "react-native-blur (from `../node_modules/@react-native-community/blur`)"
|
||||
- react-native-camera-kit (from `../node_modules/react-native-camera-kit`)
|
||||
- "react-native-cameraroll (from `../node_modules/@react-native-community/cameraroll`)"
|
||||
- react-native-config (from `../node_modules/react-native-config`)
|
||||
- react-native-image-resizer (from `../node_modules/react-native-image-resizer`)
|
||||
@@ -500,7 +501,6 @@ DEPENDENCIES:
|
||||
- React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`)
|
||||
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
|
||||
- "ReactNativeAudioToolkit (from `../node_modules/@react-native-community/audio-toolkit`)"
|
||||
- ReactNativeCameraKit (from `../node_modules/react-native-camera-kit`)
|
||||
- ReactNativeNavigation (from `../node_modules/react-native-navigation`)
|
||||
- "RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)"
|
||||
- "RNCClipboard (from `../node_modules/@react-native-community/clipboard`)"
|
||||
@@ -590,6 +590,8 @@ EXTERNAL SOURCES:
|
||||
:path: "../node_modules/react-native-blob-util"
|
||||
react-native-blur:
|
||||
:path: "../node_modules/@react-native-community/blur"
|
||||
react-native-camera-kit:
|
||||
:path: "../node_modules/react-native-camera-kit"
|
||||
react-native-cameraroll:
|
||||
:path: "../node_modules/@react-native-community/cameraroll"
|
||||
react-native-config:
|
||||
@@ -644,8 +646,6 @@ EXTERNAL SOURCES:
|
||||
:path: "../node_modules/react-native/ReactCommon"
|
||||
ReactNativeAudioToolkit:
|
||||
:path: "../node_modules/@react-native-community/audio-toolkit"
|
||||
ReactNativeCameraKit:
|
||||
:path: "../node_modules/react-native-camera-kit"
|
||||
ReactNativeNavigation:
|
||||
:path: "../node_modules/react-native-navigation"
|
||||
RNCAsyncStorage:
|
||||
@@ -707,7 +707,7 @@ SPEC CHECKSUMS:
|
||||
FBLazyVector: a8af91c2b5a0029d12ff6b32e428863d63c48991
|
||||
FBReactNativeSpec: 1b2309b096448a1dc9d0c43999216f8fda809ae8
|
||||
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
|
||||
glog: d93527a855523adb8c113837db4be68fb00e230d
|
||||
glog: 3a2d032685329b68abb308254142e4c875b6e40d
|
||||
HMSegmentedControl: 34c1f54d822d8308e7b24f5d901ec674dfa31352
|
||||
Keycard: ac6df4d91525c3c82635ac24d4ddd9a80aca5fc8
|
||||
libwebp: f62cb61d0a484ba548448a4bd52aabf150ff6eef
|
||||
@@ -730,6 +730,7 @@ SPEC CHECKSUMS:
|
||||
react-native-background-timer: 1f7d560647b40e6a60b01c452ba29c54bf581fc4
|
||||
react-native-blob-util: 600972b1782380a5a7d5db61a3817ea32349dae9
|
||||
react-native-blur: c6d0a1dc2b4b519f7afe3b14d8151998632b6d18
|
||||
react-native-camera-kit: 498a6d111a904834e0824e9073cfadef7303235f
|
||||
react-native-cameraroll: 88f4e62d9ecd0e1f253abe4f685474f2ea14bfa2
|
||||
react-native-config: 5330c8258265c1e5fdb8c009d2cabd6badd96727
|
||||
react-native-image-resizer: 2f1577efa3bc762597681f530c8e8d05ce0ceeb3
|
||||
@@ -757,7 +758,6 @@ SPEC CHECKSUMS:
|
||||
React-runtimeexecutor: 5ebf1ddaa706bf2986123f22d2cad905443c2c5f
|
||||
ReactCommon: 65754b8932ea80272714988268bbfb9f303264a5
|
||||
ReactNativeAudioToolkit: de9610f323e855ac6574be8c99621f3d57c5df06
|
||||
ReactNativeCameraKit: 9d46a5d7dd544ca64aa9c03c150d2348faf437eb
|
||||
ReactNativeNavigation: 94979dd1572a3f093fc85d4599360530a1bed8c8
|
||||
RNCAsyncStorage: b2489b49e38c85e10ed45a888d13a2a4c7b32ea1
|
||||
RNCClipboard: 8148e21ac347c51fd6cd4b683389094c216bb543
|
||||
@@ -772,8 +772,8 @@ SPEC CHECKSUMS:
|
||||
RNLanguages: 962e562af0d34ab1958d89bcfdb64fafc37c513e
|
||||
RNPermissions: ad71dd4f767ec254f2cd57592fbee02afee75467
|
||||
RNReactNativeHapticFeedback: 2566b468cc8d0e7bb2f84b23adc0f4614594d071
|
||||
RNReanimated: 43adb0307a62c1ce9694f36f124ca3b51a15272a
|
||||
RNShare: d82e10f6b7677f4b0048c23709bd04098d5aee6c
|
||||
RNReanimated: 06a228c5a245ef7b5b03f0efc29d76ce4db9031c
|
||||
RNShare: 2dc2fcac3f7321cfd6b60a23ed4bf4d549f86f5f
|
||||
RNStaticSafeAreaInsets: 055ddbf5e476321720457cdaeec0ff2ba40ec1b8
|
||||
RNSVG: 8ba35cbeb385a52fd960fd28db9d7d18b4c2974f
|
||||
SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d
|
||||
@@ -787,4 +787,4 @@ SPEC CHECKSUMS:
|
||||
|
||||
PODFILE CHECKSUM: a7c3cb360cf217ab90667d67deeab588677d540a
|
||||
|
||||
COCOAPODS: 1.12.1
|
||||
COCOAPODS: 1.12.0
|
||||
|
||||
@@ -59,6 +59,28 @@ extern "C" NSString* StatusgoImageServerTLSCert();
|
||||
+ (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler;
|
||||
@end
|
||||
|
||||
/*
|
||||
#if DEBUG
|
||||
#import <FlipperKit/FlipperClient.h>
|
||||
#import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>
|
||||
#import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>
|
||||
#import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>
|
||||
#import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h>
|
||||
#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>
|
||||
*/
|
||||
/*
|
||||
static void InitializeFlipper(UIApplication *application) {
|
||||
FlipperClient *client = [FlipperClient sharedClient];
|
||||
SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
|
||||
[client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]];
|
||||
[client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];
|
||||
[client addPlugin:[FlipperKitReactPlugin new]];
|
||||
[client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
|
||||
[client start];
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
|
||||
@implementation AppDelegate
|
||||
{
|
||||
UIView *_blankView;
|
||||
@@ -79,6 +101,9 @@ extern "C" NSString* StatusgoImageServerTLSCert();
|
||||
bridge.surfacePresenter = _bridgeAdapter.surfacePresenter;
|
||||
#endif
|
||||
|
||||
#if DEBUG
|
||||
//InitializeFlipper(application);
|
||||
#endif
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
NSURL *jsCodeLocation;
|
||||
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
}
|
||||
+11
-11
@@ -5,15 +5,15 @@
|
||||
* @format
|
||||
*/
|
||||
module.exports = {
|
||||
transformer: {
|
||||
getTransformOptions: async () => ({
|
||||
transform: {
|
||||
experimentalImportSupport: false,
|
||||
inlineRequires: true,
|
||||
},
|
||||
}),
|
||||
},
|
||||
resolver: {
|
||||
extraNodeModules: require('node-libs-react-native'),
|
||||
},
|
||||
transformer: {
|
||||
getTransformOptions: async () => ({
|
||||
transform: {
|
||||
experimentalImportSupport: false,
|
||||
inlineRequires: true,
|
||||
},
|
||||
}),
|
||||
},
|
||||
resolver: {
|
||||
extraNodeModules: require('node-libs-react-native'),
|
||||
},
|
||||
};
|
||||
|
||||
+1
-23
@@ -154,8 +154,8 @@ class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventL
|
||||
// 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);
|
||||
}
|
||||
|
||||
}
|
||||
private File getLogsFile() {
|
||||
final File pubDirectory = this.getPublicStorageDirectory();
|
||||
final File logFile = new File(pubDirectory, gethLogFileName);
|
||||
@@ -414,17 +414,6 @@ class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventL
|
||||
}
|
||||
}
|
||||
|
||||
@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 exportUnencryptedDatabase(final String accountData, final String password, final Callback callback) {
|
||||
Log.d(TAG, "login");
|
||||
@@ -1374,16 +1363,5 @@ class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventL
|
||||
}, callback);
|
||||
}
|
||||
|
||||
@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();
|
||||
executeRunnableStatusGoMethod(() -> Statusgo.initLogging(config), callback);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -623,14 +623,6 @@ RCT_EXPORT_METHOD(loginWithConfig:(NSString *)accountData
|
||||
NSLog(@"%@", result);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(loginAccount:(NSString *)request) {
|
||||
#if DEBUG
|
||||
NSLog(@"LoginAccount() method called");
|
||||
#endif
|
||||
NSString *result = StatusgoLoginAccount(request);
|
||||
NSLog(@"%@", result);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(loginWithKeycard:(NSString *)accountData
|
||||
password:(NSString *)password
|
||||
chatKey:(NSString *)chatKey) {
|
||||
@@ -906,37 +898,6 @@ RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(logFileDirectory) {
|
||||
return rootUrl.path;
|
||||
}
|
||||
|
||||
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_METHOD(generateAliasAsync:(NSString *)publicKey
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
#if DEBUG
|
||||
@@ -1156,7 +1117,23 @@ RCT_EXPORT_METHOD(deactivateKeepAwake)
|
||||
|
||||
- (NSString*) deviceName
|
||||
{
|
||||
return [[UIDevice currentDevice] name];;
|
||||
|
||||
NSString* deviceName = nil;
|
||||
|
||||
if ([self.deviceId rangeOfString:@"iPod"].location != NSNotFound) {
|
||||
deviceName = @"iPod Touch";
|
||||
}
|
||||
else if([self.deviceId rangeOfString:@"iPad"].location != NSNotFound) {
|
||||
deviceName = @"iPad";
|
||||
}
|
||||
else if([self.deviceId rangeOfString:@"iPhone"].location != NSNotFound){
|
||||
deviceName = @"iPhone";
|
||||
}
|
||||
else if([self.deviceId rangeOfString:@"AppleTV"].location != NSNotFound){
|
||||
deviceName = @"Apple TV";
|
||||
}
|
||||
|
||||
return deviceName;
|
||||
}
|
||||
|
||||
- (NSDictionary *)constantsToExport
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
var binary = require('@mapbox/node-pre-gyp');
|
||||
var path = require('path');
|
||||
var binding_path = binary.find(path.resolve(path.join(__dirname, './../../../package.json')));
|
||||
var binding_path = binary.find(path.resolve(path.join(__dirname,'./../../../package.json')));
|
||||
|
||||
module.exports = require(binding_path);
|
||||
|
||||
|
||||
@@ -1873,35 +1873,6 @@ void _ConnectionChange(const FunctionCallbackInfo<Value>& args) {
|
||||
ConnectionChange(arg0, arg1);
|
||||
}
|
||||
|
||||
void _InitLogging(const FunctionCallbackInfo<Value>& args) {
|
||||
Isolate* isolate = args.GetIsolate();
|
||||
Local<Context> context = isolate->GetCurrentContext();
|
||||
|
||||
if (args.Length() != 1) {
|
||||
// Throw an Error that is passed back to JavaScript
|
||||
isolate->ThrowException(Exception::TypeError(
|
||||
String::NewFromUtf8Literal(isolate, "Wrong number of arguments for InitLogging")));
|
||||
return;
|
||||
}
|
||||
|
||||
// Check the argument types
|
||||
if (!args[0]->IsString()) {
|
||||
isolate->ThrowException(Exception::TypeError(
|
||||
String::NewFromUtf8Literal(isolate, "Wrong argument type for 'logSettingsJSON'")));
|
||||
return;
|
||||
}
|
||||
|
||||
String::Utf8Value arg0Obj(isolate, args[0]->ToString(context).ToLocalChecked());
|
||||
char *arg0 = *arg0Obj;
|
||||
|
||||
// Call exported Go function, which returns a C string
|
||||
char *c = InitLogging(arg0);
|
||||
|
||||
Local<String> ret = String::NewFromUtf8(isolate, c).ToLocalChecked();
|
||||
args.GetReturnValue().Set(ret);
|
||||
delete c;
|
||||
}
|
||||
|
||||
|
||||
void init(Local<Object> exports) {
|
||||
NODE_SET_METHOD(exports, "multiAccountGenerateAndDeriveAddresses", _MultiAccountGenerateAndDeriveAddresses);
|
||||
@@ -1951,14 +1922,13 @@ void init(Local<Object> exports) {
|
||||
NODE_SET_METHOD(exports, "signTypedData", _SignTypedData);
|
||||
NODE_SET_METHOD(exports, "sendTransaction", _SendTransaction);
|
||||
NODE_SET_METHOD(exports, "appStateChange", _AppStateChange);
|
||||
NODE_SET_METHOD(exports, "setSignalEventCallback", _SetSignalEventCallback);
|
||||
NODE_SET_METHOD(exports, "setSignalEventCallback", _SetSignalEventCallback);
|
||||
NODE_SET_METHOD(exports, "validateNodeConfig", _ValidateNodeConfig);
|
||||
NODE_SET_METHOD(exports, "hashTypedData", _HashTypedData);
|
||||
NODE_SET_METHOD(exports, "recover", _Recover);
|
||||
NODE_SET_METHOD(exports, "hashTransaction", _HashTransaction);
|
||||
NODE_SET_METHOD(exports, "connectionChange", _ConnectionChange);
|
||||
NODE_SET_METHOD(exports, "pollSignal", _PollSignal);
|
||||
NODE_SET_METHOD(exports, "initLogging", _InitLogging);
|
||||
}
|
||||
|
||||
NODE_MODULE(NODE_GYP_MODULE_NAME, init)
|
||||
|
||||
@@ -18,4 +18,4 @@
|
||||
"url": "https://github.com/status-im/react-native-status/issues"
|
||||
},
|
||||
"homepage": "https://github.com/status-im/react-native-status#readme"
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,5 @@
|
||||
# Known Issues
|
||||
|
||||
## Ignoring Untrusted Substituter on NixOS
|
||||
|
||||
When using our setup on NixOS users can see this warning:
|
||||
```
|
||||
warning: ignoring untrusted substituter 'https://nix-cache.status.im/', you are not a trusted user.
|
||||
```
|
||||
Which is due to incorrect `trusted-users` setting:
|
||||
```
|
||||
> grep trusted-users /etc/nix/nix.conf
|
||||
trusted-users = root
|
||||
```
|
||||
Which can be extended using the [`nix.settings.trusted-users`](https://search.nixos.org/options?channel=23.05&show=nix.settings.trusted-users) option.
|
||||
|
||||
## Too many open files
|
||||
|
||||
### Single-User Installation
|
||||
|
||||
+616
-567
File diff suppressed because it is too large
Load Diff
+11
-34
@@ -16,10 +16,6 @@ androidx.arch.core:core-runtime:2.0.0
|
||||
androidx.arch.core:core-runtime:2.1.0
|
||||
androidx.asynclayoutinflater:asynclayoutinflater:1.0.0
|
||||
androidx.autofill:autofill:1.1.0
|
||||
androidx.camera:camera-camera2:1.1.0
|
||||
androidx.camera:camera-core:1.1.0
|
||||
androidx.camera:camera-lifecycle:1.1.0
|
||||
androidx.camera:camera-view:1.1.0
|
||||
androidx.cardview:cardview:1.0.0
|
||||
androidx.collection:collection:1.0.0
|
||||
androidx.collection:collection:1.1.0
|
||||
@@ -31,7 +27,6 @@ androidx.coordinatorlayout:coordinatorlayout:1.1.0
|
||||
androidx.core:core-ktx:1.6.0
|
||||
androidx.core:core-splashscreen:1.0.0
|
||||
androidx.core:core:1.1.0
|
||||
androidx.core:core:1.2.0
|
||||
androidx.core:core:1.6.0
|
||||
androidx.core:core:1.7.0
|
||||
androidx.cursoradapter:cursoradapter:1.0.0
|
||||
@@ -54,12 +49,9 @@ androidx.documentfile:documentfile:1.0.0
|
||||
androidx.drawerlayout:drawerlayout:1.0.0
|
||||
androidx.emoji2:emoji2-views-helper:1.0.0
|
||||
androidx.emoji2:emoji2:1.0.0
|
||||
androidx.exifinterface:exifinterface:1.0.0
|
||||
androidx.exifinterface:exifinterface:1.1.0-beta01
|
||||
androidx.exifinterface:exifinterface:1.1.0-rc01
|
||||
androidx.exifinterface:exifinterface:1.2.0
|
||||
androidx.exifinterface:exifinterface:1.3.2
|
||||
androidx.fragment:fragment:1.0.0
|
||||
androidx.fragment:fragment:1.1.0
|
||||
androidx.fragment:fragment:1.3.6
|
||||
androidx.interpolator:interpolator:1.0.0
|
||||
@@ -71,17 +63,14 @@ androidx.lifecycle:lifecycle-common:2.1.0
|
||||
androidx.lifecycle:lifecycle-common:2.3.1
|
||||
androidx.lifecycle:lifecycle-common:2.4.0
|
||||
androidx.lifecycle:lifecycle-livedata-core:2.0.0
|
||||
androidx.lifecycle:lifecycle-livedata-core:2.1.0
|
||||
androidx.lifecycle:lifecycle-livedata-core:2.3.1
|
||||
androidx.lifecycle:lifecycle-livedata:2.0.0
|
||||
androidx.lifecycle:lifecycle-livedata:2.1.0
|
||||
androidx.lifecycle:lifecycle-process:2.4.0
|
||||
androidx.lifecycle:lifecycle-runtime:2.0.0
|
||||
androidx.lifecycle:lifecycle-runtime:2.1.0
|
||||
androidx.lifecycle:lifecycle-runtime:2.3.1
|
||||
androidx.lifecycle:lifecycle-runtime:2.4.0
|
||||
androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1
|
||||
androidx.lifecycle:lifecycle-viewmodel:2.0.0
|
||||
androidx.lifecycle:lifecycle-viewmodel:2.1.0
|
||||
androidx.lifecycle:lifecycle-viewmodel:2.3.1
|
||||
androidx.loader:loader:1.0.0
|
||||
@@ -117,7 +106,7 @@ commons-codec:commons-codec:1.11
|
||||
commons-io:commons-io:2.4
|
||||
commons-logging:commons-logging:1.1.1
|
||||
commons-logging:commons-logging:1.2
|
||||
com.adobe.xmp:xmpcore:6.0.6
|
||||
com.adobe.xmp:xmpcore:5.1.2
|
||||
com.afollestad.material-dialogs:commons:0.9.6.0
|
||||
com.afollestad.material-dialogs:core:0.9.6.0
|
||||
com.airbnb.android:lottie:3.4.4
|
||||
@@ -444,14 +433,17 @@ com.diffplug.durian:durian-io:1.2.0
|
||||
com.diffplug.spotless:spotless-lib-extra:2.30.0
|
||||
com.diffplug.spotless:spotless-lib:2.30.0
|
||||
com.diffplug.spotless:spotless-plugin-gradle:6.11.0
|
||||
com.drewnoakes:metadata-extractor:2.12.0
|
||||
com.drewnoakes:metadata-extractor:2.9.1
|
||||
com.facebook.conceal:conceal:1.1.3
|
||||
com.facebook.fbjni:fbjni-java-only:0.2.2
|
||||
com.facebook.fresco:animated-base:2.5.0
|
||||
com.facebook.fresco:animated-drawable:2.5.0
|
||||
com.facebook.fresco:animated-gif:2.5.0
|
||||
com.facebook.flipper:flipper-fresco-plugin:0.54.0
|
||||
com.facebook.flipper:flipper:0.54.0
|
||||
com.facebook.fresco:animated-base:2.2.0
|
||||
com.facebook.fresco:animated-drawable:2.2.0
|
||||
com.facebook.fresco:animated-gif:2.2.0
|
||||
com.facebook.fresco:drawee:2.5.0
|
||||
com.facebook.fresco:fbcore:2.5.0
|
||||
com.facebook.fresco:flipper:2.2.0
|
||||
com.facebook.fresco:fresco:2.5.0
|
||||
com.facebook.fresco:imagepipeline-base:2.5.0
|
||||
com.facebook.fresco:imagepipeline-native:2.5.0
|
||||
@@ -464,6 +456,7 @@ com.facebook.fresco:middleware:2.5.0
|
||||
com.facebook.fresco:nativeimagefilters:2.5.0
|
||||
com.facebook.fresco:nativeimagetranscoder:2.5.0
|
||||
com.facebook.fresco:soloader:2.5.0
|
||||
com.facebook.fresco:stetho:2.2.0
|
||||
com.facebook.fresco:ui-common:2.5.0
|
||||
com.facebook.infer.annotation:infer-annotation:0.18.0
|
||||
com.facebook.soloader:annotation:0.10.3
|
||||
@@ -496,20 +489,11 @@ com.googlecode.concurrent-trees:concurrent-trees:2.6.1
|
||||
com.googlecode.javaewah:JavaEWAH:1.1.13
|
||||
com.googlecode.json-simple:json-simple:1.1
|
||||
com.googlecode.juniversalchardet:juniversalchardet:1.0.3
|
||||
com.google.android.datatransport:transport-api:2.2.1
|
||||
com.google.android.datatransport:transport-backend-cct:2.3.3
|
||||
com.google.android.datatransport:transport-runtime:2.2.6
|
||||
com.google.android.gms:play-services-basement:18.0.0
|
||||
com.google.android.gms:play-services-base:18.0.1
|
||||
com.google.android.gms:play-services-mlkit-barcode-scanning:18.0.0
|
||||
com.google.android.gms:play-services-tasks:18.0.1
|
||||
com.google.android.material:material:1.2.0-alpha03
|
||||
com.google.android.odml:image:1.0.0-beta1
|
||||
com.google.android:annotations:4.1.1.4
|
||||
com.google.api.grpc:proto-google-common-protos:1.12.0
|
||||
com.google.api.grpc:proto-google-common-protos:2.0.1
|
||||
com.google.auto.value:auto-value-annotations:1.6.2
|
||||
com.google.auto.value:auto-value-annotations:1.6.3
|
||||
com.google.auto.value:auto-value:1.5.2
|
||||
com.google.code.findbugs:jsr305:1.3.9
|
||||
com.google.code.findbugs:jsr305:3.0.2
|
||||
@@ -528,10 +512,6 @@ com.google.errorprone:error_prone_annotations:2.3.2
|
||||
com.google.errorprone:error_prone_annotations:2.3.4
|
||||
com.google.errorprone:error_prone_annotations:2.4.0
|
||||
com.google.errorprone:error_prone_annotations:2.7.1
|
||||
com.google.firebase:firebase-annotations:16.0.0
|
||||
com.google.firebase:firebase-components:16.1.0
|
||||
com.google.firebase:firebase-encoders-json:17.1.0
|
||||
com.google.firebase:firebase-encoders:16.1.0
|
||||
com.google.flatbuffers:flatbuffers-java:1.12.0
|
||||
com.google.guava:failureaccess:1.0.1
|
||||
com.google.guava:guava:17.0
|
||||
@@ -548,11 +528,6 @@ com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
|
||||
com.google.j2objc:j2objc-annotations:1.1
|
||||
com.google.j2objc:j2objc-annotations:1.3
|
||||
com.google.jimfs:jimfs:1.1
|
||||
com.google.mlkit:barcode-scanning-common:17.0.0
|
||||
com.google.mlkit:barcode-scanning:17.0.2
|
||||
com.google.mlkit:common:18.0.0
|
||||
com.google.mlkit:vision-common:17.0.0
|
||||
com.google.mlkit:vision-interfaces:16.0.0
|
||||
com.google.protobuf:protobuf-java-util:3.4.0
|
||||
com.google.protobuf:protobuf-java-util:3.10.0
|
||||
com.google.protobuf:protobuf-java-util:3.17.2
|
||||
@@ -562,7 +537,9 @@ com.google.protobuf:protobuf-java:3.10.0
|
||||
com.google.protobuf:protobuf-java:3.17.2
|
||||
com.google.testing.platform:core-proto:0.0.8-alpha07
|
||||
com.google.test.platform:core-proto:0.0.2-dev
|
||||
com.google.zxing:core:3.3.0
|
||||
com.intellij:annotations:12.0
|
||||
com.parse.bolts:bolts-applinks:1.4.0
|
||||
com.parse.bolts:bolts-tasks:1.4.0
|
||||
com.squareup.okhttp3:okhttp-tls:4.9.2
|
||||
com.squareup.okhttp3:okhttp-urlconnection:4.9.2
|
||||
|
||||
+53
-50
@@ -25,10 +25,6 @@ https://dl.google.com/dl/android/maven2/androidx/arch/core/core-runtime/2.0.0/co
|
||||
https://dl.google.com/dl/android/maven2/androidx/arch/core/core-runtime/2.1.0/core-runtime-2.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/asynclayoutinflater/asynclayoutinflater/1.0.0/asynclayoutinflater-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/autofill/autofill/1.1.0/autofill-1.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/camera/camera-camera2/1.1.0/camera-camera2-1.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/camera/camera-core/1.1.0/camera-core-1.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/camera/camera-lifecycle/1.1.0/camera-lifecycle-1.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/camera/camera-view/1.1.0/camera-view-1.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/cardview/cardview/1.0.0/cardview-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/collection/collection/1.0.0/collection-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/collection/collection/1.1.0/collection-1.1.0.pom
|
||||
@@ -46,7 +42,6 @@ https://dl.google.com/dl/android/maven2/androidx/core/core/1.1.0/core-1.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/core/core/1.2.0/core-1.2.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/core/core/1.3.0/core-1.3.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/core/core/1.3.1/core-1.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/core/core/1.3.2/core-1.3.2.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/core/core/1.5.0/core-1.5.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/core/core/1.6.0/core-1.6.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/core/core/1.7.0/core-1.7.0.pom
|
||||
@@ -72,11 +67,9 @@ https://dl.google.com/dl/android/maven2/androidx/documentfile/documentfile/1.0.0
|
||||
https://dl.google.com/dl/android/maven2/androidx/drawerlayout/drawerlayout/1.0.0/drawerlayout-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/emoji2/emoji2-views-helper/1.0.0/emoji2-views-helper-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/emoji2/emoji2/1.0.0/emoji2-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/exifinterface/exifinterface/1.0.0/exifinterface-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/exifinterface/exifinterface/1.1.0-beta01/exifinterface-1.1.0-beta01.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/exifinterface/exifinterface/1.1.0-rc01/exifinterface-1.1.0-rc01.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/exifinterface/exifinterface/1.2.0/exifinterface-1.2.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/exifinterface/exifinterface/1.3.2/exifinterface-1.3.2.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/fragment/fragment/1.0.0/fragment-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/fragment/fragment/1.1.0/fragment-1.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/fragment/fragment/1.3.6/fragment-1.3.6.pom
|
||||
@@ -89,10 +82,8 @@ https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-common/2.1.
|
||||
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-common/2.3.1/lifecycle-common-2.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-common/2.4.0/lifecycle-common-2.4.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-livedata-core/2.0.0/lifecycle-livedata-core-2.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-livedata-core/2.1.0/lifecycle-livedata-core-2.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-livedata-core/2.3.1/lifecycle-livedata-core-2.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-livedata/2.0.0/lifecycle-livedata-2.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-livedata/2.1.0/lifecycle-livedata-2.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-process/2.4.0/lifecycle-process-2.4.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-runtime/2.0.0/lifecycle-runtime-2.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-runtime/2.1.0/lifecycle-runtime-2.1.0.pom
|
||||
@@ -456,26 +447,8 @@ https://dl.google.com/dl/android/maven2/com/android/zipflinger/7.0.4/zipflinger-
|
||||
https://dl.google.com/dl/android/maven2/com/android/zipflinger/7.2.1/zipflinger-7.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/zipflinger/7.2.2/zipflinger-7.2.2.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/zipflinger/7.3.0/zipflinger-7.3.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/android/datatransport/transport-api/2.2.1/transport-api-2.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/android/datatransport/transport-backend-cct/2.3.3/transport-backend-cct-2.3.3.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/android/datatransport/transport-runtime/2.2.5/transport-runtime-2.2.5.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/android/datatransport/transport-runtime/2.2.6/transport-runtime-2.2.6.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-basement/18.0.0/play-services-basement-18.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-base/18.0.1/play-services-base-18.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-mlkit-barcode-scanning/18.0.0/play-services-mlkit-barcode-scanning-18.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-tasks/18.0.1/play-services-tasks-18.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/android/material/material/1.0.0/material-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/android/material/material/1.2.0-alpha03/material-1.2.0-alpha03.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/android/odml/image/1.0.0-beta1/image-1.0.0-beta1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-annotations/16.0.0/firebase-annotations-16.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-components/16.1.0/firebase-components-16.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-encoders-json/17.1.0/firebase-encoders-json-17.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-encoders/16.1.0/firebase-encoders-16.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/mlkit/barcode-scanning-common/17.0.0/barcode-scanning-common-17.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/mlkit/barcode-scanning/17.0.2/barcode-scanning-17.0.2.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/mlkit/common/18.0.0/common-18.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/mlkit/vision-common/17.0.0/vision-common-17.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/mlkit/vision-interfaces/16.0.0/vision-interfaces-16.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/testing/platform/core-proto/0.0.8-alpha04/core-proto-0.0.8-alpha04.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/testing/platform/core-proto/0.0.8-alpha07/core-proto-0.0.8-alpha07.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/test/platform/core-proto/0.0.2-dev/core-proto-0.0.2-dev.pom
|
||||
@@ -486,19 +459,29 @@ https://jitpack.io/com/github/status-im/status-keycard-java/lib/3.1.1/lib-3.1.1.
|
||||
https://jitpack.io/com/github/wix-playground/ahbottomnavigation/3.3.0/ahbottomnavigation-3.3.0.pom
|
||||
https://jitpack.io/com/github/wix-playground/reflow-animator/1.0.6/reflow-animator-1.0.6.pom
|
||||
https://jitpack.io/com/github/yalantis/ucrop/2.2.6-native/ucrop-2.2.6-native.pom
|
||||
https://plugins.gradle.org/m2/com/facebook/fresco/drawee/2.2.0/drawee-2.2.0.pom
|
||||
https://plugins.gradle.org/m2/com/facebook/fresco/fbcore/2.2.0/fbcore-2.2.0.pom
|
||||
https://plugins.gradle.org/m2/com/facebook/fresco/fresco/2.2.0/fresco-2.2.0.pom
|
||||
https://plugins.gradle.org/m2/com/facebook/fresco/imagepipeline-native/2.2.0/imagepipeline-native-2.2.0.pom
|
||||
https://plugins.gradle.org/m2/com/facebook/fresco/imagepipeline/2.2.0/imagepipeline-2.2.0.pom
|
||||
https://plugins.gradle.org/m2/com/facebook/fresco/memory-type-java/2.2.0/memory-type-java-2.2.0.pom
|
||||
https://plugins.gradle.org/m2/com/facebook/fresco/memory-type-native/2.2.0/memory-type-native-2.2.0.pom
|
||||
https://plugins.gradle.org/m2/com/facebook/fresco/nativeimagefilters/2.2.0/nativeimagefilters-2.2.0.pom
|
||||
https://plugins.gradle.org/m2/com/facebook/fresco/stetho/2.2.0/stetho-2.2.0.pom
|
||||
https://plugins.gradle.org/m2/org/jetbrains/kotlin/jvm/org.jetbrains.kotlin.jvm.gradle.plugin/1.6.10/org.jetbrains.kotlin.jvm.gradle.plugin-1.6.10.pom
|
||||
https://repo.maven.apache.org/maven2/antlr/antlr/2.7.1/antlr-2.7.1.pom
|
||||
https://repo.maven.apache.org/maven2/antlr/antlr/2.7.7/antlr-2.7.7.pom
|
||||
https://repo.maven.apache.org/maven2/commons-cli/commons-cli/1.2/commons-cli-1.2.pom
|
||||
https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.4/commons-codec-1.4.pom
|
||||
https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.6/commons-codec-1.6.pom
|
||||
https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.9/commons-codec-1.9.pom
|
||||
https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.10/commons-codec-1.10.pom
|
||||
https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.11/commons-codec-1.11.pom
|
||||
https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.16.0/commons-codec-1.16.0.pom
|
||||
https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.15/commons-codec-1.15.pom
|
||||
https://repo.maven.apache.org/maven2/commons-io/commons-io/2.4/commons-io-2.4.pom
|
||||
https://repo.maven.apache.org/maven2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.pom
|
||||
https://repo.maven.apache.org/maven2/commons-logging/commons-logging/1.2/commons-logging-1.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/adobe/xmp/xmpcore/6.0.6/xmpcore-6.0.6.pom
|
||||
https://repo.maven.apache.org/maven2/com/adobe/xmp/xmpcore/5.1.2/xmpcore-5.1.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/afollestad/material-dialogs/commons/0.9.6.0/commons-0.9.6.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/afollestad/material-dialogs/core/0.9.6.0/core-0.9.6.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/airbnb/android/lottie/3.4.4/lottie-3.4.4.pom
|
||||
@@ -563,34 +546,51 @@ https://repo.maven.apache.org/maven2/com/diffplug/durian/durian-io/1.2.0/durian-
|
||||
https://repo.maven.apache.org/maven2/com/diffplug/spotless/spotless-lib-extra/2.30.0/spotless-lib-extra-2.30.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/diffplug/spotless/spotless-lib/2.30.0/spotless-lib-2.30.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/diffplug/spotless/spotless-plugin-gradle/6.11.0/spotless-plugin-gradle-6.11.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/drewnoakes/metadata-extractor/2.12.0/metadata-extractor-2.12.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/drewnoakes/metadata-extractor/2.9.1/metadata-extractor-2.9.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/conceal/conceal/1.1.3/conceal-1.1.3.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/fbjni/fbjni-java-only/0.2.2/fbjni-java-only-0.2.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/fresco/animated-base/2.5.0/animated-base-2.5.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/fresco/animated-drawable/2.5.0/animated-drawable-2.5.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/fresco/animated-gif/2.5.0/animated-gif-2.5.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/fbjni/fbjni/0.0.2/fbjni-0.0.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/flipper/flipper-fresco-plugin/0.54.0/flipper-fresco-plugin-0.54.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/flipper/flipper/0.54.0/flipper-0.54.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/fresco/animated-base/2.2.0/animated-base-2.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/fresco/animated-drawable/2.2.0/animated-drawable-2.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/fresco/animated-gif/2.2.0/animated-gif-2.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/fresco/drawee/2.5.0/drawee-2.5.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/fresco/fbcore/2.5.0/fbcore-2.5.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/fresco/flipper/2.2.0/flipper-2.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/fresco/fresco/2.5.0/fresco-2.5.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/fresco/imagepipeline-base/2.2.0/imagepipeline-base-2.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/fresco/imagepipeline-base/2.5.0/imagepipeline-base-2.5.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/fresco/imagepipeline-native/2.5.0/imagepipeline-native-2.5.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/fresco/imagepipeline-okhttp3/2.5.0/imagepipeline-okhttp3-2.5.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/fresco/imagepipeline/2.5.0/imagepipeline-2.5.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/fresco/memory-type-ashmem/2.2.0/memory-type-ashmem-2.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/fresco/memory-type-ashmem/2.5.0/memory-type-ashmem-2.5.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/fresco/memory-type-java/2.5.0/memory-type-java-2.5.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/fresco/memory-type-native/2.5.0/memory-type-native-2.5.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/fresco/middleware/2.5.0/middleware-2.5.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/fresco/nativeimagefilters/2.5.0/nativeimagefilters-2.5.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/fresco/nativeimagetranscoder/2.2.0/nativeimagetranscoder-2.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/fresco/nativeimagetranscoder/2.5.0/nativeimagetranscoder-2.5.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/fresco/soloader/2.2.0/soloader-2.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/fresco/soloader/2.5.0/soloader-2.5.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/fresco/ui-common/2.2.0/ui-common-2.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/fresco/ui-common/2.5.0/ui-common-2.5.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/infer/annotation/infer-annotation/0.18.0/infer-annotation-0.18.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/soloader/annotation/0.8.2/annotation-0.8.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/soloader/annotation/0.9.0/annotation-0.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/soloader/annotation/0.10.1/annotation-0.10.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/soloader/annotation/0.10.3/annotation-0.10.3.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/soloader/nativeloader/0.8.0/nativeloader-0.8.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/soloader/nativeloader/0.8.2/nativeloader-0.8.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/soloader/nativeloader/0.9.0/nativeloader-0.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/soloader/nativeloader/0.10.1/nativeloader-0.10.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/soloader/nativeloader/0.10.3/nativeloader-0.10.3.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/soloader/soloader/0.8.2/soloader-0.8.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/soloader/soloader/0.9.0/soloader-0.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/soloader/soloader/0.10.1/soloader-0.10.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/soloader/soloader/0.10.3/soloader-0.10.3.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/stetho/stetho/1.3.1/stetho-1.3.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/yoga/proguard-annotations/1.19.0/proguard-annotations-1.19.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.11.1/jackson-annotations-2.11.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.15.2/jackson-annotations-2.15.2.pom
|
||||
@@ -631,15 +631,13 @@ https://repo.maven.apache.org/maven2/com/google/api/grpc/proto-google-common-pro
|
||||
https://repo.maven.apache.org/maven2/com/google/api/grpc/proto-google-common-protos/2.0.1/proto-google-common-protos-2.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/auto-parent/3/auto-parent-3.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/auto-parent/6/auto-parent-6.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/auto-parent/7/auto-parent-7.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/value/auto-value-annotations/1.6.2/auto-value-annotations-1.6.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/value/auto-value-annotations/1.6.3/auto-value-annotations-1.6.3.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/value/auto-value-annotations/1.10.1/auto-value-annotations-1.10.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/value/auto-value-parent/1.6.2/auto-value-parent-1.6.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/value/auto-value-parent/1.6.3/auto-value-parent-1.6.3.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/value/auto-value-parent/1.10.1/auto-value-parent-1.10.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/value/auto-value/1.5.2/auto-value-1.5.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/code/findbugs/jsr305/2.0.1/jsr305-2.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/code/findbugs/jsr305/3.0.1/jsr305-3.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/code/gson/gson-parent/2.7/gson-parent-2.7.pom
|
||||
@@ -665,7 +663,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.3.4/error_prone_annotations-2.3.4.pom
|
||||
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.20.0/error_prone_annotations-2.20.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.19.1/error_prone_annotations-2.19.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.0.18/error_prone_parent-2.0.18.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.2.0/error_prone_parent-2.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.3.1/error_prone_parent-2.3.1.pom
|
||||
@@ -673,7 +671,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.3.4/error_prone_parent-2.3.4.pom
|
||||
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.20.0/error_prone_parent-2.20.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.19.1/error_prone_parent-2.19.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/flatbuffers/flatbuffers-java/1.12.0/flatbuffers-java-1.12.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/google/1/google-1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.pom
|
||||
@@ -735,9 +733,12 @@ https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/3.10.0/
|
||||
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/3.13.0/protobuf-parent-3.13.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/3.17.2/protobuf-parent-3.17.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/4.0.0-rc-2/protobuf-parent-4.0.0-rc-2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/truth/truth-parent/1.1.5/truth-parent-1.1.5.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/truth/truth/1.1.5/truth-1.1.5.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/truth/truth-parent/1.1.4/truth-parent-1.1.4.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/truth/truth/1.1.4/truth-1.1.4.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/zxing/core/3.3.0/core-3.3.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/zxing/zxing-parent/3.3.0/zxing-parent-3.3.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/intellij/annotations/12.0/annotations-12.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/parse/bolts/bolts-applinks/1.4.0/bolts-applinks-1.4.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/parse/bolts/bolts-tasks/1.4.0/bolts-tasks-1.4.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/javapoet/1.8.0/javapoet-1.8.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/javapoet/1.10.0/javapoet-1.10.0.pom
|
||||
@@ -871,9 +872,9 @@ https://repo.maven.apache.org/maven2/javax/xml/stream/stax-api/1.0-2/stax-api-1.
|
||||
https://repo.maven.apache.org/maven2/junit/junit/4.12/junit-4.12.pom
|
||||
https://repo.maven.apache.org/maven2/junit/junit/4.13.2/junit-4.13.2.pom
|
||||
https://repo.maven.apache.org/maven2/me/zhanghai/android/materialprogressbar/library/1.4.2/library-1.4.2.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-agent/1.14.5/byte-buddy-agent-1.14.5.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-parent/1.14.5/byte-buddy-parent-1.14.5.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy/1.14.5/byte-buddy-1.14.5.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-agent/1.14.4/byte-buddy-agent-1.14.4.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-parent/1.14.4/byte-buddy-parent-1.14.4.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy/1.14.4/byte-buddy-1.14.4.pom
|
||||
https://repo.maven.apache.org/maven2/net/java/dev/jna/jna-platform/5.6.0/jna-platform-5.6.0.pom
|
||||
https://repo.maven.apache.org/maven2/net/java/dev/jna/jna/5.6.0/jna-5.6.0.pom
|
||||
https://repo.maven.apache.org/maven2/net/java/jvnet-parent/1/jvnet-parent-1.pom
|
||||
@@ -919,7 +920,7 @@ https://repo.maven.apache.org/maven2/org/apache/apache/15/apache-15.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/apache/16/apache-16.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/apache/18/apache-18.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/apache/21/apache-21.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/apache/29/apache-29.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/apache/23/apache-23.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/commons/commons-compress/1.12/commons-compress-1.12.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/commons/commons-compress/1.20/commons-compress-1.20.pom
|
||||
@@ -936,7 +937,7 @@ https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/35/common
|
||||
https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/39/commons-parent-39.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/42/commons-parent-42.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/48/commons-parent-48.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/58/commons-parent-58.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/52/commons-parent-52.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.1.1/httpclient-4.1.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.2.6/httpclient-4.2.6.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.5.2/httpclient-4.5.2.pom
|
||||
@@ -1103,7 +1104,7 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.4.32/
|
||||
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.9.0-RC/kotlin-reflect-1.9.0-RC.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.9.0-Beta/kotlin-reflect-1.9.0-Beta.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-scripting-common/1.6.10/kotlin-scripting-common-1.6.10.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-compiler-embeddable/1.6.10/kotlin-scripting-compiler-embeddable-1.6.10.pom
|
||||
@@ -1133,7 +1134,7 @@ 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.20/kotlin-stdlib-common-1.6.20.pom
|
||||
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.8.0/kotlin-stdlib-common-1.8.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.9.0-RC/kotlin-stdlib-common-1.9.0-RC.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.9.0-Beta/kotlin-stdlib-common-1.9.0-Beta.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
|
||||
@@ -1180,7 +1181,7 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.6.10/k
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.6.20/kotlin-stdlib-1.6.20.pom
|
||||
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.8.0/kotlin-stdlib-1.8.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.9.0-RC/kotlin-stdlib-1.9.0-RC.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.9.0-Beta/kotlin-stdlib-1.9.0-Beta.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-tooling-metadata/1.6.10/kotlin-tooling-metadata-1.6.10.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.10/kotlin-util-io-1.6.10.pom
|
||||
@@ -1191,7 +1192,7 @@ https://repo.maven.apache.org/maven2/org/jetbrains/markdown-jvm/0.2.1/markdown-j
|
||||
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
|
||||
https://repo.maven.apache.org/maven2/org/json/json/20180813/json-20180813.pom
|
||||
https://repo.maven.apache.org/maven2/org/json/json/20230618/json-20230618.pom
|
||||
https://repo.maven.apache.org/maven2/org/json/json/20230227/json-20230227.pom
|
||||
https://repo.maven.apache.org/maven2/org/jsoup/jsoup/1.13.1/jsoup-1.13.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/junit/junit-bom/5.9.2/junit-bom-5.9.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/junit/junit-bom/5.10.0-M1/junit-bom-5.10.0-M1.pom
|
||||
@@ -1199,7 +1200,7 @@ https://repo.maven.apache.org/maven2/org/jvnet/staxex/stax-ex/1.7.7/stax-ex-1.7.
|
||||
https://repo.maven.apache.org/maven2/org/jvnet/staxex/stax-ex/1.8.1/stax-ex-1.8.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/jvnet/staxex/stax-ex/1.8/stax-ex-1.8.pom
|
||||
https://repo.maven.apache.org/maven2/org/jvnet/staxex/stax-ex/2.1.0/stax-ex-2.1.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/mockito/mockito-core/5.4.0/mockito-core-5.4.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/mockito/mockito-core/5.3.1/mockito-core-5.3.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/objenesis/objenesis-parent/3.3/objenesis-parent-3.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/objenesis/objenesis/3.3/objenesis-3.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/5.0.3/asm-analysis-5.0.3.pom
|
||||
@@ -1244,9 +1245,11 @@ https://repo.maven.apache.org/maven2/org/ow2/asm/asm/9.5/asm-9.5.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/ow2/1.5.1/ow2-1.5.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/ow2/1.5/ow2-1.5.pom
|
||||
https://repo.maven.apache.org/maven2/org/slf4j/jcl-over-slf4j/2.0.7/jcl-over-slf4j-2.0.7.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.0.7/slf4j-api-2.0.7.pom
|
||||
https://repo.maven.apache.org/maven2/org/slf4j/slf4j-jdk14/2.0.7/slf4j-jdk14-2.0.7.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.0.7/slf4j-parent-2.0.7.pom
|
||||
|
||||
@@ -29,12 +29,12 @@ function gen_proj_list() {
|
||||
echo -e "Found ${GRN}$(wc -l < "${PROJ_LIST}")${RST} sub-projects..."
|
||||
}
|
||||
|
||||
# Check each sub-project in parallel, the "" is for local deps.
|
||||
# Check each sub-project in parallel, the ":" is for local deps.
|
||||
function gen_deps_list() {
|
||||
PROJECTS=$(cat "${PROJ_LIST}")
|
||||
# WARNING: The ${PROJECTS[@]} needs to remain unquoted to expand correctly.
|
||||
# shellcheck disable=SC2068
|
||||
"${CUR_DIR}/get_deps.sh" "" ${PROJECTS[@]} | sort -uV -o "${DEPS_LIST}"
|
||||
"${CUR_DIR}/get_deps.sh" ":" ${PROJECTS[@]} | sort -uV -o "${DEPS_LIST}"
|
||||
echo -e "${CLR}Found ${GRN}$(wc -l < "${DEPS_LIST}")${RST} direct dependencies..."
|
||||
}
|
||||
|
||||
@@ -52,8 +52,9 @@ function gen_deps_json() {
|
||||
# Format URLs into a Nix consumable file.
|
||||
URLS=$(cat "${DEPS_URLS}")
|
||||
# Avoid rate limiting by using 4 of the available threads.
|
||||
echo "${URLS}" | parallel --will-cite --keep-order --jobs 4 \
|
||||
parallel --will-cite --keep-order --jobs 4 \
|
||||
"${CUR_DIR}/url2json.sh" \
|
||||
::: "${URLS}" \
|
||||
>> "${DEPS_JSON}"
|
||||
|
||||
# Drop tailing comma on last object, stupid JSON
|
||||
|
||||
+3
-5
@@ -1,13 +1,11 @@
|
||||
# NOTE: If you are in Asia you might want to add https://nix-cache-cn.status.im/ to substituters.
|
||||
substituters = https://nix-cache.status.im/ https://cache.nixos.org/
|
||||
trusted-substituters = https://nix-cache.status.im/ https://cache.nixos.org/
|
||||
# NOTE: If you are in Asia you might want to add https://nix-cache-cn.status.im/ to extra-substituters
|
||||
extra-substituters = https://nix-cache.status.im/
|
||||
substituters = https://cache.nixos.org/
|
||||
trusted-public-keys = nix-cache.status.im-1:x/93lOfLU+duPplwMSBR+OlY4+mo+dCN7n0mr4oPwgY= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
|
||||
# Some downloads are multiple GB, default is 5 minutes
|
||||
stalled-download-timeout = 3600
|
||||
connect-timeout = 10
|
||||
max-jobs = auto
|
||||
# Build packages if fetching from cache fails.
|
||||
fallback = true
|
||||
# Helps avoid removing currently used dependencies via garbage collection
|
||||
keep-derivations = true
|
||||
keep-outputs = true
|
||||
|
||||
+13
-12
@@ -32,6 +32,18 @@ in {
|
||||
# For parsing gradle.properties into an attrset
|
||||
gradlePropParser = callPackage ./tools/gradlePropParser.nix { };
|
||||
|
||||
# Clojure formatting tool
|
||||
zprint = super.zprint.override rec {
|
||||
buildGraalvmNativeImage = args: super.buildGraalvmNativeImage ( args // rec {
|
||||
inherit (args) pname;
|
||||
version = "1.2.5";
|
||||
src = self.fetchurl {
|
||||
url = "https://github.com/kkinnear/${pname}/releases/download/${version}/${pname}-filter-${version}";
|
||||
sha256 = "sha256-PWdR5jqyzvTk9HoxqDldwtZNik34dmebBtZZ5vtva4A=";
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
# Fix for missing libarclite_macosx.a in Xcode 14.3.
|
||||
# https://github.com/ios-control/ios-deploy/issues/580
|
||||
ios-deploy = super.darwin.ios-deploy.overrideAttrs (old: rec {
|
||||
@@ -44,23 +56,12 @@ in {
|
||||
};
|
||||
});
|
||||
|
||||
# Checks fail on darwin.
|
||||
git-lfs = super.git-lfs.overrideAttrs (old: {
|
||||
doCheck = false;
|
||||
});
|
||||
|
||||
# Downgrade watchman in attempt to fix "too many files open issue"
|
||||
watchman = callPackage ./pkgs/watchman {
|
||||
inherit (super.darwin.apple_sdk.frameworks) CoreServices;
|
||||
autoconf = super.buildPackages.autoconf269;
|
||||
};
|
||||
|
||||
# Package version adjustments
|
||||
gradle = super.gradle_7;
|
||||
nodejs = super.nodejs-18_x;
|
||||
yarn = super.yarn.override { nodejs = super.nodejs-18_x; };
|
||||
openjdk = super.openjdk11_headless;
|
||||
xcodeWrapper = super.xcodeenv.composeXcodeWrapper {
|
||||
xcodeWrapper = callPackage ./pkgs/xcodeenv/compose-xcodewrapper.nix { } {
|
||||
version = "14.0";
|
||||
allowHigher = true;
|
||||
};
|
||||
|
||||
+11
-14
@@ -3,13 +3,21 @@
|
||||
{ config ? { } }:
|
||||
|
||||
let
|
||||
inherit (import <nixpkgs> { }) fetchFromGitHub;
|
||||
|
||||
# For testing local version of nixpkgs
|
||||
#nixpkgsSrc = (import <nixpkgs> { }).lib.cleanSource "/home/jakubgs/work/nixpkgs";
|
||||
|
||||
# We follow the master branch of official nixpkgs.
|
||||
nixpkgsSrc = builtins.fetchTarball {
|
||||
url = "https://github.com/NixOS/nixpkgs/archive/e7603eba51f2c7820c0a182c6bbb351181caa8e7.tar.gz";
|
||||
sha256 = "sha256:0mwck8jyr74wh1b7g6nac1mxy6a0rkppz8n12andsffybsipz5jw";
|
||||
nixpkgsSrc = fetchFromGitHub {
|
||||
name = "nixpkgs-source";
|
||||
# FIXME: Fork used to get Cocoapods 1.12.0 and apksigner macOS build.
|
||||
owner = "status-im";
|
||||
repo = "nixpkgs";
|
||||
rev = "d0c06fa3d3982a91aa01bd63ed84020cbde3d3ab";
|
||||
sha256 = "sha256-8blvuUHnuf0hFr/PpBxVohJp5CaGXIXhgJlFN/cv7us=";
|
||||
# To get the compressed Nix sha256, use:
|
||||
# nix-prefetch-url --unpack https://github.com/${ORG}/nixpkgs/archive/${REV}.tar.gz
|
||||
};
|
||||
|
||||
# Status specific configuration defaults
|
||||
@@ -17,20 +25,9 @@ let
|
||||
|
||||
# Override some packages and utilities
|
||||
pkgsOverlay = import ./overlay.nix;
|
||||
|
||||
# Fix for lack of Android SDK for M1 Macs.
|
||||
systemOverride = let
|
||||
inherit (builtins) currentSystem getEnv;
|
||||
envSystemOverride = getEnv "NIXPKGS_SYSTEM_OVERRIDE";
|
||||
in
|
||||
if envSystemOverride != "" then
|
||||
envSystemOverride
|
||||
else
|
||||
currentSystem;
|
||||
in
|
||||
# import nixpkgs with a config override
|
||||
(import nixpkgsSrc) {
|
||||
config = defaultConfig // config;
|
||||
system = systemOverride;
|
||||
overlays = [ pkgsOverlay ];
|
||||
}
|
||||
|
||||
@@ -3,17 +3,13 @@
|
||||
# for the Android development environment.
|
||||
#
|
||||
|
||||
{ androidenv, lib, stdenv }:
|
||||
|
||||
assert lib.assertMsg (stdenv.system != "aarch64-darwin")
|
||||
"aarch64-darwin not supported for Android SDK. Use: NIXPKGS_SYSTEM_OVERRIDE=x86_64-darwin";
|
||||
{ androidenv }:
|
||||
|
||||
# The "android-sdk-license" license is accepted
|
||||
# by setting android_sdk.accept_license = true.
|
||||
androidenv.composeAndroidPackages {
|
||||
cmdLineToolsVersion = "9.0";
|
||||
toolsVersion = "26.1.1";
|
||||
platformToolsVersion = "33.0.3";
|
||||
platformToolsVersion = "33.0.2";
|
||||
buildToolsVersions = [ "31.0.0" ];
|
||||
platformVersions = [ "31" ];
|
||||
cmakeVersions = [ "3.18.1" ];
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
{ mkShell, openjdk, androidPkgs }:
|
||||
{ mkShell, androidPkgs }:
|
||||
|
||||
mkShell {
|
||||
name = "android-sdk-shell";
|
||||
buildInputs = [ openjdk ];
|
||||
|
||||
shellHook = ''
|
||||
export ANDROID_HOME="${androidPkgs.sdk}"
|
||||
export ANDROID_NDK_ROOT="${androidPkgs.ndk}"
|
||||
export ANDROID_SDK_ROOT="$ANDROID_HOME"
|
||||
|
||||
export PATH="$ANDROID_HOME/bin:$PATH"
|
||||
export PATH="$ANDROID_NDK_ROOT:$PATH"
|
||||
export PATH="$ANDROID_SDK_ROOT/tools:$PATH"
|
||||
export PATH="$ANDROID_SDK_ROOT/tools/bin:$PATH"
|
||||
export PATH="$(echo $ANDROID_SDK_ROOT/cmdline-tools/*/bin):$PATH"
|
||||
export PATH="$ANDROID_SDK_ROOT/platform-tools:$PATH"
|
||||
export PATH="$ANDROID_SDK_ROOT/build-tools:$PATH"
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
# Issue
|
||||
|
||||
`watchman` was upgraded significantly during the last nixpkgs upgrade (`4.9.0` (Aug 16, 2017) to `2023.01.30.00` - 6 years between):
|
||||
- https://github.com/status-im/status-mobile/pull/14944
|
||||
- https://github.com/status-im/nixpkgs/commit/4e9c02bcc709fe1737a746add0e8e0109133d808
|
||||
|
||||
Probably causing developers to have "too many files open" issue:
|
||||
https://github.com/status-im/status-mobile/issues/16341
|
||||
|
||||
```
|
||||
Error: A non-recoverable condition has triggered. Watchman needs your help!
|
||||
The triggering condition was at timestamp=1687286390: opendir(/Users/javid/Projects/status-mobile/node_modules/metro-core/node_modules/jest-regex-util/build) -> Too many open files
|
||||
All requests will continue to fail with this message until you resolve
|
||||
the underlying problem. You will find more information on fixing this at
|
||||
https://facebook.github.io/watchman/docs/troubleshooting.html#poison-opendir
|
||||
```
|
||||
|
||||
# Fix
|
||||
This is an attempt to fix the issue by downgrading the watchman
|
||||
|
||||
# Upgrade
|
||||
When upgrading in the future, please read the comments:
|
||||
https://github.com/status-im/status-mobile/issues/16341
|
||||
@@ -1,48 +0,0 @@
|
||||
{ stdenv, lib, config, fetchFromGitHub, autoconf, automake, pcre
|
||||
, libtool, pkg-config, openssl
|
||||
, confFile ? config.watchman.confFile or null
|
||||
, withApple ? stdenv.isDarwin, CoreServices
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "watchman";
|
||||
version = "4.9.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "facebook";
|
||||
repo = "watchman";
|
||||
rev = "v${version}";
|
||||
sha256 = "0fdaj5pmicm6j17d5q7px800m5rmam1a400x3hv1iiifnmhgnkal";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoconf automake pkg-config libtool ];
|
||||
buildInputs = [ pcre openssl ]
|
||||
#++ lib.optionals withApple [ CoreServices ];
|
||||
++ lib.optionals stdenv.isDarwin [ CoreServices ];
|
||||
|
||||
configureFlags = [
|
||||
"--enable-lenient"
|
||||
"--enable-conffile=${if confFile == null then "no" else confFile}"
|
||||
"--with-pcre=yes"
|
||||
|
||||
# For security considerations re: --disable-statedir, see:
|
||||
# https://github.com/facebook/watchman/issues/178
|
||||
"--disable-statedir"
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
patchShebangs .
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
./autogen.sh
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Watches files and takes action when they change";
|
||||
homepage = "https://facebook.github.io/watchman";
|
||||
maintainers = with maintainers; [ cstrahan ];
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
license = licenses.asl20;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
{ stdenv }:
|
||||
|
||||
{ version ? "11.1"
|
||||
, allowHigher ? false
|
||||
, xcodeBaseDir ? "/Applications/Xcode.app" }:
|
||||
|
||||
assert stdenv.isDarwin;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "xcode-wrapper-${version}${if allowHigher then "-plus" else ""}";
|
||||
# Fix 'xcodebuild: Operation not permitted' when 'sandbox=relaxed' is used.
|
||||
# https://github.com/NixOS/nixpkgs/pull/228696
|
||||
__noChroot = stdenv.isDarwin;
|
||||
buildCommand = ''
|
||||
mkdir -p $out/bin
|
||||
cd $out/bin
|
||||
ln -s /usr/bin/xcode-select
|
||||
ln -s /usr/bin/security
|
||||
ln -s /usr/bin/codesign
|
||||
ln -s /usr/bin/xcrun
|
||||
ln -s /usr/bin/plutil
|
||||
ln -s /usr/bin/clang
|
||||
ln -s /usr/bin/lipo
|
||||
ln -s /usr/bin/file
|
||||
ln -s /usr/bin/rev
|
||||
ln -s "${xcodeBaseDir}/Contents/Developer/usr/bin/xcodebuild"
|
||||
ln -s "${xcodeBaseDir}/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator"
|
||||
|
||||
cd ..
|
||||
ln -s "${xcodeBaseDir}/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs"
|
||||
|
||||
# Check if we have the xcodebuild version that we want
|
||||
currVer=$($out/bin/xcodebuild -version)
|
||||
${if allowHigher then ''
|
||||
if [ -z "$(printf '%s\n' "${version}" "$currVer" | sort -V | head -n1)""" != "${version}" ]
|
||||
'' else ''
|
||||
if [ -z "$(echo $currVer | grep -x 'Xcode ${version}')" ]
|
||||
''}
|
||||
then
|
||||
echo "We require xcodebuild version${if allowHigher then " or higher" else ""}: ${version}"
|
||||
exit 1
|
||||
fi
|
||||
'';
|
||||
}
|
||||
@@ -25,7 +25,7 @@ cleanup() {
|
||||
|
||||
# If you want to clean after every build set _NIX_CLEAN=true
|
||||
if [[ -n "${_NIX_CLEAN}" ]]; then
|
||||
trap cleanup EXIT ERR INT QUIT
|
||||
trap cleanup EXIT ERR INT QUIT
|
||||
fi
|
||||
|
||||
# build output will end up under /nix, we have to extract it
|
||||
@@ -44,12 +44,6 @@ if [[ -z "${TARGET}" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Hack fix for missing Android SDK for aarch64 on Darwin. See systemOverride in `nix/pkgs.nix`.
|
||||
if [[ "${TARGET}" =~ ^(targets.status-go.mobile.android|targets.mobile.android.release)$ ]]; then
|
||||
os=$(uname -s | tr '[:upper:]' '[:lower:]')
|
||||
export NIXPKGS_SYSTEM_OVERRIDE="x86_64-${os}"
|
||||
fi
|
||||
|
||||
# Some defaults flags, --pure could be optional in the future.
|
||||
# NOTE: The --keep-failed flag can be used for debugging issues.
|
||||
nixOpts=(
|
||||
|
||||
+1
-42
@@ -1,6 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
GIT_ROOT=$(cd "${BASH_SOURCE%/*}" && git rev-parse --show-toplevel)
|
||||
|
||||
# Checking group ownership to identify installation type.
|
||||
file_group() {
|
||||
@@ -8,8 +6,7 @@ file_group() {
|
||||
if [[ "${UNAME}" == "Linux" ]]; then
|
||||
stat -Lc "%G" "${1}" 2>/dev/null
|
||||
elif [[ "${UNAME}" == "Darwin" ]]; then
|
||||
# Avoid using Nix GNU stat when in Nix shell.
|
||||
/usr/bin/stat -Lf "%Sg" "${1}" 2>/dev/null
|
||||
stat -Lf "%Sg" "${1}" 2>/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -51,41 +48,3 @@ nix_root() {
|
||||
fi
|
||||
echo "${NIX_ROOT}"
|
||||
}
|
||||
|
||||
nix_current_version() {
|
||||
nix-env --version | awk '{print $3}'
|
||||
}
|
||||
|
||||
nix_get_local_setting() {
|
||||
local NIX_LOCAL_CONFIG="${GIT_ROOT}/nix/nix.conf"
|
||||
local KEY="${1}"
|
||||
awk -F' = ' "/^${KEY} *=/{print \$2}" nix/nix.conf
|
||||
}
|
||||
|
||||
nix_set_global_setting() {
|
||||
local NIX_GLOBAL_CONFIG="/etc/nix/nix.conf"
|
||||
local KEY="${1}"
|
||||
local VAL="${2}"
|
||||
if grep "${KEY}" "${NIX_GLOBAL_CONFIG}" 2>/dev/null; then
|
||||
sed -i "s/${KEY} = \(.*\)$/${KEY} = ${VAL}/" "${NIX_GLOBAL_CONFIG}"
|
||||
else
|
||||
echo "${KEY} = ${VAL}" | sudo tee -a "${NIX_GLOBAL_CONFIG}" >/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
nix_daemon_restart() {
|
||||
# Restarting Nix Daemon makes sense only on a multi-user install.
|
||||
[[ $(nix_install_type) != "multi" ]] && return
|
||||
if [[ "$(uname -s)" == "Darwin" ]]; then
|
||||
echo "Restarting Nix daemon Launchd service..." >&2
|
||||
sudo launchctl unload /Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
sudo launchctl load /Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
elif [[ "$(uname -s)" == "Linux" ]] && [[ "$(nix_install_type)" == "multi" ]]; then
|
||||
echo "Restarting Nix daemon Systemd service..." >&2
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl restart nix-daemon
|
||||
else
|
||||
echo "Unknown platform! Unable to restart daemon!" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
+8
-20
@@ -3,11 +3,15 @@
|
||||
set -eo pipefail
|
||||
|
||||
GIT_ROOT=$(cd "${BASH_SOURCE%/*}" && git rev-parse --show-toplevel)
|
||||
source "${GIT_ROOT}/scripts/colors.sh"
|
||||
source "${GIT_ROOT}/nix/scripts/lib.sh"
|
||||
source "${GIT_ROOT}/nix/scripts/version.sh"
|
||||
source "${GIT_ROOT}/scripts/colors.sh"
|
||||
|
||||
nix_install() {
|
||||
NIX_VERSION="2.11.1"
|
||||
NIX_INSTALL_URL="https://nixos.org/releases/nix/nix-${NIX_VERSION}/install"
|
||||
NIX_INSTALL_SHA256="4569a01dc5f62056f29f3195673bc3242fc70bf2474927fb5d8549c4d997402d"
|
||||
NIX_INSTALL_PATH="/tmp/nix-install-${NIX_VERSION}"
|
||||
|
||||
install_nix() {
|
||||
# Download installer and verify SHA256>
|
||||
curl -sSf "${NIX_INSTALL_URL}" -o "${NIX_INSTALL_PATH}"
|
||||
echo "${NIX_INSTALL_SHA256} ${NIX_INSTALL_PATH}" | sha256sum -c
|
||||
@@ -38,22 +42,6 @@ nix_install() {
|
||||
echo "Please see: https://nixos.org/nix/manual/#chap-installation" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Additional fixes
|
||||
nix_add_extra_cache
|
||||
nix_daemon_restart
|
||||
}
|
||||
|
||||
# Adding directly to global config to avoid warnings like this:
|
||||
# "ignoring untrusted substituter 'https://nix-cache.status.im/', you are not a trusted user."
|
||||
nix_add_extra_cache() {
|
||||
# Single-user installations do not have this issue.
|
||||
[[ ! -f /etc/nix/nix.conf ]] && return
|
||||
echo -e 'Adding our cache to Nix daemon config...' >&2
|
||||
local NIX_SETTINGS=('substituters' 'trusted-substituters' 'trusted-public-keys')
|
||||
for NIX_SETTING in "${NIX_SETTINGS[@]}"; do
|
||||
nix_set_global_setting "${NIX_SETTING}" "$(nix_get_local_setting "${NIX_SETTING}")"
|
||||
done
|
||||
}
|
||||
|
||||
if [[ ! -x "$(command -v sha256sum)" ]]; then
|
||||
@@ -84,5 +72,5 @@ fi
|
||||
|
||||
# If none of the checks before succeeded we need to install Nix
|
||||
echo -e "${GRN}Setting up Nix package manager...${RST}"
|
||||
nix_install
|
||||
install_nix
|
||||
echo -e "${YLW}See STARTING_GUIDE.md if you're new here.${RST}"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#
|
||||
# This script is used by the Makefile to have an implicit nix-shell.
|
||||
# The following environment variables modify the script behavior:
|
||||
# - TARGET: This attribute is passed via --attr to Nix, defining the scope.
|
||||
@@ -63,12 +64,6 @@ if [[ -n "${_NIX_PURE}" ]]; then
|
||||
pureDesc='pure '
|
||||
fi
|
||||
|
||||
# Hack fix for missing Android SDK for aarch64 on Darwin. See systemOverride in `nix/pkgs.nix`.
|
||||
if [[ "${TARGET}" =~ ^(android-sdk|android|gradle|keytool|status-go)$ ]]; then
|
||||
os=$(uname -s | tr '[:upper:]' '[:lower:]')
|
||||
export NIXPKGS_SYSTEM_OVERRIDE="x86_64-${os}"
|
||||
fi
|
||||
|
||||
echo -e "${GRN}Configuring ${pureDesc}Nix shell for target '${TARGET}'...${RST}" 1>&2
|
||||
|
||||
# Save derivation from being garbage collected
|
||||
|
||||
@@ -12,7 +12,7 @@ source_nix_profile() {
|
||||
source "/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh"
|
||||
elif [[ "${NIX_INSTALL_TYPE}" == "single" ]]; then
|
||||
source "${HOME}/.nix-profile/etc/profile.d/nix.sh"
|
||||
elif [[ "${NIX_INSTALL_TYPE}" == "nixos" ]]; then
|
||||
elif [[ "${NIX_INSTALL_TYPE}" == "nixops" ]]; then
|
||||
echo "Sourcing profile not necessary on NixOS!" >&2
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# This script upgrades Nix to specific version.
|
||||
# https://nixos.org/manual/nix/stable/installation/upgrading.html
|
||||
set -eo pipefail
|
||||
|
||||
GIT_ROOT=$(cd "${BASH_SOURCE%/*}" && git rev-parse --show-toplevel)
|
||||
source "${GIT_ROOT}/scripts/colors.sh"
|
||||
source "${GIT_ROOT}/nix/scripts/lib.sh"
|
||||
source "${GIT_ROOT}/nix/scripts/source.sh"
|
||||
source "${GIT_ROOT}/nix/scripts/version.sh"
|
||||
|
||||
nix_upgrade() {
|
||||
echo -e "Upgrading Nix interpreter to: ${GRN}${NIX_VERSION}${RST}" >&2
|
||||
nix-channel --update
|
||||
nix-env --install --attr "nixpkgs.${NIX_PACKAGE}" "nixpkgs.cacert"
|
||||
nix_daemon_restart
|
||||
}
|
||||
|
||||
# Allow for sourcing the script
|
||||
if [[ "${BASH_SOURCE[0]}" != "$0" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ "$(nix_current_version)" == "${NIX_VERSION}" ]]; then
|
||||
echo -e "Nix interpreter already on version: ${GRN}${NIX_VERSION}${RST}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
NIX_INSTALL_TYPE=$(nix_install_type)
|
||||
if [[ "${NIX_INSTALL_TYPE}" == "nixos" ]]; then
|
||||
echo -e "${YLW}WARNING:${RST} Upgrade Nix in your NixOS configuration!" >&2
|
||||
exit 0
|
||||
elif [[ "${NIX_INSTALL_TYPE}" == "single" ]]; then
|
||||
nix_upgrade
|
||||
elif [[ "${NIX_INSTALL_TYPE}" == "multi" ]]; then
|
||||
sudo -i bash -c "source ${PWD}/${0}; nix_upgrade"
|
||||
fi
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# WARNING: Versions 2.14, 2.15, 2.16 have an issue creating gcroots:
|
||||
# https://github.com/NixOS/nix/issues/8564
|
||||
export NIX_VERSION="2.13.4"
|
||||
export NIX_PACKAGE="nixVersions.nix_2_13"
|
||||
export NIX_INSTALL_URL="https://nixos.org/releases/nix/nix-${NIX_VERSION}/install"
|
||||
export NIX_INSTALL_SHA256="a9908cc48f5886b4f22172bdd2f9657873276fd295e78c6ed97fb308c6d284d0"
|
||||
export NIX_INSTALL_PATH="/tmp/nix-install-${NIX_VERSION}"
|
||||
+15
-20
@@ -10,26 +10,21 @@ let
|
||||
in mkShell {
|
||||
name = "status-mobile-shell"; # for identifying all shells
|
||||
|
||||
buildInputs = let
|
||||
appleSDKFrameworks = (with pkgs.darwin.apple_sdk.frameworks; [
|
||||
IOKit CoreServices
|
||||
]);
|
||||
in
|
||||
with pkgs; lib.unique ([
|
||||
# core utilities that should always be present in a shell
|
||||
bash curl wget file unzip flock procps
|
||||
git gnumake jq ncurses gnugrep parallel
|
||||
lsof # used in start-react-native.sh
|
||||
# build specific utilities
|
||||
clojure maven watchman
|
||||
# lint specific utilities
|
||||
clj-kondo zprint
|
||||
# other nice to have stuff
|
||||
yarn nodejs python310
|
||||
] # and some special cases
|
||||
++ lib.optionals stdenv.isDarwin ([ cocoapods clang tcl ] ++ appleSDKFrameworks)
|
||||
++ lib.optionals (!stdenv.isDarwin) [ gcc8 ]
|
||||
);
|
||||
buildInputs = with pkgs; lib.unique ([
|
||||
# core utilities that should always be present in a shell
|
||||
bash curl wget file unzip flock procps
|
||||
git gnumake jq ncurses gnugrep parallel
|
||||
lsof # used in start-react-native.sh
|
||||
# build specific utilities
|
||||
clojure maven watchman
|
||||
# lint specific utilities
|
||||
clj-kondo zprint
|
||||
# other nice to have stuff
|
||||
yarn nodejs python27
|
||||
] # and some special cases
|
||||
++ lib.optionals stdenv.isDarwin [ cocoapods clang tcl ]
|
||||
++ lib.optionals (!stdenv.isDarwin) [ gcc8 ]
|
||||
);
|
||||
|
||||
# avoid terminal issues
|
||||
TERM="xterm";
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ let
|
||||
|
||||
# for 'scripts/generate-keystore.sh'
|
||||
keytool = mkShell {
|
||||
buildInputs = with pkgs; [ openjdk apksigner ];
|
||||
buildInputs = with pkgs; [ openjdk11 apksigner ];
|
||||
};
|
||||
|
||||
# for targets needing 'adb', 'apkanalyzer' and other SDK/NDK tools
|
||||
|
||||
+4
-5
@@ -10,8 +10,7 @@
|
||||
"app:compile:android": "shadow-cljs compile android",
|
||||
"app:watch": "shadow-cljs watch android",
|
||||
"app:packager": "react-native start --host 0.0.0.0 --port 8081",
|
||||
"app:android": "react-native run-android",
|
||||
"prettier": "node_modules/.bin/prettier --write ."
|
||||
"app:android": "react-native run-android"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/preset-typescript": "^7.17.12",
|
||||
@@ -37,11 +36,11 @@
|
||||
"node-libs-react-native": "^1.2.1",
|
||||
"qrcode": "^1.4.1",
|
||||
"react": "18.0.0",
|
||||
"react-dom": "18.0.0",
|
||||
"react-dom": "^16.4.2",
|
||||
"react-native": "0.69.10",
|
||||
"react-native-background-timer": "^2.1.1",
|
||||
"react-native-blob-util": "^0.13.18",
|
||||
"react-native-camera-kit": "^13.0.0",
|
||||
"react-native-camera-kit": "^8.0.4",
|
||||
"react-native-config": "^1.5.0",
|
||||
"react-native-dialogs": "^1.0.4",
|
||||
"react-native-draggable-flatlist": "^3.0.3",
|
||||
@@ -90,12 +89,12 @@
|
||||
"@testing-library/react-native": "^11.2.0",
|
||||
"@types/jest": "^28.1.6",
|
||||
"concurrently": "^7.6.0",
|
||||
"detox": "^19.9.1",
|
||||
"jest": "^26.6.3",
|
||||
"jest-circus": "^26.0.0",
|
||||
"jest-image-snapshot": "^5.1.0",
|
||||
"nodemon": "^2.0.16",
|
||||
"nyc": "^14.1.1",
|
||||
"prettier": "^2.8.8",
|
||||
"process": "0.11.10",
|
||||
"react-test-renderer": "18.0.0",
|
||||
"rn-snoopy": "git+https://github.com/status-im/rn-snoopy.git#refs/tags/v2.0.2-status",
|
||||
|
||||
+28
-28
@@ -1,31 +1,31 @@
|
||||
module.exports = {
|
||||
dependencies: {
|
||||
'react-native-config': {
|
||||
platforms: {
|
||||
ios: null,
|
||||
},
|
||||
dependencies: {
|
||||
'react-native-config': {
|
||||
platforms: {
|
||||
ios: null,
|
||||
},
|
||||
},
|
||||
'react-native-dialogs': {
|
||||
platforms: {
|
||||
android: null,
|
||||
ios: null,
|
||||
},
|
||||
},
|
||||
'react-native-image-resizer': {
|
||||
platforms: {
|
||||
ios: null,
|
||||
},
|
||||
},
|
||||
'react-native-status-keycard': {
|
||||
platforms: {
|
||||
android: null,
|
||||
ios: null,
|
||||
},
|
||||
},
|
||||
'@react-native-community/blur': {
|
||||
platforms: {
|
||||
android: null,
|
||||
},
|
||||
},
|
||||
},
|
||||
'react-native-dialogs': {
|
||||
platforms: {
|
||||
android: null,
|
||||
ios: null,
|
||||
},
|
||||
},
|
||||
'react-native-image-resizer': {
|
||||
platforms: {
|
||||
ios: null,
|
||||
},
|
||||
},
|
||||
'react-native-status-keycard': {
|
||||
platforms: {
|
||||
android: null,
|
||||
ios: null,
|
||||
},
|
||||
},
|
||||
'@react-native-community/blur': {
|
||||
platforms: {
|
||||
android: null,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -194,4 +194,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 593 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.0 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 111 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 210 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 242 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 520 KiB |
+365
-361
@@ -1,372 +1,376 @@
|
||||
(function () {
|
||||
if (typeof EthereumProvider === 'undefined') {
|
||||
var callbackId = 0;
|
||||
var callbacks = {};
|
||||
if (typeof EthereumProvider === "undefined") {
|
||||
var callbackId = 0;
|
||||
var callbacks = {};
|
||||
|
||||
var bridgeSend = function (data) {
|
||||
ReactNativeWebView.postMessage(JSON.stringify(data));
|
||||
};
|
||||
|
||||
var history = window.history;
|
||||
var pushState = history.pushState;
|
||||
history.pushState = function (state) {
|
||||
setTimeout(function () {
|
||||
bridgeSend({
|
||||
type: 'history-state-changed',
|
||||
navState: { url: location.href, title: document.title },
|
||||
});
|
||||
}, 100);
|
||||
return pushState.apply(history, arguments);
|
||||
};
|
||||
|
||||
function sendAPIrequest(permission, params) {
|
||||
var messageId = callbackId++;
|
||||
var params = params || {};
|
||||
|
||||
bridgeSend({
|
||||
type: 'api-request',
|
||||
permission: permission,
|
||||
messageId: messageId,
|
||||
params: params,
|
||||
});
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
params['resolve'] = resolve;
|
||||
params['reject'] = reject;
|
||||
callbacks[messageId] = params;
|
||||
});
|
||||
}
|
||||
|
||||
function qrCodeResponse(data, callback) {
|
||||
var result = data.data;
|
||||
var regex = new RegExp(callback.regex);
|
||||
if (!result) {
|
||||
if (callback.reject) {
|
||||
callback.reject(new Error('Cancelled'));
|
||||
var bridgeSend = function (data) {
|
||||
ReactNativeWebView.postMessage(JSON.stringify(data));
|
||||
}
|
||||
} else if (regex.test(result)) {
|
||||
if (callback.resolve) {
|
||||
callback.resolve(result);
|
||||
}
|
||||
} else {
|
||||
if (callback.reject) {
|
||||
callback.reject(new Error("Doesn't match"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Unauthorized() {
|
||||
this.name = 'Unauthorized';
|
||||
this.id = 4100;
|
||||
this.code = 4100;
|
||||
this.message = 'The requested method and/or account has not been authorized by the user.';
|
||||
}
|
||||
|
||||
Unauthorized.prototype = Object.create(Error.prototype);
|
||||
|
||||
function UserRejectedRequest() {
|
||||
this.name = 'UserRejectedRequest';
|
||||
this.id = 4001;
|
||||
this.code = 4001;
|
||||
this.message = 'The user rejected the request.';
|
||||
}
|
||||
|
||||
UserRejectedRequest.prototype = Object.create(Error.prototype);
|
||||
ReactNativeWebView.onMessage = function (message) {
|
||||
data = JSON.parse(message);
|
||||
var id = data.messageId;
|
||||
var callback = callbacks[id];
|
||||
|
||||
if (callback) {
|
||||
if (data.type === 'api-response') {
|
||||
if (data.permission == 'qr-code') {
|
||||
qrCodeResponse(data, callback);
|
||||
} else if (data.isAllowed) {
|
||||
if (data.permission == 'web3') {
|
||||
var selectedAddress = data.data[0];
|
||||
window.statusAppcurrentAccountAddress = selectedAddress;
|
||||
// Set deprecated metamask fields
|
||||
window.ethereum.selectedAddress = selectedAddress;
|
||||
window.ethereum.emit('accountsChanged', data.data);
|
||||
}
|
||||
callback.resolve(data.data);
|
||||
} else {
|
||||
callback.reject(new UserRejectedRequest());
|
||||
}
|
||||
} else if (data.type === 'web3-send-async-callback') {
|
||||
if (callback.beta) {
|
||||
if (data.error) {
|
||||
if (data.error.code == 4100) callback.reject(new Unauthorized());
|
||||
else callback.reject(data.error);
|
||||
} else {
|
||||
if (window.statusAppDebug) {
|
||||
console.log('resolve ' + callback.method + ' :' + JSON.stringify(data.result.result));
|
||||
}
|
||||
callback.resolve(data.result.result);
|
||||
}
|
||||
} else if (callback.results) {
|
||||
callback.results.push(data.error || data.result);
|
||||
if (callback.results.length == callback.num) callback.callback(undefined, callback.results);
|
||||
} else {
|
||||
callback.callback(data.error, data.result);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function web3SuccessResponse(payload, result) {
|
||||
return {
|
||||
id: payload.id,
|
||||
jsonrpc: '2.0',
|
||||
method: payload.method,
|
||||
result: result,
|
||||
};
|
||||
}
|
||||
|
||||
function web3ErrorResponse(payload, error) {
|
||||
return {
|
||||
id: payload.id,
|
||||
jsonrpc: '2.0',
|
||||
method: payload.method,
|
||||
error: error,
|
||||
};
|
||||
}
|
||||
|
||||
function getSyncResponse(payload) {
|
||||
if (payload.method == 'eth_accounts' && typeof window.statusAppcurrentAccountAddress !== 'undefined') {
|
||||
return web3SuccessResponse(payload, [window.statusAppcurrentAccountAddress]);
|
||||
} else if (payload.method == 'eth_coinbase' && typeof window.statusAppcurrentAccountAddress !== 'undefined') {
|
||||
return web3SuccessResponse(payload, window.statusAppcurrentAccountAddress);
|
||||
} else if (payload.method == 'net_version') {
|
||||
return web3SuccessResponse(payload, window.statusAppNetworkId);
|
||||
} else if (payload.method == 'eth_chainId') {
|
||||
return web3SuccessResponse(payload, '0x' + Number(window.statusAppNetworkId).toString(16));
|
||||
} else if (payload.method == 'eth_uninstallFilter') {
|
||||
return web3SuccessResponse(payload, true);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
var StatusAPI = function () {};
|
||||
|
||||
StatusAPI.prototype.getContactCode = function () {
|
||||
return sendAPIrequest('contact-code');
|
||||
};
|
||||
|
||||
var EthereumProvider = function () {};
|
||||
|
||||
EthereumProvider.prototype.isStatus = true;
|
||||
EthereumProvider.prototype.status = new StatusAPI();
|
||||
EthereumProvider.prototype.isConnected = function () {
|
||||
return true;
|
||||
};
|
||||
// Set legacy metamask fields https://docs.metamask.io/guide/ethereum-provider.html#legacy-api
|
||||
EthereumProvider.prototype.networkVersion = window.statusAppNetworkId;
|
||||
EthereumProvider.prototype.chainId = '0x' + Number(window.statusAppNetworkId).toString(16);
|
||||
|
||||
EthereumProvider.prototype._events = {};
|
||||
|
||||
EthereumProvider.prototype.on = function (name, listener) {
|
||||
if (!this._events[name]) {
|
||||
this._events[name] = [];
|
||||
}
|
||||
this._events[name].push(listener);
|
||||
};
|
||||
|
||||
EthereumProvider.prototype.removeListener = function (name, listenerToRemove) {
|
||||
if (!this._events[name]) {
|
||||
return;
|
||||
}
|
||||
|
||||
const filterListeners = (listener) => listener !== listenerToRemove;
|
||||
this._events[name] = this._events[name].filter(filterListeners);
|
||||
};
|
||||
|
||||
EthereumProvider.prototype.removeAllListeners = function () {
|
||||
this._events = {};
|
||||
};
|
||||
|
||||
EthereumProvider.prototype.emit = function (name, data) {
|
||||
if (!this._events[name]) {
|
||||
return;
|
||||
}
|
||||
this._events[name].forEach((cb) => {
|
||||
// Fixes: https://github.com/status-im/status-mobile/issues/13642
|
||||
// Metamask also errors on the same issue, but it's using https://github.com/MetaMask/safe-event-emitter and therefore the dapp still works
|
||||
try {
|
||||
cb(data);
|
||||
} catch (e) {
|
||||
setTimeout(() => {
|
||||
throw e;
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
EthereumProvider.prototype.enable = function () {
|
||||
if (window.statusAppDebug) {
|
||||
console.log('enable');
|
||||
}
|
||||
return sendAPIrequest('web3');
|
||||
};
|
||||
|
||||
EthereumProvider.prototype.scanQRCode = function (regex) {
|
||||
return sendAPIrequest('qr-code', { regex: regex });
|
||||
};
|
||||
|
||||
EthereumProvider.prototype.request = function (requestArguments) {
|
||||
if (window.statusAppDebug) {
|
||||
console.log('request: ' + JSON.stringify(requestArguments));
|
||||
}
|
||||
if (!requestArguments) {
|
||||
return Promise.reject(new Error('Request is not valid.'));
|
||||
}
|
||||
var method = requestArguments.method;
|
||||
if (!method) {
|
||||
return Promise.reject(new Error('Request is not valid.'));
|
||||
}
|
||||
|
||||
if (method === 'eth_requestAccounts') {
|
||||
return sendAPIrequest('web3');
|
||||
}
|
||||
|
||||
var syncResponse = getSyncResponse({ method: method });
|
||||
if (syncResponse) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
if (window.statusAppDebug) {
|
||||
console.log('resolved sync method: ' + method + ', result: ' + JSON.stringify(syncResponse.result));
|
||||
}
|
||||
resolve(syncResponse.result);
|
||||
});
|
||||
}
|
||||
|
||||
var messageId = callbackId++;
|
||||
var payload = {
|
||||
id: messageId,
|
||||
jsonrpc: '2.0',
|
||||
method: method,
|
||||
params: requestArguments.params,
|
||||
};
|
||||
|
||||
bridgeSend({
|
||||
type: 'web3-send-async-read-only',
|
||||
messageId: messageId,
|
||||
payload: payload,
|
||||
});
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
callbacks[messageId] = {
|
||||
beta: true,
|
||||
method: method,
|
||||
resolve: resolve,
|
||||
reject: reject,
|
||||
var history = window.history;
|
||||
var pushState = history.pushState;
|
||||
history.pushState = function (state) {
|
||||
setTimeout(function () {
|
||||
bridgeSend({
|
||||
type: 'history-state-changed',
|
||||
navState: {url: location.href, title: document.title}
|
||||
});
|
||||
}, 100);
|
||||
return pushState.apply(history, arguments);
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
// (DEPRECATED) Support for legacy send method
|
||||
EthereumProvider.prototype.send = function (param1, param2) {
|
||||
// reference: https://docs.metamask.io/guide/ethereum-provider.html#legacy-methods
|
||||
if (typeof param1 == 'object') {
|
||||
//maybe ways of:
|
||||
//1.ethereum.send(payload: JsonRpcRequest, callback: JsonRpcCallback): void;
|
||||
//2.ethereum.send(payload: JsonRpcRequest): unknown;
|
||||
if (window.statusAppDebug) {
|
||||
console.log('send (legacy), payload: ' + JSON.stringify(param1) + ', callback: ' + param2);
|
||||
}
|
||||
function sendAPIrequest(permission, params) {
|
||||
var messageId = callbackId++;
|
||||
var params = params || {};
|
||||
|
||||
var syncResponse = getSyncResponse(param1);
|
||||
if (syncResponse) {
|
||||
if (param2) {
|
||||
param2(null, syncResponse);
|
||||
return;
|
||||
} else return syncResponse;
|
||||
}
|
||||
|
||||
this.request(param1).then(
|
||||
(result) => {
|
||||
if (param2) {
|
||||
param2(null, web3SuccessResponse(param1, result));
|
||||
}
|
||||
},
|
||||
(reason) => {
|
||||
if (window.statusAppDebug) {
|
||||
console.log('send (legacy) failed. payload: ' + JSON.stringify(param1) + ', reason: ' + reason);
|
||||
}
|
||||
if (param2) {
|
||||
param2(reason, web3ErrorResponse(param1, reason));
|
||||
}
|
||||
},
|
||||
);
|
||||
} else if (typeof param1 == 'string') {
|
||||
var method = param1;
|
||||
var params = param2;
|
||||
if (window.statusAppDebug) {
|
||||
console.log('send (legacy), method: ' + method + ', params: ' + JSON.stringify(params));
|
||||
}
|
||||
return this.request({ method: method, params: params });
|
||||
} else {
|
||||
throw new Error('unsupported call to send, param1: ' + param1 + ', param2: ' + param2);
|
||||
}
|
||||
};
|
||||
|
||||
// (DEPRECATED) Support for legacy sendSync method
|
||||
EthereumProvider.prototype.sendSync = function (payload) {
|
||||
if (window.statusAppDebug) {
|
||||
console.log('sendSync (legacy)' + JSON.stringify(payload));
|
||||
}
|
||||
if (payload.method == 'eth_uninstallFilter') {
|
||||
this.sendAsync(payload, function (res, err) {});
|
||||
}
|
||||
var syncResponse = getSyncResponse(payload);
|
||||
if (syncResponse) {
|
||||
return syncResponse;
|
||||
} else {
|
||||
return web3SuccessResponse(payload, null);
|
||||
}
|
||||
};
|
||||
|
||||
// (DEPRECATED) Support for legacy sendAsync method
|
||||
EthereumProvider.prototype.sendAsync = function (payload, callback) {
|
||||
if (window.statusAppDebug) {
|
||||
console.log('sendAsync (legacy)' + JSON.stringify(payload));
|
||||
}
|
||||
if (!payload) {
|
||||
return new Error('Request is not valid.');
|
||||
}
|
||||
if (payload.method == 'eth_requestAccounts') {
|
||||
return sendAPIrequest('web3');
|
||||
}
|
||||
var syncResponse = getSyncResponse(payload);
|
||||
if (syncResponse && callback) {
|
||||
callback(null, syncResponse);
|
||||
} else {
|
||||
var messageId = callbackId++;
|
||||
|
||||
if (Array.isArray(payload)) {
|
||||
callbacks[messageId] = {
|
||||
num: payload.length,
|
||||
results: [],
|
||||
callback: callback,
|
||||
};
|
||||
for (var i in payload) {
|
||||
bridgeSend({
|
||||
type: 'web3-send-async-read-only',
|
||||
messageId: messageId,
|
||||
payload: payload[i],
|
||||
type: 'api-request',
|
||||
permission: permission,
|
||||
messageId: messageId,
|
||||
params: params
|
||||
});
|
||||
}
|
||||
} else {
|
||||
callbacks[messageId] = { callback: callback };
|
||||
bridgeSend({
|
||||
type: 'web3-send-async-read-only',
|
||||
messageId: messageId,
|
||||
payload: payload,
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
window.ethereum = new EthereumProvider();
|
||||
return new Promise(function (resolve, reject) {
|
||||
params['resolve'] = resolve;
|
||||
params['reject'] = reject;
|
||||
callbacks[messageId] = params;
|
||||
});
|
||||
}
|
||||
|
||||
function qrCodeResponse(data, callback) {
|
||||
var result = data.data;
|
||||
var regex = new RegExp(callback.regex);
|
||||
if (!result) {
|
||||
if (callback.reject) {
|
||||
callback.reject(new Error("Cancelled"));
|
||||
}
|
||||
} else if (regex.test(result)) {
|
||||
if (callback.resolve) {
|
||||
callback.resolve(result);
|
||||
}
|
||||
} else {
|
||||
if (callback.reject) {
|
||||
callback.reject(new Error("Doesn't match"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Unauthorized() {
|
||||
this.name = "Unauthorized";
|
||||
this.id = 4100;
|
||||
this.code = 4100;
|
||||
this.message = "The requested method and/or account has not been authorized by the user.";
|
||||
}
|
||||
|
||||
Unauthorized.prototype = Object.create(Error.prototype);
|
||||
|
||||
function UserRejectedRequest() {
|
||||
this.name = "UserRejectedRequest";
|
||||
this.id = 4001;
|
||||
this.code = 4001;
|
||||
this.message = "The user rejected the request.";
|
||||
}
|
||||
|
||||
UserRejectedRequest.prototype = Object.create(Error.prototype);
|
||||
ReactNativeWebView.onMessage = function (message) {
|
||||
data = JSON.parse(message);
|
||||
var id = data.messageId;
|
||||
var callback = callbacks[id];
|
||||
|
||||
if (callback) {
|
||||
if (data.type === "api-response") {
|
||||
if (data.permission == 'qr-code') {
|
||||
qrCodeResponse(data, callback);
|
||||
} else if (data.isAllowed) {
|
||||
if (data.permission == 'web3') {
|
||||
var selectedAddress = data.data[0]
|
||||
window.statusAppcurrentAccountAddress = selectedAddress;
|
||||
// Set deprecated metamask fields
|
||||
window.ethereum.selectedAddress = selectedAddress;
|
||||
window.ethereum.emit("accountsChanged", data.data);
|
||||
}
|
||||
callback.resolve(data.data);
|
||||
} else {
|
||||
callback.reject(new UserRejectedRequest());
|
||||
}
|
||||
} else if (data.type === "web3-send-async-callback") {
|
||||
if (callback.beta) {
|
||||
if (data.error) {
|
||||
if (data.error.code == 4100)
|
||||
callback.reject(new Unauthorized());
|
||||
else
|
||||
callback.reject(data.error);
|
||||
} else {
|
||||
if (window.statusAppDebug) {
|
||||
console.log("resolve " + callback.method + " :" + JSON.stringify(data.result.result));
|
||||
}
|
||||
callback.resolve(data.result.result);
|
||||
}
|
||||
} else if (callback.results) {
|
||||
callback.results.push(data.error || data.result);
|
||||
if (callback.results.length == callback.num)
|
||||
callback.callback(undefined, callback.results);
|
||||
} else {
|
||||
callback.callback(data.error, data.result);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function web3SuccessResponse(payload, result) {
|
||||
return {
|
||||
id: payload.id,
|
||||
jsonrpc: "2.0",
|
||||
method: payload.method,
|
||||
result: result
|
||||
};
|
||||
}
|
||||
|
||||
function web3ErrorResponse(payload, error) {
|
||||
return {
|
||||
id: payload.id,
|
||||
jsonrpc: "2.0",
|
||||
method: payload.method,
|
||||
error: error
|
||||
};
|
||||
}
|
||||
|
||||
function getSyncResponse(payload) {
|
||||
if (payload.method == "eth_accounts" && (typeof window.statusAppcurrentAccountAddress !== "undefined")) {
|
||||
return web3SuccessResponse(payload, [window.statusAppcurrentAccountAddress])
|
||||
} else if (payload.method == "eth_coinbase" && (typeof window.statusAppcurrentAccountAddress !== "undefined")) {
|
||||
return web3SuccessResponse(payload, window.statusAppcurrentAccountAddress)
|
||||
} else if (payload.method == "net_version") {
|
||||
return web3SuccessResponse(payload, window.statusAppNetworkId)
|
||||
} else if (payload.method == "eth_chainId") {
|
||||
return web3SuccessResponse(payload, "0x" + Number(window.statusAppNetworkId).toString(16))
|
||||
} else if (payload.method == "eth_uninstallFilter") {
|
||||
return web3SuccessResponse(payload, true);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
var StatusAPI = function () {
|
||||
};
|
||||
|
||||
StatusAPI.prototype.getContactCode = function () {
|
||||
return sendAPIrequest('contact-code');
|
||||
};
|
||||
|
||||
var EthereumProvider = function () {
|
||||
};
|
||||
|
||||
EthereumProvider.prototype.isStatus = true;
|
||||
EthereumProvider.prototype.status = new StatusAPI();
|
||||
EthereumProvider.prototype.isConnected = function () {
|
||||
return true;
|
||||
};
|
||||
// Set legacy metamask fields https://docs.metamask.io/guide/ethereum-provider.html#legacy-api
|
||||
EthereumProvider.prototype.networkVersion = window.statusAppNetworkId;
|
||||
EthereumProvider.prototype.chainId = "0x" + Number(window.statusAppNetworkId).toString(16);
|
||||
|
||||
EthereumProvider.prototype._events = {};
|
||||
|
||||
EthereumProvider.prototype.on = function (name, listener) {
|
||||
if (!this._events[name]) {
|
||||
this._events[name] = [];
|
||||
}
|
||||
this._events[name].push(listener);
|
||||
}
|
||||
|
||||
EthereumProvider.prototype.removeListener = function (name, listenerToRemove) {
|
||||
if (!this._events[name]) {
|
||||
return
|
||||
}
|
||||
|
||||
const filterListeners = (listener) => listener !== listenerToRemove;
|
||||
this._events[name] = this._events[name].filter(filterListeners);
|
||||
}
|
||||
|
||||
EthereumProvider.prototype.removeAllListeners = function () {
|
||||
this._events = {};
|
||||
}
|
||||
|
||||
EthereumProvider.prototype.emit = function (name, data) {
|
||||
if (!this._events[name]) {
|
||||
return
|
||||
}
|
||||
this._events[name].forEach(cb => {
|
||||
// Fixes: https://github.com/status-im/status-mobile/issues/13642
|
||||
// Metamask also errors on the same issue, but it's using https://github.com/MetaMask/safe-event-emitter and therefore the dapp still works
|
||||
try {
|
||||
cb(data)
|
||||
} catch (e) {
|
||||
setTimeout((() => {
|
||||
throw e
|
||||
}))
|
||||
}
|
||||
});
|
||||
}
|
||||
EthereumProvider.prototype.enable = function () {
|
||||
if (window.statusAppDebug) {
|
||||
console.log("enable");
|
||||
}
|
||||
return sendAPIrequest('web3');
|
||||
};
|
||||
|
||||
EthereumProvider.prototype.scanQRCode = function (regex) {
|
||||
return sendAPIrequest('qr-code', {regex: regex});
|
||||
};
|
||||
|
||||
EthereumProvider.prototype.request = function (requestArguments) {
|
||||
if (window.statusAppDebug) {
|
||||
console.log("request: " + JSON.stringify(requestArguments));
|
||||
}
|
||||
if (!requestArguments) {
|
||||
return Promise.reject(new Error('Request is not valid.'));
|
||||
}
|
||||
var method = requestArguments.method;
|
||||
if (!method) {
|
||||
return Promise.reject(new Error('Request is not valid.'));
|
||||
}
|
||||
|
||||
if (method === 'eth_requestAccounts') {
|
||||
return sendAPIrequest('web3');
|
||||
}
|
||||
|
||||
var syncResponse = getSyncResponse({method: method});
|
||||
if (syncResponse) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
if (window.statusAppDebug) {
|
||||
console.log("resolved sync method: " + method + ", result: " + JSON.stringify(syncResponse.result));
|
||||
}
|
||||
resolve(syncResponse.result);
|
||||
});
|
||||
}
|
||||
|
||||
var messageId = callbackId++;
|
||||
var payload = {
|
||||
id: messageId,
|
||||
jsonrpc: "2.0",
|
||||
method: method,
|
||||
params: requestArguments.params
|
||||
};
|
||||
|
||||
bridgeSend({
|
||||
type: 'web3-send-async-read-only',
|
||||
messageId: messageId,
|
||||
payload: payload
|
||||
});
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
callbacks[messageId] = {
|
||||
beta: true,
|
||||
method: method,
|
||||
resolve: resolve,
|
||||
reject: reject
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
// (DEPRECATED) Support for legacy send method
|
||||
EthereumProvider.prototype.send = function (param1, param2) {
|
||||
// reference: https://docs.metamask.io/guide/ethereum-provider.html#legacy-methods
|
||||
if (typeof param1 == 'object') {
|
||||
//maybe ways of:
|
||||
//1.ethereum.send(payload: JsonRpcRequest, callback: JsonRpcCallback): void;
|
||||
//2.ethereum.send(payload: JsonRpcRequest): unknown;
|
||||
if (window.statusAppDebug) {
|
||||
console.log("send (legacy), payload: " + JSON.stringify(param1) + ", callback: " + param2);
|
||||
}
|
||||
|
||||
var syncResponse = getSyncResponse(param1);
|
||||
if(syncResponse){
|
||||
if(param2){
|
||||
param2(null, syncResponse);
|
||||
return;
|
||||
}else
|
||||
return syncResponse;
|
||||
}
|
||||
|
||||
this.request(param1).then(result => {
|
||||
if (param2) {
|
||||
param2(null, web3SuccessResponse(param1, result));
|
||||
}
|
||||
}, reason => {
|
||||
if (window.statusAppDebug) {
|
||||
console.log("send (legacy) failed. payload: " + JSON.stringify(param1) + ", reason: " + reason)
|
||||
}
|
||||
if (param2) {
|
||||
param2(reason, web3ErrorResponse(param1, reason))
|
||||
}
|
||||
});
|
||||
} else if (typeof param1 == 'string') {
|
||||
var method = param1;
|
||||
var params = param2;
|
||||
if (window.statusAppDebug) {
|
||||
console.log("send (legacy), method: " + method + ", params: " + JSON.stringify(params));
|
||||
}
|
||||
return this.request({method: method, params: params});
|
||||
} else {
|
||||
throw new Error("unsupported call to send, param1: " + param1 + ", param2: " + param2)
|
||||
}
|
||||
}
|
||||
|
||||
// (DEPRECATED) Support for legacy sendSync method
|
||||
EthereumProvider.prototype.sendSync = function (payload) {
|
||||
if (window.statusAppDebug) {
|
||||
console.log("sendSync (legacy)" + JSON.stringify(payload));
|
||||
}
|
||||
if (payload.method == "eth_uninstallFilter") {
|
||||
this.sendAsync(payload, function (res, err) {
|
||||
})
|
||||
}
|
||||
var syncResponse = getSyncResponse(payload);
|
||||
if (syncResponse) {
|
||||
return syncResponse;
|
||||
} else {
|
||||
return web3SuccessResponse(payload, null);
|
||||
}
|
||||
};
|
||||
|
||||
// (DEPRECATED) Support for legacy sendAsync method
|
||||
EthereumProvider.prototype.sendAsync = function (payload, callback) {
|
||||
if (window.statusAppDebug) {
|
||||
console.log("sendAsync (legacy)" + JSON.stringify(payload));
|
||||
}
|
||||
if (!payload) {
|
||||
return new Error('Request is not valid.');
|
||||
}
|
||||
if (payload.method == 'eth_requestAccounts') {
|
||||
return sendAPIrequest('web3');
|
||||
}
|
||||
var syncResponse = getSyncResponse(payload);
|
||||
if (syncResponse && callback) {
|
||||
callback(null, syncResponse);
|
||||
} else {
|
||||
var messageId = callbackId++;
|
||||
|
||||
if (Array.isArray(payload)) {
|
||||
callbacks[messageId] = {
|
||||
num: payload.length,
|
||||
results: [],
|
||||
callback: callback
|
||||
};
|
||||
for (var i in payload) {
|
||||
bridgeSend({
|
||||
type: 'web3-send-async-read-only',
|
||||
messageId: messageId,
|
||||
payload: payload[i]
|
||||
});
|
||||
}
|
||||
} else {
|
||||
callbacks[messageId] = {callback: callback};
|
||||
bridgeSend({
|
||||
type: 'web3-send-async-read-only',
|
||||
messageId: messageId,
|
||||
payload: payload
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
window.ethereum = new EthereumProvider();
|
||||
})();
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,33 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
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)$')
|
||||
N_FILES=$(echo "$FILES" | wc -l)
|
||||
LINT_SHOULD_FIX=0
|
||||
|
||||
if [[ -n $1 && $1 != '--fix' ]]; then
|
||||
echo "Unknown option '$1'" >&2
|
||||
exit 1
|
||||
elif [[ $1 == '--fix' ]]; then
|
||||
LINT_SHOULD_FIX=1
|
||||
fi
|
||||
|
||||
echo "Checking ${N_FILES} files for missing trailing newlines."
|
||||
|
||||
# Do not process the whole file and only check the last character. Ignore empty
|
||||
# files. Taken from https://stackoverflow.com/a/10082466.
|
||||
for file in $FILES; do
|
||||
if [ -s "$file" ] && [ "$(tail -c1 "$file"; echo x)" != $'\nx' ]; then
|
||||
if [[ $LINT_SHOULD_FIX -eq 1 ]]; then
|
||||
echo "" >>"$file"
|
||||
else
|
||||
LINT_ERROR=1
|
||||
echo "No trailing newline: $file" >&2
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ $LINT_ERROR -eq 1 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
+34
-43
@@ -1,9 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
GIT_ROOT=$(cd "${BASH_SOURCE%/*}" && git rev-parse --show-toplevel)
|
||||
source "${GIT_ROOT}/scripts/colors.sh"
|
||||
source "${GIT_ROOT}/nix/scripts/source.sh"
|
||||
|
||||
if [[ ! -x "$(command -v nix-prefetch-url)" ]]; then
|
||||
echo "No 'nix-prefetch-url' utility found!" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -ef
|
||||
|
||||
# urlencode <string>
|
||||
@@ -21,29 +25,13 @@ urlencode() {
|
||||
LC_COLLATE=$old_lc_collate
|
||||
}
|
||||
|
||||
identify_git_sha() {
|
||||
# Do not fail on grep for refs
|
||||
set +o pipefail
|
||||
VERSION_FILE="${GIT_ROOT}/status-go-version.json"
|
||||
SCRIPT_FILE="$(basename "$0")"
|
||||
|
||||
# ls-remote finds only tags, branches, and pull requests, but can't find commits
|
||||
STATUS_GO_MATCHING_REFS=$(git ls-remote ${REPO_URL} ${1})
|
||||
|
||||
# It's possible that there's both a branch and a tag matching the given version
|
||||
STATUS_GO_TAG_SHA1=$(echo "${STATUS_GO_MATCHING_REFS}" | grep 'refs/tags' | cut -f1)
|
||||
STATUS_GO_BRANCH_SHA1=$(echo "${STATUS_GO_MATCHING_REFS}" | grep 'refs/heads' | cut -f1)
|
||||
|
||||
# Prefer tag over branch if both are found
|
||||
if [[ -n "${STATUS_GO_TAG_SHA1}" ]]; then
|
||||
echo -n "${STATUS_GO_TAG_SHA1}"
|
||||
elif [[ -n "${STATUS_GO_BRANCH_SHA1}" ]]; then
|
||||
echo -n "${STATUS_GO_BRANCH_SHA1}"
|
||||
elif [[ "${#STATUS_GO_VERSION}" -gt 4 ]]; then
|
||||
echo -n "${1}"
|
||||
else
|
||||
echo -e "${RED}${BLD}ERROR:${RST} Input not a tag or branch, but too short to be a SHA1!" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
STATUS_GO_REPO="${STATUS_GO_REPO:=status-go}"
|
||||
STATUS_GO_OWNER="${STATUS_GO_OWNER:=status-im}"
|
||||
REPO_URL="https://github.com/${STATUS_GO_OWNER}/${STATUS_GO_REPO}"
|
||||
STATUS_GO_VERSION=$1
|
||||
|
||||
HELP_MESSAGE=$(cat <<-END
|
||||
This is a tool for upgrading status-go to a given version in:
|
||||
@@ -70,11 +58,6 @@ Examples:
|
||||
END
|
||||
)
|
||||
|
||||
if [[ ! -x "$(command -v nix-prefetch-url)" ]]; then
|
||||
echo "No 'nix-prefetch-url' utility found!" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
|
||||
echo "${HELP_MESSAGE}"
|
||||
exit 1
|
||||
@@ -87,23 +70,31 @@ if [ $# -eq 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
VERSION_FILE="${GIT_ROOT}/status-go-version.json"
|
||||
SCRIPT_FILE="$(basename "$0")"
|
||||
|
||||
STATUS_GO_REPO="${STATUS_GO_REPO:=status-go}"
|
||||
STATUS_GO_OWNER="${STATUS_GO_OWNER:=status-im}"
|
||||
REPO_URL="https://github.com/${STATUS_GO_OWNER}/${STATUS_GO_REPO}"
|
||||
STATUS_GO_VERSION=$1
|
||||
|
||||
# If prefixed with # we assume argument is a PR number
|
||||
if [[ "${STATUS_GO_VERSION}" = PR-* ]]; then
|
||||
STATUS_GO_VERSION="refs/pull/${STATUS_GO_VERSION#"PR-"}/head"
|
||||
fi
|
||||
|
||||
STATUS_GO_COMMIT_SHA1="$(identify_git_sha "${STATUS_GO_VERSION}")"
|
||||
STATUS_GO_COMMIT_URL="https://github.com/${STATUS_GO_OWNER}/${STATUS_GO_REPO}/commit/${STATUS_GO_COMMIT_SHA1}"
|
||||
STATUS_GO_ZIP_URL="${REPO_URL}/archive/$(urlencode ${STATUS_GO_VERSION}).zip"
|
||||
STATUS_GO_SHA256=$(nix-prefetch-url --unpack ${STATUS_GO_ZIP_URL} --name status-go-archive.zip)
|
||||
# ls-remote finds only tags, branches, and pull requests, but can't find commits
|
||||
STATUS_GO_MATCHING_REFS=$(git ls-remote ${REPO_URL} ${STATUS_GO_VERSION})
|
||||
|
||||
# It's possible that there's both a branch and a tag matching the given version
|
||||
STATUS_GO_TAG_SHA1=$(echo "${STATUS_GO_MATCHING_REFS}" | grep 'refs/tags' | cut -f1)
|
||||
STATUS_GO_BRANCH_SHA1=$(echo "${STATUS_GO_MATCHING_REFS}" | grep 'refs/heads' | cut -f1)
|
||||
|
||||
# Prefer tag over branch if both are found
|
||||
if [[ -n "${STATUS_GO_TAG_SHA1}" ]]; then
|
||||
STATUS_GO_COMMIT_SHA1="${STATUS_GO_TAG_SHA1}"
|
||||
elif [[ -n "${STATUS_GO_BRANCH_SHA1}" ]]; then
|
||||
STATUS_GO_COMMIT_SHA1="${STATUS_GO_BRANCH_SHA1}"
|
||||
elif [[ "${#STATUS_GO_VERSION}" -gt 4 ]]; then
|
||||
STATUS_GO_COMMIT_SHA1="${STATUS_GO_VERSION}"
|
||||
else
|
||||
echo "ERROR: Input not a tag or branch, but too short to be a SHA1!" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
STATUS_GO_SHA256=$(nix-prefetch-url --unpack ${REPO_URL}/archive/$(urlencode ${STATUS_GO_VERSION}).zip --name status-go-archive.zip)
|
||||
|
||||
cat << EOF > ${VERSION_FILE}
|
||||
{
|
||||
@@ -117,6 +108,6 @@ cat << EOF > ${VERSION_FILE}
|
||||
}
|
||||
EOF
|
||||
|
||||
echo -e "${GRN}URL${RST}: ${BLD}${STATUS_GO_COMMIT_URL}${RST}"
|
||||
echo -e "${GRN}SHA-1${RST}: ${BLD}${STATUS_GO_COMMIT_SHA1}${RST}"
|
||||
echo -e "${GRN}SHA-256${RST}: ${BLD}${STATUS_GO_SHA256}${RST}"
|
||||
echo "SHA-1 for ${STATUS_GO_VERSION} is ${STATUS_GO_COMMIT_SHA1}.
|
||||
SHA-256 for source archive is ${STATUS_GO_SHA256}
|
||||
Owner is ${STATUS_GO_OWNER}"
|
||||
|
||||
+9
-10
@@ -44,16 +44,15 @@
|
||||
;; the target files (a.k.a hot reload). When false, you can manually
|
||||
;; reload by calling `shadow.cljs.devtools.api/watch-compile-all!`.
|
||||
:devtools {:autobuild #shadow/env ["SHADOW_AUTOBUILD_ENABLED" :default true :as :bool]}
|
||||
:dev {:devtools {:before-load-async status-im2.setup.hot-reload/before-reload
|
||||
:after-load-async status-im2.setup.hot-reload/reload
|
||||
:build-notify status-im2.setup.hot-reload/build-notify
|
||||
:preloads [re-frisk-remote.preload
|
||||
;; In order to use component test helpers in
|
||||
;; the REPL we need to preload namespaces
|
||||
;; that are not normally required by
|
||||
;; production code, such as
|
||||
;; @testing-library/react-native.
|
||||
test-helpers.component]}
|
||||
:dev {:devtools {:after-load status-im2.setup.hot-reload/reload
|
||||
:build-notify status-im2.setup.hot-reload/build-notify
|
||||
:preloads [re-frisk-remote.preload
|
||||
;; In order to use component test helpers in
|
||||
;; the REPL we need to preload namespaces
|
||||
;; that are not normally required by
|
||||
;; production code, such as
|
||||
;; @testing-library/react-native.
|
||||
test-helpers.component]}
|
||||
:closure-defines
|
||||
{status-im2.config/POKT_TOKEN #shadow/env "POKT_TOKEN"
|
||||
status-im2.config/INFURA_TOKEN #shadow/env "INFURA_TOKEN"
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { useDerivedValue, runOnJS as reaRunOnJS, runOnJS } from 'react-native-reanimated';
|
||||
import {useDerivedValue, runOnJS as reaRunOnJS, runOnJS} from "react-native-reanimated";
|
||||
|
||||
export function useTranslateY(initialTranslationY, bottomSheetDy, panY) {
|
||||
return useDerivedValue(() => {
|
||||
return initialTranslationY - (bottomSheetDy.value - panY.value);
|
||||
});
|
||||
return initialTranslationY - (bottomSheetDy.value - panY.value)
|
||||
})
|
||||
}
|
||||
|
||||
export function useBackgroundOpacity(translateY, backgroundHeight, windowHeight, opacity) {
|
||||
return useDerivedValue(() => {
|
||||
const calculatedOpacity = ((translateY.value - windowHeight) / -backgroundHeight) * opacity;
|
||||
const calculatedOpacity = ((translateY.value - windowHeight) / -backgroundHeight) * opacity
|
||||
|
||||
return Math.max(Math.min(calculatedOpacity, opacity), 0);
|
||||
});
|
||||
return Math.max(Math.min(calculatedOpacity, opacity), 0)
|
||||
})
|
||||
}
|
||||
|
||||
+39
-33
@@ -7,64 +7,70 @@ import { useDerivedValue, interpolate } from 'react-native-reanimated';
|
||||
// 2. remove keys with nil value, else useAnimatedStyle will throw an error
|
||||
// https://github.com/status-im/status-mobile/issues/14756
|
||||
export function applyAnimationsToStyle(animations, style) {
|
||||
return function () {
|
||||
'worklet';
|
||||
return function() {
|
||||
'worklet'
|
||||
|
||||
var animatedStyle = {};
|
||||
var animatedStyle = {}
|
||||
|
||||
// Normal Style
|
||||
for (var key in style) {
|
||||
if (key == 'transform') {
|
||||
var transforms = style[key];
|
||||
var filteredTransforms = [];
|
||||
if (key == "transform") {
|
||||
var transforms = style[key];
|
||||
var filteredTransforms = []
|
||||
|
||||
for (var transform of transforms) {
|
||||
var transformKey = Object.keys(transform)[0];
|
||||
var transformValue = transform[transformKey];
|
||||
if (transformValue !== null) {
|
||||
filteredTransforms.push({ [transformKey.replace(/-./g, (x) => x[1].toUpperCase())]: transformValue });
|
||||
}
|
||||
}
|
||||
for (var transform of transforms) {
|
||||
var transformKey = Object.keys(transform)[0];
|
||||
var transformValue = transform[transformKey];
|
||||
if(transformValue !== null) {
|
||||
filteredTransforms.push(
|
||||
{[transformKey.replace(/-./g, x=>x[1].toUpperCase())]: transformValue}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
animatedStyle[key] = filteredTransforms;
|
||||
animatedStyle[key] = filteredTransforms;
|
||||
} else {
|
||||
var value = style[key];
|
||||
if (value !== null) {
|
||||
animatedStyle[key.replace(/-./g, (x) => x[1].toUpperCase())] = value;
|
||||
}
|
||||
var value = style[key];
|
||||
if (value !== null) {
|
||||
animatedStyle[key.replace(/-./g, x=>x[1].toUpperCase())] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Animations
|
||||
for (var key in animations) {
|
||||
if (key == 'transform') {
|
||||
if (key == "transform") {
|
||||
var transforms = animations[key];
|
||||
var animatedTransforms = [];
|
||||
var animatedTransforms = []
|
||||
|
||||
for (var transform of transforms) {
|
||||
var transformKey = Object.keys(transform)[0];
|
||||
var transformValue = transform[transformKey].value;
|
||||
if (transformValue !== null) {
|
||||
animatedTransforms.push({ [transformKey.replace(/-./g, (x) => x[1].toUpperCase())]: transformValue });
|
||||
}
|
||||
var transformValue = transform[transformKey].value;
|
||||
if (transformValue !== null) {
|
||||
animatedTransforms.push(
|
||||
{[transformKey.replace(/-./g, x=>x[1].toUpperCase())]: transformValue}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
animatedStyle[key] = animatedTransforms;
|
||||
} else {
|
||||
var animatedValue = animations[key].value;
|
||||
if (animatedValue !== null) {
|
||||
animatedStyle[key.replace(/-./g, (x) => x[1].toUpperCase())] = animatedValue;
|
||||
}
|
||||
var animatedValue = animations[key].value;
|
||||
if (animatedValue !== null) {
|
||||
animatedStyle[key.replace(/-./g, x=>x[1].toUpperCase())] = animatedValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return animatedStyle;
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
export function interpolateValue(sharedValue, inputRange, outputRange, extrapolation) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
return interpolate(sharedValue.value, inputRange, outputRange, extrapolation);
|
||||
});
|
||||
return useDerivedValue(
|
||||
function () {
|
||||
'worklet'
|
||||
return interpolate(sharedValue.value, inputRange, outputRange, extrapolation);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,92 +0,0 @@
|
||||
import { useAnimatedStyle, useDerivedValue } from 'react-native-reanimated';
|
||||
|
||||
export function background(color, progress) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
const r = parseInt(color.substring(1, 3), 16);
|
||||
const g = parseInt(color.substring(3, 5), 16);
|
||||
const b = parseInt(color.substring(5, 7), 16);
|
||||
|
||||
return progress.value <= 25 ? `rgba(${r}, ${g}, ${b}, .4)` : `rgba(${r}, ${g}, ${b}, .2)`;
|
||||
});
|
||||
}
|
||||
|
||||
export function opacity(progress) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
return progress.value <= 25 ? 1 : 0.3;
|
||||
});
|
||||
}
|
||||
|
||||
export function avatarOpacity(progress) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
const progressValue = progress.value;
|
||||
|
||||
switch (true) {
|
||||
case progressValue <= 25:
|
||||
return 1;
|
||||
case progressValue <= 50:
|
||||
return 0.1;
|
||||
default:
|
||||
return 0.3;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function ringOpacity(progress) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
return progress.value <= 50 ? 1 : 0.3;
|
||||
});
|
||||
}
|
||||
|
||||
export function userHashOpacity(progress) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
const progressValue = progress.value;
|
||||
switch (true) {
|
||||
case progressValue <= 25:
|
||||
return 1;
|
||||
case progressValue <= 50:
|
||||
return 0.3;
|
||||
case progressValue <= 75:
|
||||
return 1;
|
||||
default:
|
||||
return 0.3;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function userHashColor(progress) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
const progressValue = progress.value;
|
||||
switch (true) {
|
||||
case progressValue <= 25:
|
||||
return 'rgba(255, 255, 255, .6)';
|
||||
case progressValue <= 50:
|
||||
return 'rgba(255, 255, 255, .6)';
|
||||
case progressValue <= 75:
|
||||
return 'rgb(255, 255, 255)';
|
||||
default:
|
||||
return 'rgba(255, 255, 255, .6)';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function emojiHashStyle(progress) {
|
||||
return useAnimatedStyle(function () {
|
||||
'worklet';
|
||||
const progressValue = progress.value;
|
||||
|
||||
switch (true) {
|
||||
case progressValue <= 25:
|
||||
return { opacity: 1 };
|
||||
case progressValue <= 75:
|
||||
return { opacity: 0.3 };
|
||||
default:
|
||||
return { opacity: 1 };
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1,8 +1,10 @@
|
||||
import { useDerivedValue } from 'react-native-reanimated';
|
||||
|
||||
export function infoLayout(input, isTop) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
return isTop ? input.value : -input.value;
|
||||
});
|
||||
return useDerivedValue(
|
||||
function () {
|
||||
'worklet'
|
||||
return isTop ? input.value : -input.value
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,31 +1,47 @@
|
||||
import { useDerivedValue, withTiming, Easing } from 'react-native-reanimated';
|
||||
|
||||
const slideAnimationDuration = 300;
|
||||
const totalPages = 4;
|
||||
const pageSize = 100 / totalPages;
|
||||
|
||||
const easeOut = {
|
||||
duration: slideAnimationDuration,
|
||||
easing: Easing.bezier(0, 0, 0.58, 1),
|
||||
};
|
||||
}
|
||||
|
||||
// Derived Values
|
||||
export function dynamicProgressBarWidth(staticProgressBarWidth, progress) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
return (staticProgressBarWidth * (progress.value || 0)) / 100;
|
||||
});
|
||||
return useDerivedValue(
|
||||
function () {
|
||||
'worklet'
|
||||
return staticProgressBarWidth * (progress.value || 0) / 100;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export function carouselLeftPosition(windowWidth, progress, isDragging, dragAmount) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
const progressValue = progress.value;
|
||||
const dragAmountValue = dragAmount.value;
|
||||
|
||||
const baseOffset = (Math.floor(progressValue / pageSize) % totalPages) * windowWidth;
|
||||
const adjustedOffset = baseOffset === 0 && dragAmountValue > 0 ? baseOffset : -baseOffset + dragAmountValue;
|
||||
|
||||
return isDragging.value ? withTiming(adjustedOffset, easeOut) : withTiming(-baseOffset, easeOut);
|
||||
});
|
||||
export function carouselLeftPosition(windowWidth, progress) {
|
||||
return useDerivedValue(
|
||||
function () {
|
||||
'worklet'
|
||||
const progressValue = progress.value;
|
||||
switch (true) {
|
||||
case (progressValue < 25):
|
||||
return 0;
|
||||
case (progressValue === 25):
|
||||
return withTiming(-windowWidth, easeOut);
|
||||
case (progressValue < 50):
|
||||
return -windowWidth;
|
||||
case (progressValue === 50):
|
||||
return withTiming(-2 * windowWidth, easeOut);
|
||||
case (progressValue < 75):
|
||||
return -2 * windowWidth;
|
||||
case (progressValue === 75):
|
||||
return withTiming(-3 * windowWidth, easeOut);
|
||||
case (progressValue < 100):
|
||||
return -3 * windowWidth;
|
||||
case (progressValue === 100):
|
||||
return withTiming(-4 * windowWidth, easeOut);
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+34
-26
@@ -1,4 +1,10 @@
|
||||
import { useAnimatedStyle, useAnimatedSensor, withTiming, interpolate, SensorType } from 'react-native-reanimated';
|
||||
import {
|
||||
useAnimatedStyle,
|
||||
useAnimatedSensor,
|
||||
withTiming,
|
||||
interpolate,
|
||||
SensorType
|
||||
} from 'react-native-reanimated';
|
||||
import { Platform } from 'react-native';
|
||||
|
||||
const PI = Math.PI;
|
||||
@@ -13,34 +19,36 @@ which is explained in better detail in this video
|
||||
https://www.youtube.com/watch?v=iEBoZDHCN5Y&t=2205s
|
||||
there is a bug with the pitch and roll calculations provided directly from the sensor data so the calculation had to
|
||||
be done using the quaternions directly.
|
||||
This link is useful to understand this: https://engineering.stackexchange.com/questions/3348/calculating-pitch-yaw-and-roll-from-mag-acc-and-gyro-data
|
||||
*/
|
||||
export function sensorAnimatedImage(zIndex, offset, stretch) {
|
||||
'worklet';
|
||||
const rotationSensor = useAnimatedSensor(SensorType.ROTATION, { interval: 30 });
|
||||
return useAnimatedStyle(function () {
|
||||
const { qx, qz, qw, qy, pitch } = rotationSensor.sensor.value;
|
||||
'worklet'
|
||||
const rotationSensor = useAnimatedSensor(SensorType.ROTATION, { interval: 30 })
|
||||
return useAnimatedStyle(function () {
|
||||
|
||||
const roll = Math.asin(-2.0 * (qx * qz - qw * qy));
|
||||
const { qx, qz, qw, qy, pitch } = rotationSensor.sensor.value;
|
||||
|
||||
const translateY = withTiming(
|
||||
interpolate(pitch, Platform.OS === 'ios' ? [-PI, PI] : [PI, -PI], [
|
||||
(-offset * 3) / zIndex - offset + (offset - stretch),
|
||||
(offset * 3) / zIndex - offset + (offset - stretch),
|
||||
]),
|
||||
{ duration: 10 },
|
||||
);
|
||||
const translateX = withTiming(
|
||||
interpolate(
|
||||
roll,
|
||||
[1, -1],
|
||||
[(-offset * 2) / zIndex - offset + (offset - stretch), (offset * 2) / zIndex - offset + (offset - stretch)],
|
||||
),
|
||||
{ duration: 10 },
|
||||
);
|
||||
const roll = Math.asin(-2.0 * (qx * qz - qw * qy))
|
||||
|
||||
return {
|
||||
transform: [{ translateX }, { translateY }],
|
||||
};
|
||||
});
|
||||
const translateY = withTiming(
|
||||
interpolate(
|
||||
pitch,
|
||||
Platform.OS === 'ios' ? [-PI, PI] : [PI, -PI],
|
||||
[(-offset * 3) / zIndex - offset + (offset - stretch), (offset * 3) / zIndex - offset + (offset - stretch)]),
|
||||
{ duration: 10 }
|
||||
);
|
||||
const translateX = withTiming(
|
||||
interpolate(
|
||||
roll,
|
||||
[1, -1],
|
||||
[(-offset * 2) / zIndex - offset + (offset - stretch), (offset * 2) / zIndex - offset + (offset - stretch)]),
|
||||
{ duration: 10 }
|
||||
);
|
||||
|
||||
return {
|
||||
transform: [
|
||||
{ translateX },
|
||||
{ translateY }
|
||||
]
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,14 +3,16 @@ import { useDerivedValue } from 'react-native-reanimated';
|
||||
const MAX_SCALE = 1.8;
|
||||
|
||||
export function ringScale(scale, subtract) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
const value = scale.value;
|
||||
const maxDelta = MAX_SCALE - 1;
|
||||
const maxDeltaDiff = 1 - maxDelta;
|
||||
const maxVirtualScale = MAX_SCALE + maxDelta;
|
||||
const decimals = value - Math.floor(value);
|
||||
const normalizedValue = value >= maxVirtualScale ? decimals + (parseInt(value) - 1) * maxDeltaDiff + 1 : value;
|
||||
return (normalizedValue - subtract > MAX_SCALE ? normalizedValue - maxDelta : normalizedValue) - subtract;
|
||||
});
|
||||
return useDerivedValue(
|
||||
function () {
|
||||
'worklet'
|
||||
const value = scale.value;
|
||||
const maxDelta = MAX_SCALE - 1;
|
||||
const maxDeltaDiff = 1 - maxDelta;
|
||||
const maxVirtualScale = MAX_SCALE + maxDelta;
|
||||
const decimals = value - Math.floor(value);
|
||||
const normalizedValue = value >= maxVirtualScale ? (decimals + ((parseInt(value) - 1) * maxDeltaDiff) + 1) : value;
|
||||
return (((normalizedValue - subtract) > MAX_SCALE ? normalizedValue - maxDelta : normalizedValue) - subtract);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useAnimatedScrollHandler } from 'react-native-reanimated';
|
||||
import {useAnimatedScrollHandler} from "react-native-reanimated";
|
||||
|
||||
export function useAnimatedScrollHandlerWorklet(scrollY) {
|
||||
return useAnimatedScrollHandler((event) => {
|
||||
scrollY.value = event.contentOffset.y;
|
||||
});
|
||||
return useAnimatedScrollHandler((event) => {
|
||||
scrollY.value = event.contentOffset.y;
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,47 +1,46 @@
|
||||
import { useDerivedValue, withTiming } from 'react-native-reanimated';
|
||||
import * as constants from './constants';
|
||||
|
||||
export function bottomTabIconColor(
|
||||
stackId,
|
||||
selectedStackId,
|
||||
homeStackState,
|
||||
passThrough,
|
||||
selectedTabColor,
|
||||
defaultColor,
|
||||
passThroughColor,
|
||||
) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
var homeStackStateValue = homeStackState.value;
|
||||
if (
|
||||
selectedStackId.value == stackId &&
|
||||
(homeStackStateValue == constants.OPEN_WITH_ANIMATION || homeStackStateValue == constants.OPEN_WITHOUT_ANIMATION)
|
||||
) {
|
||||
return selectedTabColor;
|
||||
} else if (passThrough.value) {
|
||||
return passThroughColor;
|
||||
} else {
|
||||
return defaultColor;
|
||||
export function bottomTabIconColor(stackId, selectedStackId, homeStackState,
|
||||
passThrough, selectedTabColor, defaultColor,
|
||||
passThroughColor) {
|
||||
return useDerivedValue(
|
||||
function () {
|
||||
'worklet'
|
||||
var homeStackStateValue = homeStackState.value;
|
||||
if (selectedStackId.value == stackId &&
|
||||
(homeStackStateValue == constants.OPEN_WITH_ANIMATION ||
|
||||
homeStackStateValue == constants.OPEN_WITHOUT_ANIMATION)){
|
||||
return selectedTabColor;
|
||||
}
|
||||
else if (passThrough.value){
|
||||
return passThroughColor;
|
||||
}
|
||||
else {
|
||||
return defaultColor;
|
||||
}
|
||||
}
|
||||
});
|
||||
);
|
||||
}
|
||||
|
||||
export function bottomTabsHeight(homeStackState, height, extendedHeight) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
switch (homeStackState.value) {
|
||||
return useDerivedValue(
|
||||
function () {
|
||||
'worklet'
|
||||
switch (homeStackState.value) {
|
||||
case constants.OPEN_WITH_ANIMATION:
|
||||
return withTiming(extendedHeight, constants.LINEAR_EASING);
|
||||
break;
|
||||
return withTiming(extendedHeight, constants.LINEAR_EASING);
|
||||
break;
|
||||
case constants.CLOSE_WITH_ANIMATION:
|
||||
return withTiming(height, constants.LINEAR_EASING);
|
||||
break;
|
||||
return withTiming(height, constants.LINEAR_EASING);
|
||||
break;
|
||||
case constants.OPEN_WITHOUT_ANIMATION:
|
||||
return extendedHeight;
|
||||
break;
|
||||
return extendedHeight;
|
||||
break;
|
||||
case constants.CLOSE_WITHOUT_ANIMATION:
|
||||
return height;
|
||||
break;
|
||||
return height;
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
)
|
||||
}
|
||||
|
||||
@@ -19,9 +19,9 @@ export const SHELL_ANIMATION_TIME = 200;
|
||||
export const LINEAR_EASING = {
|
||||
duration: SHELL_ANIMATION_TIME,
|
||||
easing: Easing.bezier(0, 0, 1, 1),
|
||||
};
|
||||
}
|
||||
|
||||
export const EASE_OUT_EASING = {
|
||||
duration: SHELL_ANIMATION_TIME,
|
||||
easing: Easing.bezier(0, 0, 0.58, 1),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,148 +1,89 @@
|
||||
import { useDerivedValue, withTiming, withSequence, withDelay, Easing, runOnJS } from 'react-native-reanimated';
|
||||
import { useDerivedValue, withTiming, withSequence, withDelay, Easing } from 'react-native-reanimated';
|
||||
import * as constants from './constants';
|
||||
|
||||
// Derived Values
|
||||
export function screenLeft(screenState, screenWidth, switcherCardLeftPosition) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
switch (screenState.value) {
|
||||
export function screenLeft (screenState, screenWidth, switcherCardLeftPosition) {
|
||||
return useDerivedValue(
|
||||
function () {
|
||||
'worklet'
|
||||
switch (screenState.value) {
|
||||
case constants.CLOSE_SCREEN_WITH_SLIDE_ANIMATION:
|
||||
return withTiming(screenWidth, constants.EASE_OUT_EASING);
|
||||
return withTiming(screenWidth, constants.EASE_OUT_EASING);
|
||||
case constants.OPEN_SCREEN_WITH_SLIDE_ANIMATION:
|
||||
return withTiming(0, constants.EASE_OUT_EASING);
|
||||
return withTiming(0, constants.EASE_OUT_EASING);
|
||||
case constants.CLOSE_SCREEN_WITHOUT_ANIMATION:
|
||||
return screenWidth;
|
||||
return screenWidth;
|
||||
case constants.OPEN_SCREEN_WITHOUT_ANIMATION:
|
||||
// Note - don't use return 0; its not working in ios
|
||||
// https://github.com/software-mansion/react-native-reanimated/issues/3296#issuecomment-1573900172
|
||||
return withSequence(withTiming(-1, { duration: 0 }), withTiming(0, { duration: 0 }));
|
||||
// Note - don't use return 0; its not working in ios
|
||||
// https://github.com/software-mansion/react-native-reanimated/issues/3296#issuecomment-1573900172
|
||||
return withSequence(withTiming(-1, {duration: 0}), withTiming(0, {duration: 0}));
|
||||
case constants.CLOSE_SCREEN_WITH_SHELL_ANIMATION:
|
||||
return withTiming(switcherCardLeftPosition, constants.EASE_OUT_EASING);
|
||||
return withTiming(switcherCardLeftPosition, constants.EASE_OUT_EASING);
|
||||
case constants.OPEN_SCREEN_WITH_SHELL_ANIMATION:
|
||||
return withTiming(0, constants.EASE_OUT_EASING);
|
||||
return withTiming(0, constants.EASE_OUT_EASING);
|
||||
default:
|
||||
return screenWidth;
|
||||
}
|
||||
});
|
||||
return screenWidth;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function screenTop(screenState, switcherCardTopPosition) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
switch (screenState.value) {
|
||||
export function screenTop (screenState, switcherCardTopPosition) {
|
||||
return useDerivedValue(
|
||||
function () {
|
||||
'worklet'
|
||||
switch (screenState.value) {
|
||||
case constants.CLOSE_SCREEN_WITH_SHELL_ANIMATION:
|
||||
return withTiming(switcherCardTopPosition, constants.EASE_OUT_EASING);
|
||||
return withTiming(switcherCardTopPosition, constants.EASE_OUT_EASING);
|
||||
case constants.OPEN_SCREEN_WITH_SHELL_ANIMATION:
|
||||
return withTiming(0, constants.EASE_OUT_EASING);
|
||||
return withTiming(0, constants.EASE_OUT_EASING);
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
});
|
||||
return 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function screenWidth(screenState, screenWidth, switcherCardSize) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
switch (screenState.value) {
|
||||
export function screenWidth (screenState, screenWidth, switcherCardSize) {
|
||||
return useDerivedValue(
|
||||
function () {
|
||||
'worklet'
|
||||
switch (screenState.value) {
|
||||
case constants.CLOSE_SCREEN_WITH_SHELL_ANIMATION:
|
||||
return withTiming(switcherCardSize, constants.EASE_OUT_EASING);
|
||||
return withTiming(switcherCardSize, constants.EASE_OUT_EASING);
|
||||
case constants.OPEN_SCREEN_WITH_SHELL_ANIMATION:
|
||||
return withSequence(
|
||||
withTiming(switcherCardSize, { duration: 0 }),
|
||||
withTiming(screenWidth, constants.EASE_OUT_EASING),
|
||||
);
|
||||
return withSequence(withTiming(switcherCardSize, {duration: 0}), withTiming(screenWidth, constants.EASE_OUT_EASING));
|
||||
default:
|
||||
return screenWidth;
|
||||
}
|
||||
});
|
||||
return screenWidth;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function screenHeight(screenState, screenHeight, switcherCardSize) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
switch (screenState.value) {
|
||||
export function screenHeight (screenState, screenHeight, switcherCardSize) {
|
||||
return useDerivedValue(
|
||||
function () {
|
||||
'worklet'
|
||||
switch (screenState.value) {
|
||||
case constants.CLOSE_SCREEN_WITH_SHELL_ANIMATION:
|
||||
return withTiming(switcherCardSize, constants.EASE_OUT_EASING);
|
||||
return withTiming(switcherCardSize, constants.EASE_OUT_EASING);
|
||||
case constants.OPEN_SCREEN_WITH_SHELL_ANIMATION:
|
||||
return withSequence(
|
||||
withTiming(switcherCardSize, { duration: 0 }),
|
||||
withTiming(screenHeight, constants.EASE_OUT_EASING),
|
||||
);
|
||||
return withSequence(withTiming(switcherCardSize, {duration: 0}), withTiming(screenHeight, constants.EASE_OUT_EASING));
|
||||
default:
|
||||
return screenHeight;
|
||||
}
|
||||
});
|
||||
return screenHeight;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function screenZIndex(screenState) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
switch (screenState.value) {
|
||||
export function screenZIndex (screenState) {
|
||||
return useDerivedValue(
|
||||
function () {
|
||||
'worklet'
|
||||
switch (screenState.value) {
|
||||
case constants.CLOSE_SCREEN_WITH_SHELL_ANIMATION:
|
||||
case constants.CLOSE_SCREEN_WITH_SLIDE_ANIMATION:
|
||||
return withDelay(constants.SHELL_ANIMATION_TIME, withTiming(-1, { duration: 0 }));
|
||||
return withDelay(constants.SHELL_ANIMATION_TIME, withTiming(-1, {duration: 0}));
|
||||
case constants.CLOSE_SCREEN_WITHOUT_ANIMATION:
|
||||
return -1;
|
||||
return -1;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function screenBorderRadius(screenState) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
switch (screenState.value) {
|
||||
case constants.OPEN_SCREEN_WITH_SHELL_ANIMATION:
|
||||
return withDelay(constants.SHELL_ANIMATION_TIME, withTiming(0, { duration: 0 }));
|
||||
case constants.OPEN_SCREEN_WITH_SLIDE_ANIMATION:
|
||||
case constants.OPEN_SCREEN_WITHOUT_ANIMATION:
|
||||
return 0;
|
||||
case constants.CLOSE_SCREEN_WITH_SLIDE_ANIMATION:
|
||||
return withDelay(constants.SHELL_ANIMATION_TIME, withTiming(20, { duration: 0 }));
|
||||
case constants.CLOSE_SCREEN_WITHOUT_ANIMATION:
|
||||
case constants.CLOSE_SCREEN_WITH_SHELL_ANIMATION:
|
||||
return 20;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function screenGestureOnUpdate(screenLeft) {
|
||||
return function (event) {
|
||||
'worklet';
|
||||
const absoluteX = event.absoluteX;
|
||||
if (absoluteX !== null) {
|
||||
screenLeft.value = event.absoluteX;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export function screenGestureOnEnd(data) {
|
||||
return function (event) {
|
||||
'worklet';
|
||||
|
||||
const { screenLeft, screenState, screenWidth, leftVelocity, rightVelocity, screenClosedCallback } = data;
|
||||
const absoluteX = event.absoluteX ?? 0;
|
||||
const velocityX = event.velocityX ?? 0;
|
||||
const closeScreen = velocityX > rightVelocity || (velocityX > leftVelocity && absoluteX >= screenWidth / 2);
|
||||
|
||||
// Velocity (points/sec) = Distance/time
|
||||
var animationVelocity = (screenWidth * 1000) / constants.SHELL_ANIMATION_TIME;
|
||||
|
||||
if (Math.abs(velocityX) > animationVelocity) {
|
||||
animationVelocity = velocityX; // Faster fling
|
||||
}
|
||||
|
||||
const newDistance = closeScreen ? screenWidth - absoluteX : absoluteX;
|
||||
const animationTime = (newDistance * 1000) / animationVelocity;
|
||||
|
||||
screenLeft.value = withTiming(closeScreen ? screenWidth : 0, {
|
||||
duration: animationTime,
|
||||
easing: Easing.bezier(0, 0, 0.58, 1),
|
||||
return 1;
|
||||
}
|
||||
});
|
||||
|
||||
if (closeScreen) {
|
||||
runOnJS(screenClosedCallback)(animationTime);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,111 +3,126 @@ import * as constants from './constants';
|
||||
|
||||
// Derived values for each stack (communities, chat, wallet, browser)
|
||||
export function stackOpacity(stackId, selectedStackId) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
return selectedStackId.value == stackId ? 1 : 0;
|
||||
});
|
||||
return useDerivedValue(
|
||||
function () {
|
||||
'worklet'
|
||||
return selectedStackId.value == stackId ? 1 : 0;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export function stackZIndex(stackId, selectedStackId) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
return selectedStackId.value == stackId ? 10 : 9;
|
||||
});
|
||||
return useDerivedValue(
|
||||
function () {
|
||||
'worklet'
|
||||
return selectedStackId.value == stackId ? 10 : 9;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
// Derived values for home stack (container)
|
||||
export function homeStackOpacity(homeStackState) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
switch (homeStackState.value) {
|
||||
return useDerivedValue(
|
||||
function () {
|
||||
'worklet'
|
||||
switch (homeStackState.value) {
|
||||
case constants.OPEN_WITH_ANIMATION:
|
||||
return withTiming(1, constants.LINEAR_EASING);
|
||||
return withTiming(1, constants.LINEAR_EASING);
|
||||
case constants.CLOSE_WITH_ANIMATION:
|
||||
return withTiming(0, constants.LINEAR_EASING);
|
||||
return withTiming(0, constants.LINEAR_EASING);
|
||||
case constants.OPEN_WITHOUT_ANIMATION:
|
||||
return 1;
|
||||
return 1;
|
||||
case constants.CLOSE_WITHOUT_ANIMATION:
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
});
|
||||
);
|
||||
}
|
||||
|
||||
export function homeStackTop(homeStackState, top) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
switch (homeStackState.value) {
|
||||
return useDerivedValue(
|
||||
function () {
|
||||
'worklet'
|
||||
switch (homeStackState.value) {
|
||||
case constants.OPEN_WITH_ANIMATION:
|
||||
return withTiming(0, constants.LINEAR_EASING);
|
||||
return withTiming(0, constants.LINEAR_EASING);
|
||||
case constants.CLOSE_WITH_ANIMATION:
|
||||
return withTiming(top, constants.LINEAR_EASING);
|
||||
return withTiming(top, constants.LINEAR_EASING);
|
||||
case constants.OPEN_WITHOUT_ANIMATION:
|
||||
return 0;
|
||||
return 0;
|
||||
case constants.CLOSE_WITHOUT_ANIMATION:
|
||||
return top;
|
||||
return top;
|
||||
}
|
||||
}
|
||||
});
|
||||
);
|
||||
}
|
||||
|
||||
export function homeStackLeft(selectedStackId, animateHomeStackLeft, homeStackState, left) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
if (animateHomeStackLeft.value) {
|
||||
var leftValue = left[selectedStackId.value];
|
||||
switch (homeStackState.value) {
|
||||
case constants.OPEN_WITH_ANIMATION:
|
||||
return withSequence(withTiming(leftValue, { duration: 0 }), withTiming(0, constants.LINEAR_EASING));
|
||||
case constants.CLOSE_WITH_ANIMATION:
|
||||
return withTiming(leftValue, constants.LINEAR_EASING);
|
||||
case constants.OPEN_WITHOUT_ANIMATION:
|
||||
return 0;
|
||||
case constants.CLOSE_WITHOUT_ANIMATION:
|
||||
return leftValue;
|
||||
return useDerivedValue(
|
||||
function () {
|
||||
'worklet'
|
||||
if (animateHomeStackLeft.value) {
|
||||
var leftValue = left[selectedStackId.value];
|
||||
switch (homeStackState.value) {
|
||||
case constants.OPEN_WITH_ANIMATION:
|
||||
return withSequence(withTiming(leftValue, {duration: 0}), withTiming(0, constants.LINEAR_EASING))
|
||||
case constants.CLOSE_WITH_ANIMATION:
|
||||
return withTiming(leftValue, constants.LINEAR_EASING);
|
||||
case constants.OPEN_WITHOUT_ANIMATION:
|
||||
return 0;
|
||||
case constants.CLOSE_WITHOUT_ANIMATION:
|
||||
return leftValue;
|
||||
}
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
});
|
||||
);
|
||||
}
|
||||
|
||||
export function homeStackPointer(homeStackState) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
var homeStackStateValue = homeStackState.value;
|
||||
return homeStackStateValue == constants.OPEN_WITH_ANIMATION ||
|
||||
homeStackStateValue == constants.OPEN_WITHOUT_ANIMATION
|
||||
? 'auto'
|
||||
: 'none';
|
||||
});
|
||||
return useDerivedValue(
|
||||
function () {
|
||||
'worklet'
|
||||
var homeStackStateValue = homeStackState.value;
|
||||
return (homeStackStateValue == constants.OPEN_WITH_ANIMATION ||
|
||||
homeStackStateValue == constants.OPEN_WITHOUT_ANIMATION) ? "auto" : "none";
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export function homeStackScale(homeStackState, minimizeScale) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
switch (homeStackState.value) {
|
||||
return useDerivedValue(
|
||||
function () {
|
||||
'worklet'
|
||||
switch (homeStackState.value) {
|
||||
case constants.OPEN_WITH_ANIMATION:
|
||||
return withTiming(1, constants.LINEAR_EASING);
|
||||
return withTiming(1, constants.LINEAR_EASING);
|
||||
case constants.CLOSE_WITH_ANIMATION:
|
||||
return withTiming(minimizeScale, constants.LINEAR_EASING);
|
||||
return withTiming(minimizeScale, constants.LINEAR_EASING);
|
||||
case constants.OPEN_WITHOUT_ANIMATION:
|
||||
return 1;
|
||||
return 1;
|
||||
case constants.CLOSE_WITHOUT_ANIMATION:
|
||||
return minimizeScale;
|
||||
return minimizeScale;
|
||||
}
|
||||
}
|
||||
});
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
export function homeStackBorderRadius(homeStackState) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
switch (homeStackState.value) {
|
||||
return useDerivedValue(
|
||||
function () {
|
||||
'worklet'
|
||||
switch (homeStackState.value) {
|
||||
case constants.OPEN_WITH_ANIMATION:
|
||||
return withDelay(constants.SHELL_ANIMATION_TIME, withTiming(0, { duration: 0 }));
|
||||
return withDelay(constants.SHELL_ANIMATION_TIME, withTiming(0, {duration: 0}));
|
||||
case constants.CLOSE_WITH_ANIMATION:
|
||||
case constants.CLOSE_WITHOUT_ANIMATION:
|
||||
return 20;
|
||||
return 20;
|
||||
case constants.OPEN_WITHOUT_ANIMATION:
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
});
|
||||
);
|
||||
}
|
||||
|
||||
@@ -305,9 +305,7 @@ globalThis.__STATUS_MOBILE_JS_IDENTITY_PROXY__ = new Proxy({}, {get() { return (
|
||||
#js {:getInstallReferrer identity})
|
||||
|
||||
(def react-native-camera-kit
|
||||
#js
|
||||
{:Camera #js {}
|
||||
:CameraType #js {}})
|
||||
#js {:CameraKitCamera #js {}})
|
||||
|
||||
(def react-native-push-notification
|
||||
#js
|
||||
@@ -364,79 +362,77 @@ globalThis.__STATUS_MOBILE_JS_IDENTITY_PROXY__ = new Proxy({}, {get() { return (
|
||||
(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/lib/module/v1" react-native-redash
|
||||
"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-community/cameraroll" 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
|
||||
"../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/lightbox.js" #js {}
|
||||
"../src/js/worklets/parallax.js" #js {}
|
||||
"../src/js/worklets/identifiers_highlighting.js" #js {}
|
||||
"./fleets.js" default-fleets
|
||||
"@walletconnect/client" wallet-connect-client
|
||||
"../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/lib/module/v1" react-native-redash
|
||||
"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-community/cameraroll" 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
|
||||
"../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/lightbox.js" #js {}
|
||||
"../src/js/worklets/parallax.js" #js {}
|
||||
"./fleets.js" default-fleets
|
||||
"@walletconnect/client" wallet-connect-client
|
||||
"../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))
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
[taoensso.timbre :as log]
|
||||
[react-native.platform :as platform]
|
||||
[react-native.core :as rn]
|
||||
[utils.transforms :as types]
|
||||
[clojure.string :as string]))
|
||||
[utils.transforms :as types]))
|
||||
|
||||
(defn status
|
||||
[]
|
||||
@@ -83,15 +82,6 @@
|
||||
key-uid
|
||||
#(.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] loginWithConfig")
|
||||
(clear-web-data)
|
||||
(init-keystore
|
||||
keyUid
|
||||
#(.loginAccount ^js (status) (types/clj->json request))))
|
||||
|
||||
(defn create-account-and-login
|
||||
[request]
|
||||
(.createAccountAndLogin ^js (status) (types/clj->json request)))
|
||||
@@ -388,14 +378,6 @@
|
||||
:build-id (.-buildId status)
|
||||
:device-id (.-deviceId status)}))
|
||||
|
||||
(defn get-installation-name
|
||||
[]
|
||||
;; NOTE(rasom): Only needed for android devices currently
|
||||
(when platform/android?
|
||||
(string/join " "
|
||||
((juxt :model :device-id)
|
||||
(get-device-model-info)))))
|
||||
|
||||
(defn get-node-config
|
||||
[callback]
|
||||
(log/debug "[native-module] get-node-config")
|
||||
@@ -554,7 +536,3 @@
|
||||
(defn log-file-directory
|
||||
[]
|
||||
(.logFileDirectory ^js (status)))
|
||||
|
||||
(defn init-status-go-logging
|
||||
[{:keys [enable? mobile-system? log-level callback]}]
|
||||
(.initLogging ^js (status) enable? mobile-system? log-level callback))
|
||||
|
||||
@@ -11,4 +11,4 @@
|
||||
(for [i (keys icons/icons)]
|
||||
[rn/view {:flex-direction :row}
|
||||
[icons/icon (keyword i)]
|
||||
[rn/text i]])])
|
||||
[rn/text i]])])
|
||||
@@ -1,49 +1,44 @@
|
||||
const waitToNavigate = (duration) => new Promise((resolve) => setTimeout(() => resolve(), duration));
|
||||
const waitToNavigate = duration => new Promise(resolve => setTimeout(() => resolve(), duration));
|
||||
|
||||
const SUPER_SECRET_PASSWORD = 'password';
|
||||
const SUPER_SECRET_PASSWORD = 'password'
|
||||
|
||||
const loginToHomePage = async () => {
|
||||
if (device.getPlatform() === 'ios') {
|
||||
await device.setStatusBar({
|
||||
time: '12:34',
|
||||
dataNetwork: 'wifi',
|
||||
wifiBars: '3',
|
||||
batteryState: 'charging',
|
||||
batteryLevel: '100',
|
||||
});
|
||||
}
|
||||
await device.reloadReactNative();
|
||||
await element(by.id('terms-of-service')).tap();
|
||||
await waitToNavigate(400);
|
||||
await element(by.id('get-started')).tap();
|
||||
await waitToNavigate(300);
|
||||
await element(by.id('generate-keys')).tap();
|
||||
await waitToNavigate(200);
|
||||
await element(by.text('Next')).tap();
|
||||
await waitToNavigate(700);
|
||||
await element(by.text('Next')).tap();
|
||||
await waitToNavigate(700);
|
||||
await element(by.id('password-placeholder')).typeText(SUPER_SECRET_PASSWORD);
|
||||
await element(by.id('confirm-password-placeholder')).typeText(SUPER_SECRET_PASSWORD);
|
||||
await element(by.text('Next')).tap();
|
||||
await waitToNavigate(200);
|
||||
await element(by.id('browser-stack')).tap();
|
||||
await waitToNavigate(400);
|
||||
await element(by.text('Quo2.0 Preview')).tap();
|
||||
await waitToNavigate(400);
|
||||
};
|
||||
if (device.getPlatform() === 'ios') {
|
||||
await device.setStatusBar({ time: '12:34', dataNetwork: 'wifi', wifiBars: '3', batteryState: 'charging', batteryLevel: '100' });
|
||||
}
|
||||
await device.reloadReactNative();
|
||||
await element(by.id('terms-of-service')).tap();
|
||||
await waitToNavigate(400);
|
||||
await element(by.id('get-started')).tap();
|
||||
await waitToNavigate(300);
|
||||
await element(by.id('generate-keys')).tap();
|
||||
await waitToNavigate(200);
|
||||
await element(by.text('Next')).tap();
|
||||
await waitToNavigate(700);
|
||||
await element(by.text('Next')).tap();
|
||||
await waitToNavigate(700);
|
||||
await element(by.id('password-placeholder')).typeText(SUPER_SECRET_PASSWORD);
|
||||
await element(by.id('confirm-password-placeholder')).typeText(SUPER_SECRET_PASSWORD);
|
||||
await element(by.text('Next')).tap();
|
||||
await waitToNavigate(200);
|
||||
await element(by.id("browser-stack")).tap();
|
||||
await waitToNavigate(400);
|
||||
await element(by.text("Quo2.0 Preview")).tap();
|
||||
await waitToNavigate(400);
|
||||
}
|
||||
|
||||
describe('Default Renders', () => {
|
||||
beforeAll(async () => loginToHomePage());
|
||||
beforeEach(async () => {});
|
||||
afterEach(async () => {
|
||||
await element(by.id('back-button')).tap();
|
||||
await waitToNavigate(200);
|
||||
});
|
||||
beforeAll(async () => loginToHomePage())
|
||||
beforeEach(async () => {
|
||||
});
|
||||
afterEach(async () => {
|
||||
await element(by.id("back-button")).tap();
|
||||
await waitToNavigate(200);
|
||||
});
|
||||
|
||||
it(`button page should match image render`, async () => {
|
||||
await element(by.id(`quo2-:button`)).tap();
|
||||
await waitToNavigate(200);
|
||||
const res = await jestExpect(`button`).toMatchImageSnapshot();
|
||||
});
|
||||
});
|
||||
it(`button page should match image render`, async () => {
|
||||
await element(by.id(`quo2-:button`)).tap();
|
||||
await waitToNavigate(200);
|
||||
const res = await jestExpect(`button`).toMatchImageSnapshot();
|
||||
})
|
||||
});
|
||||
@@ -38,13 +38,13 @@
|
||||
uses `ring-background` to display the ring behind the initials when given. Otherwise,
|
||||
shows the `profile-picture` which already comes with the ring drawn."
|
||||
[{:keys [full-name status-indicator? online? size profile-picture ring-background
|
||||
customization-color static? muted?]
|
||||
customization-color static?]
|
||||
:or {status-indicator? true
|
||||
online? true
|
||||
size :big
|
||||
customization-color :turquoise}}]
|
||||
(let [full-name (or full-name "empty name")
|
||||
draw-ring? (when-not muted? (and ring-background (valid-ring-sizes size)))
|
||||
draw-ring? (and ring-background (valid-ring-sizes size))
|
||||
outer-styles (style/outer size)
|
||||
;; Once image is loaded, fast image rerenders view with the help of reagent atom,
|
||||
;; But dynamic updates don't work when user-avatar is used inside hole-view
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
[quo2.foundations.colors :as colors]
|
||||
[quo2.theme :as theme]
|
||||
[react-native.core :as rn]
|
||||
[react-native.blur :as blur]
|
||||
[reagent.core :as reagent]
|
||||
[quo2.components.buttons.style :as style]))
|
||||
[reagent.core :as reagent]))
|
||||
|
||||
(defn themes
|
||||
[customization-color]
|
||||
@@ -68,16 +66,6 @@
|
||||
:background-color {:default colors/neutral-80-opa-5
|
||||
:pressed colors/neutral-80-opa-10
|
||||
:disabled colors/neutral-80-opa-5}}
|
||||
:blurred {:icon-color colors/neutral-100
|
||||
:icon-secondary-color colors/neutral-100
|
||||
:icon-background-color {:default colors/neutral-20
|
||||
:blurred colors/neutral-80-opa-10}
|
||||
:label-color colors/neutral-100
|
||||
:background-color {:default colors/neutral-10
|
||||
:pressed colors/neutral-10
|
||||
:disabled colors/neutral-10-opa-10-blur}
|
||||
:blur-overlay-color colors/neutral-10-opa-40-blur
|
||||
:blur-type :light}
|
||||
:blur-bg-outline {:icon-color colors/neutral-100
|
||||
:icon-secondary-color colors/neutral-80-opa-40
|
||||
:label-color colors/neutral-100
|
||||
@@ -147,16 +135,6 @@
|
||||
:background-color {:default colors/white-opa-5
|
||||
:pressed colors/white-opa-10
|
||||
:disabled colors/white-opa-5}}
|
||||
:blurred {:icon-color colors/white
|
||||
:icon-secondary-color colors/white
|
||||
:icon-background-color {:default colors/neutral-80
|
||||
:blurred colors/white-opa-10}
|
||||
:label-color colors/white
|
||||
:background-color {:default colors/neutral-90
|
||||
:pressed colors/neutral-90
|
||||
:disabled colors/neutral-90-opa-10-blur}
|
||||
:blur-overlay-color colors/neutral-80-opa-40
|
||||
:blur-type :dark}
|
||||
:blur-bg-outline {:icon-color colors/white
|
||||
:icon-secondary-color colors/white-opa-40
|
||||
:label-color colors/white
|
||||
@@ -179,11 +157,12 @@
|
||||
24 8))})
|
||||
|
||||
(defn style-container
|
||||
[type size disabled background-color border-color icon above width before after blur-active?]
|
||||
[type size disabled background-color border-color icon above width before after]
|
||||
(merge {:height size
|
||||
:align-items :center
|
||||
:justify-content :center
|
||||
:flex-direction (if above :column :row)
|
||||
:background-color background-color
|
||||
:padding-horizontal (when-not (or icon before after)
|
||||
(case size
|
||||
56 16
|
||||
@@ -213,11 +192,7 @@
|
||||
56 0
|
||||
40 9
|
||||
32 5
|
||||
24 4))
|
||||
:overflow :hidden}
|
||||
(when (or (and (= type :blurred) (not blur-active?))
|
||||
(not= type :blurred))
|
||||
{:background-color background-color})
|
||||
24 4))}
|
||||
(shape-style-container type icon size)
|
||||
(when width
|
||||
{:width width})
|
||||
@@ -229,7 +204,7 @@
|
||||
(when disabled
|
||||
{:opacity 0.3})))
|
||||
|
||||
(defn- button-internal
|
||||
(defn button
|
||||
"with label
|
||||
[button opts \"label\"]
|
||||
opts
|
||||
@@ -248,24 +223,21 @@
|
||||
(let [pressed-in (reagent/atom false)]
|
||||
(fn
|
||||
[{:keys [on-press disabled type size before after above icon-secondary-no-color
|
||||
width customization-color theme override-background-color pressed
|
||||
on-long-press accessibility-label icon icon-no-color style inner-style test-ID
|
||||
blur-active? override-before-margins override-after-margins icon-size icon-container-size
|
||||
icon-container-rounded?]
|
||||
width customization-color override-theme override-background-color pressed
|
||||
on-long-press accessibility-label icon icon-no-color style inner-style test-ID]
|
||||
:or {type :primary
|
||||
size 40
|
||||
customization-color :primary
|
||||
blur-active? true}}
|
||||
customization-color :primary}}
|
||||
children]
|
||||
(let [{:keys [icon-color icon-secondary-color background-color label-color border-color blur-type
|
||||
blur-overlay-color icon-background-color]}
|
||||
(let [{:keys [icon-color icon-secondary-color background-color label-color border-color]}
|
||||
(get-in (themes customization-color)
|
||||
[theme type])
|
||||
[(or
|
||||
override-theme
|
||||
(theme/get-theme)) type])
|
||||
state (cond disabled :disabled
|
||||
(or @pressed-in pressed) :pressed
|
||||
:else :default)
|
||||
blur-state (if blur-active? :blurred :default)
|
||||
icon-size (or icon-size (when (= 24 size) 12))
|
||||
icon-size (when (= 24 size) 12)
|
||||
icon-secondary-color (or icon-secondary-color icon-color)]
|
||||
[rn/touchable-without-feedback
|
||||
(merge {:test-ID test-ID
|
||||
@@ -294,17 +266,9 @@
|
||||
above
|
||||
width
|
||||
before
|
||||
after
|
||||
blur-active?)
|
||||
after)
|
||||
(when (= state :pressed) {:opacity 0.9})
|
||||
inner-style)}
|
||||
(when (and (= type :blurred)
|
||||
blur-active?)
|
||||
[blur/view
|
||||
{:blur-radius 20
|
||||
:blur-type blur-type
|
||||
:overlay-color blur-overlay-color
|
||||
:style style/blur-view}])
|
||||
(when above
|
||||
[rn/view
|
||||
[quo2.icons/icon above
|
||||
@@ -313,16 +277,11 @@
|
||||
:size icon-size}]])
|
||||
(when before
|
||||
[rn/view
|
||||
{:style (style/before-icon-style
|
||||
{:override-margins override-before-margins
|
||||
:size size
|
||||
:icon-container-size icon-container-size
|
||||
:icon-background-color (get icon-background-color blur-state)
|
||||
:icon-container-rounded? icon-container-rounded?
|
||||
:icon-size icon-size})}
|
||||
[quo2.icons/icon before
|
||||
{:color icon-secondary-color
|
||||
:size icon-size}]])
|
||||
{:container-style {:margin-left (if (= size 40) 12 8)
|
||||
:margin-right 4}
|
||||
:color icon-secondary-color
|
||||
:size icon-size}]])
|
||||
[rn/view
|
||||
(cond
|
||||
(or icon icon-no-color)
|
||||
@@ -344,16 +303,9 @@
|
||||
children)]
|
||||
(when after
|
||||
[rn/view
|
||||
{:style (style/after-icon-style
|
||||
{:override-margins override-after-margins
|
||||
:size size
|
||||
:icon-container-size icon-container-size
|
||||
:icon-background-color (get icon-background-color blur-state)
|
||||
:icon-container-rounded? icon-container-rounded?
|
||||
:icon-size icon-size})}
|
||||
[quo2.icons/icon after
|
||||
{:no-color icon-secondary-no-color
|
||||
:color icon-secondary-color
|
||||
:size icon-size}]])]]]))))
|
||||
|
||||
(def button (theme/with-theme button-internal))
|
||||
{:container-style {:margin-left 4
|
||||
:margin-right (if (= size 40) 12 8)}
|
||||
:no-color icon-secondary-no-color
|
||||
:color icon-secondary-color
|
||||
:size icon-size}]])]]]))))
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
(:require [react-native.core :as rn]
|
||||
[quo2.components.buttons.predictive-keyboard.style :as style]
|
||||
[quo2.components.info.info-message :as info-message]
|
||||
[quo2.theme :as theme]
|
||||
[react-native.linear-gradient :as linear-gradient]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[quo2.components.buttons.button :as button]))
|
||||
@@ -13,33 +12,32 @@
|
||||
:blur [colors/white-opa-5 colors/white-opa-0]})
|
||||
|
||||
(defn- word-component
|
||||
[word _ _ {:keys [on-press]}]
|
||||
[word _ _ {:keys [blur? on-press]}]
|
||||
[button/button
|
||||
{:type :blur-bg
|
||||
:size 32
|
||||
:on-press #(on-press word)}
|
||||
|
||||
(merge {:type :blur-bg
|
||||
:size 32
|
||||
:on-press #(on-press word)}
|
||||
(when blur? {:override-theme :dark}))
|
||||
word])
|
||||
|
||||
(defn- separator
|
||||
[]
|
||||
[rn/view {:style {:width 8}}])
|
||||
|
||||
(defn- view-internal
|
||||
(defn view
|
||||
"Options
|
||||
- `type` `:words`/`:error`/`:info`/`:empty`.
|
||||
- `blur?` Boolean to enable blur background support.
|
||||
- `text` error/info text.
|
||||
- `words` List of words to display in the keyboard.
|
||||
- `on-press` Callback called when a word is pressed `(fn [word])`
|
||||
- `theme` :light or :dark, received from with-theme HOC."
|
||||
[{:keys [type blur? text words on-press theme]}]
|
||||
- `on-press` Callback called when a word is pressed `(fn [word])`."
|
||||
[{:keys [type blur? text words on-press]}]
|
||||
[linear-gradient/linear-gradient
|
||||
{:style {:flex-direction :row}
|
||||
:accessibility-label :predictive-keyboard
|
||||
:colors (if blur?
|
||||
(gradients :blur)
|
||||
(colors/theme-colors (gradients :light) (gradients :dark) theme))}
|
||||
(colors/theme-colors (gradients :light) (gradients :dark)))}
|
||||
[rn/view {:style (style/wrapper type)}
|
||||
(case type
|
||||
:words
|
||||
@@ -48,7 +46,8 @@
|
||||
:data words
|
||||
:content-container-style style/word-list
|
||||
:render-fn word-component
|
||||
:render-data {:on-press on-press}
|
||||
:render-data {:blur? blur?
|
||||
:on-press on-press}
|
||||
:shows-horizontal-scroll-indicator false
|
||||
:separator [separator]
|
||||
:horizontal true
|
||||
@@ -71,5 +70,3 @@
|
||||
:icon-color colors/white-opa-70}))
|
||||
text]
|
||||
nil)]])
|
||||
|
||||
(def view (theme/with-theme view-internal))
|
||||
|
||||
@@ -63,15 +63,6 @@
|
||||
:track-icon :face-id})
|
||||
|
||||
(h/describe "slide-button"
|
||||
(h/before-each
|
||||
(fn []
|
||||
(h/use-fake-timers)))
|
||||
|
||||
(h/after-each
|
||||
(fn []
|
||||
(h/clear-all-timers)
|
||||
(h/use-real-timers)))
|
||||
|
||||
(h/test "render the correct text"
|
||||
(h/render [slide-button/view default-props])
|
||||
(h/is-truthy (h/get-by-text :test-track-text)))
|
||||
@@ -99,12 +90,9 @@
|
||||
slide-dest constants/default-width
|
||||
gesture-events (slide-events slide-dest)]
|
||||
(h/render [slide-button/view props])
|
||||
(let [promise
|
||||
(-> (act #(gestures-jest/fireGestureHandler (get-by-gesture-test-id :slide-button-gestures)
|
||||
gesture-events)))]
|
||||
(h/advance-timers-by-time 250)
|
||||
(-> promise
|
||||
(.then #(h/was-called (:on-complete props)))))))
|
||||
(-> (act #(gestures-jest/fireGestureHandler (get-by-gesture-test-id :slide-button-gestures)
|
||||
gesture-events))
|
||||
(.then #(h/was-called (:on-complete props))))))
|
||||
|
||||
(h/test
|
||||
"doesn't call on-complete if the slide was incomplete"
|
||||
@@ -112,9 +100,6 @@
|
||||
slide-dest (- constants/default-width 100)
|
||||
gesture-events (slide-events slide-dest)]
|
||||
(h/render [slide-button/view props])
|
||||
(let [promise (-> (act #(gestures-jest/fireGestureHandler (get-by-gesture-test-id
|
||||
:slide-button-gestures)
|
||||
gesture-events)))]
|
||||
(h/advance-timers-by-time 250)
|
||||
(-> promise (.then #(h/was-not-called (:on-complete props))))))))
|
||||
|
||||
(-> (act #(gestures-jest/fireGestureHandler (get-by-gesture-test-id :slide-button-gestures)
|
||||
gesture-events))
|
||||
(.then #(h/was-not-called (:on-complete props)))))))
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
(ns quo2.components.buttons.style)
|
||||
|
||||
(def blur-view
|
||||
{:position :absolute
|
||||
:top 0
|
||||
:left 0
|
||||
:right 0
|
||||
:bottom 0})
|
||||
|
||||
(defn before-icon-style
|
||||
[{:keys [override-margins size icon-container-size icon-background-color icon-container-rounded?
|
||||
icon-size]}]
|
||||
(merge
|
||||
{:margin-left (or (get override-margins :left)
|
||||
(if (= size 40) 12 8))
|
||||
:margin-right (or (get override-margins :right) 4)
|
||||
:align-items :center
|
||||
:justify-content :center}
|
||||
(when icon-container-size
|
||||
{:width icon-container-size
|
||||
:height icon-container-size})
|
||||
(when icon-background-color
|
||||
{:background-color icon-background-color})
|
||||
(when icon-container-rounded?
|
||||
{:border-radius (/ (or icon-container-size icon-size) 2)})))
|
||||
|
||||
(defn after-icon-style
|
||||
[{:keys [override-margins size icon-container-size icon-background-color icon-container-rounded?
|
||||
icon-size]}]
|
||||
(merge
|
||||
{:margin-left (or (get override-margins :left) 4)
|
||||
:margin-right (or (get override-margins :right)
|
||||
(if (= size 40) 12 8))
|
||||
:align-items :center
|
||||
:justify-content :center}
|
||||
(when icon-container-size
|
||||
{:width icon-container-size
|
||||
:height icon-container-size})
|
||||
(when icon-background-color
|
||||
{:background-color icon-background-color})
|
||||
(when icon-container-rounded?
|
||||
{:border-radius (/ (or icon-container-size icon-size) 2)})))
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user