Compare commits

..
746 changed files with 12158 additions and 16374 deletions
-15
View File
@@ -14,21 +14,6 @@
clojure.set set
clojure.walk walk
taoensso.timbre log}}
:shadowed-var {:level :error
;; We temporarily use :include to define an
;; allowlist of core Clojure vars. In the
;; future, as we progressively fix shadowed
;; vars, we should be able to delete this
;; option and lint all vars.
:include [comparator
count
identity
iter
key
str
symbol
time
val]}
:invalid-arity {:skip-args [status-im.utils.fx/defn utils.re-frame/defn]}
;; TODO remove number when this is fixed
;; https://github.com/borkdude/clj-kondo/issues/867
+37
View File
@@ -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"
}
}
}
+1
View File
@@ -22,6 +22,7 @@ KEYCARD_TEST_MENU=0
QR_READ_TEST_MENU=1
ENABLE_ROOT_ALERT=1
ENABLE_QUO_PREVIEW=1
MAX_IMAGES_BATCH=5
APN_TOPIC=im.status.ethereum.pr
COMMUNITIES_ENABLED=1
DATABASE_MANAGEMENT_ENABLED=1
+1
View File
@@ -21,6 +21,7 @@ COMMANDS_ENABLED=1
KEYCARD_TEST_MENU=1
QR_READ_TEST_MENU=1
ENABLE_ROOT_ALERT=0
MAX_IMAGES_BATCH=5
APN_TOPIC=im.status.ethereum.pr
VERIFY_TRANSACTION_CHAIN_ID=5
VERIFY_ENS_CHAIN_ID=5
+1
View File
@@ -26,6 +26,7 @@ VERIFY_TRANSACTION_CHAIN_ID=5
VERIFY_ENS_CHAIN_ID=5
TEST_STATEOFUS=1
BLANK_PREVIEW=0
MAX_IMAGES_BATCH=5
DATABASE_MANAGEMENT_ENABLED=1
COMMUNITIES_ENABLED=1
COMMUNITIES_MANAGEMENT_ENABLED=1
+1
View File
@@ -17,6 +17,7 @@ RPC_NETWORKS_ONLY=0
PARTITIONED_TOPIC=0
CONTRACT_NODES=1
ENABLE_ROOT_ALERT=1
MAX_IMAGES_BATCH=5
BLANK_PREVIEW=0
COMMUNITIES_ENABLED=1
DATABASE_MANAGEMENT_ENABLED=1
+3 -3
View File
@@ -1,4 +1,4 @@
module.exports = {
root: true,
extends: '@react-native-community',
};
root: true,
extends: '@react-native-community',
};
+1 -1
View File
@@ -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)
```
...
```
```
+5 -4
View File
@@ -1,8 +1,8 @@
---
name: MVPBug Report
about: MVPBug Report
name: Bug Report
about: Bug Report
title: ''
labels: 'E:Mobile Bugfixes MVP'
labels: bug
assignees: ''
---
@@ -22,7 +22,8 @@ assignees: ''
### Reproduction
1.
1) Open Status
2)
### Additional Information
-30
View File
@@ -1,30 +0,0 @@
---
name: Wont fix Report
about: to facilitate future handling, identify and address non-urgent issues that won't be prioritized in the near future
title: ''
labels: likely_wont_fix
assignees: ''
---
## Problem
#### Expected behavior
#### Actual behavior
### Reproduction
1.
### Additional Information
- Status version: release
- Operating System: Android, iOS
[comment]: # (Please, add logs/notes if necessary)
-9
View File
@@ -1,9 +0,0 @@
*
!*.js
!*/
*.clj-kondo
*.shadow-cljs
modules
result
target
component-spec
+5 -7
View File
@@ -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,
};
+25 -24
View File
@@ -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
+17 -12
View File
@@ -2,9 +2,7 @@
[<img src="https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png" alt="Get it on Google Play" height="80"/>](https://play.google.com/store/apps/details?id=im.status.ethereum)
[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" alt="Get it on F-Droid" height="80"/>](https://f-droid.org/packages/im.status.ethereum/)
[Get it on Github](https://github.com/status-im/status-mobile/releases)
[<img src="doc/github_badge.png" alt="Get it on Github" height="80"/>](https://github.com/status-im/status-mobile/releases)
Join us in creating a browser, messenger, and gateway to a decentralized world. Status is a free (libre) open source mobile client targeting Android & iOS built entirely on [Ethereum](https://ethereum.org/) technologies. That's right, no middle men and `go-ethereum` running directly on your device.
@@ -22,31 +20,31 @@ If this interests you, **help us make Status a reality** - anyone can contribute
## How to Contribute?
Go straight to the [docs](doc/) and choose what interests you:
Go straight to the [docs](https://status.im/docs) or [join our chat](https://join.status.im/chat/public/status) and choose what interests you:
- **Developer** Developers are the heart of software and to keep Status beating
we need all the help we can get! If you're looking to code in ClojureScript or
Golang then Status is the project for you! We use React Native and there is even
some Java/Objective-C too! Want to learn more about it? Start by reading our
[Developer Introduction](doc/starting-guide.md) which guides you
[Developer Introduction](https://status.im/developer_tools/) which guides you
through the technology stack and start browsing [beginner
issues](https://github.com/status-im/status-mobile/issues?utf8=%E2%9C%93&q=is%3Aopen%20is%3Aissue%20label%3A%22good%20first%20issue%22%20).
Then you can read how to [Build
Status](doc/starting-guide.md), which talks about managing
project dependencies, coding guidelines and testing procedures.
Check out our [coding guidelines](doc/new-guidelines.md).
Status](https://status.im/technical/build_status/), which talks about managing
project dependencies, coding guidelines and testing procedures. The [doc/](doc/)
directory also has valuable information for contributors.
- **Community Management**
Metcalfe's law states that the value of a network is proportional to the square of the number of connected users of the system - without community Status is meaningless. We're looking to create a positive, fun environment to explore new ideas, experiment and grow the Status community. Building a community takes a lot of work but the people you'll meet and long lasting relationships you form will be well worth it, check out our [Mission and Community Principles](https://status.im/about)
- **Specification / Documentation**
John Dewey once said "Education is not preparation for life; education is life *itself* ". Developers & Designers need guidance and it all starts from documentation and specifications. Our software is only as good as its documentation, check out our [docs](doc/) and see how you can improve what we have.
John Dewey once said "Education is not preparation for life; education is life *itself* ". Developers & Designers need guidance and it all starts from documentation and specifications. Our software is only as good as its documentation, head over to our [docs](https://status.im/docs) and see how you can improve what we have.
- **Blog Writing**
Content is King, keeping our blog up to date and informing the community of news helps keep everyone on the same page.
Content is King, keeping our blog up to date and informing the community of news helps keep everyone on the same page. [Jump into our chat](https://join.status.im/chat/public/status) and discuss with the team how you can contribute!
- **Testers**
It's bug hunting season! Status is currently under active development and there is sure to be a bunch of learning, [build status from scratch](doc/starting-guide.md) or if an android user check out our [nightly builds](https://status.im/nightly). You can shake your phone to submit bug reports, or start browsing our [Github Issues](https://github.com/status-im/status-mobile/issues). Every bug you find brings Status closer to stable, usable software for everyone to enjoy!
It's bug hunting season! Status is currently under active development and there is sure to be a bunch of learning, [build status from scratch](https://status.im/technical/build_status/) or if an android user check out our [nightly builds](https://status.im/nightly). You can shake your phone to submit bug reports, or start browsing our [Github Issues](https://github.com/status-im/status-mobile/issues). Every bug you find brings Status closer to stable, usable software for everyone to enjoy!
- **Security**
Status is a visual interface to make permanent changes on the Blockchain, it handles crypto-tokens that have real value and allows 3rd party code execution. Security is paramount to its success. You are given permission to break Status as hard as you can, as long as you share your findings with the community!
@@ -54,6 +52,9 @@ Status is a visual interface to make permanent changes on the Blockchain, it han
- **Evangelism**
Help us spread the word! Tell a friend *right now*, in fact tell **everyone** - yell from a mountain if you have to, every person counts! If you've got a great story to tell or have some interesting way you've spread the word about Status let us know about it in our [chat](https://join.status.im/chat/public/status)
## Status API
View our [API Docs](https://status.im/developer_tools/status_web_api.html) and learn how to integrate your DApp into Status. You can read more about how to add your DApp to Status [here](https://status.im/developer_tools/add_your_dapp.html).
## Give me Binaries!
You can get our Beta builds for both Android and iOS on our [website](https://status.im), through our [nightly builds](https://status.im/nightly/) or by [building it yourself](https://status.im/technical/build_status/).
@@ -67,8 +68,12 @@ Without the dedication of these outstanding individuals, Status would not exist.
## Contact us
Feel free to email us at [support@status.im](mailto:support@status.im).
Feel free to email us at [support@status.im](mailto:support@status.im) or better yet, [join our chat](https://join.status.im/chat/public/status).
## License
Licensed under the [Mozilla Public License v2.0](https://github.com/status-im/status-mobile/blob/develop/LICENSE.md)
## Testing Supported by
[![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=SFBWQ3k5R2tnT2t6UGsxU1h1U0g3VFlCNnoxVTRHYWNoTDhsb1laaTJZWT0tLUZMUm5sSVFBSU9qSWM1RUJvK1I3Z3c9PQ==--ad15ae7992b432b33743749d40318952415bd98f)](https://www.browserstack.com/automate/public-build/SFBWQ3k5R2tnT2t6UGsxU1h1U0g3VFlCNnoxVTRHYWNoTDhsb1laaTJZWT0tLUZMUm5sSVFBSU9qSWM1RUJvK1I3Z3c9PQ==--ad15ae7992b432b33743749d40318952415bd98f)
+13 -2
View File
@@ -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();
}
}
}
}
-2
View File
@@ -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
+5
View File
@@ -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
+1 -1
View File
@@ -1,4 +1,4 @@
{
"name": "StatusIm",
"displayName": "StatusIm"
}
}
+23 -18
View File
@@ -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 -2
View File
@@ -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
View File
@@ -1,4 +1,3 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.7.9'
pipeline {
+1 -2
View File
@@ -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 -2
View File
@@ -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 -2
View File
@@ -1,4 +1,3 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.7.9'
pipeline {
@@ -74,7 +73,7 @@ pipeline {
sh 'cp -f $TEST_ETH_ACCOUNTS_FILE users.py'
sh """
python3 -m pytest \
--numprocesses 6 \
--numprocesses 4 \
--rerun_count=2 \
--testrail_report=True \
-m testrail_id \
+1 -2
View File
@@ -1,4 +1,3 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.7.9'
pipeline {
@@ -123,7 +122,7 @@ pipeline {
sh 'cp -f $TEST_ETH_ACCOUNTS_FILE users.py'
sh """
python3 -m pytest \
--numprocesses 6 \
--numprocesses 4 \
--rerun_count=2 \
--testrail_report=True \
-k \"${params.KEYWORD_EXPRESSION}\" \
-1
View File
@@ -1,4 +1,3 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.7.9'
pipeline {
-1
View File
@@ -1,4 +1,3 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.7.9'
pipeline {
+12 -18
View File
@@ -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
View File
@@ -1,4 +1,3 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.7.9'
pipeline {
-1
View File
@@ -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
View File
@@ -1,4 +1,3 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.7.9'
pipeline {
-1
View File
@@ -24,7 +24,6 @@
[Patching](patching.md)
[Creating a pixel perfect UI](pixel-perfection.md)
## Testing
+1 -1
View File
@@ -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.
-31
View File
@@ -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
-46
View File
@@ -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
View File
@@ -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`
Binary file not shown.

Before

Width:  |  Height:  |  Size: 564 KiB

-46
View File
@@ -80,52 +80,6 @@ This mistake mostly happens with functional components
it's important to name functional components with `f-` prefix
### Component props and API scheme to match Figma as closely as possible
Ideally, the prop names for components (particularly in quo2 Design System) should match the Figma properties as best as possible. This makes it easier for the developer using that component to configure it correctly for the screen it is being used on and avoids unnecessary overwrites and adjustments being made.
#### Avoid unnecessarily grouping categories to reduce the number of props
For example in Figma if there is a component and it has the following variants:
|theme: "light" blur: "False"|theme: "dark" blur: "False"|theme: "light" blur: "True"|theme: "dark" blur: "True"|
|----------------------------|---------------------------|---------------------------|---------------------------|
| type :neutral label "ABC" | type :neutral label "ABC" | | |
| type :active label "ABC" | type :active label "ABC" | | |
| type :danger label "ABC" | type :danger label "ABC" | type :danger label "ABC" | type :danger label "ABC" |
```clojure
;; bad
"theme - :light or :dark
type - can be :neutral :active :danger :danger-blur"
(defn my-component [{:keys [theme type]} label])
;; good
"theme - :light or :dark
type - can be :neutral :active :danger
blur? - boolean
"
(defn my-component [{:keys [theme blur? type]} label])
```
Please note this is only for the external API of the component and there should be no restriction of how the component manages its internal API as that will not affect the developer using the component with the issues described above.
In some cases this is not always possible or does not make sense. However the thought process should be how easy will it be for another developer to use this component with the correct configuration given the screen designs for Figma.
#### Avoid unnecessarily renaming props
In general it can be helpful to avoid renaming props from their counterpart in Figma.
For example if Figma has sizes `:small`, `:medium` and `:large`
```clojure
;; bad
":size - :little, :default or :big"
(defn my-component [{:keys [size]}])
;; good
":size - :small, :medium or :large"
(defn my-component [{:keys [size]}])
```
### Component styles
Prefer to define styles in a separate file named `style.cljs`, colocated with
-17
View File
@@ -1,17 +0,0 @@
# Pixel Perfection
The Status Mobile team aims to align the design implementation perfectly according to a given screens respective Figma design spec.
Currently the Figma Designs match up with an "iPhone 11 Pro" screen size.
To test your implementation is correct you can take the following steps
- Open a new Figma file so that you have write privileges.
- Copy in the component or screen from the Figma file.
- Using the "iPhone 11 Pro" simulator (it is the default now) you take a screenshot of your component and paste it into your Figma file.
- To get the right size, set your screenshot to width 375px
![](images/pixel-perfection/layer-width.png)
- Lower the opacity so you can see it sitting on top of the Figma mock ups.
+2 -2
View File
@@ -1,2 +1,2 @@
import 'node-libs-react-native/globals';
import './result/index.js';
import "node-libs-react-native/globals";
import "./result/index.js";
+1
View File
@@ -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
View File
@@ -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
+25
View File
@@ -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;
+1 -1
View File
@@ -3,4 +3,4 @@
"version" : 1,
"author" : "xcode"
}
}
}
+11 -11
View File
@@ -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'),
},
};
@@ -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");
@@ -626,10 +615,10 @@ class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventL
}
@ReactMethod
public void loginWithKeycard(final String accountData, final String password, final String chatKey, final String nodeConfigJSON) {
public void loginWithKeycard(final String accountData, final String password, final String chatKey) {
Log.d(TAG, "loginWithKeycard");
this.migrateKeyStoreDir(accountData, password);
String result = Statusgo.loginWithKeycard(accountData, password, chatKey, nodeConfigJSON);
String result = Statusgo.loginWithKeycard(accountData, password, chatKey);
if (result.startsWith("{\"error\":\"\"")) {
Log.d(TAG, "LoginWithKeycard result: " + result);
} else {
@@ -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,25 +623,16 @@ 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
nodeConfigJSON:(NSString *)nodeConfigJSON) {
chatKey:(NSString *)chatKey) {
#if DEBUG
NSLog(@"LoginWithKeycard() method called");
#endif
[self getExportDbFilePath];
[self migrateKeystore:accountData password:password];
NSString *result = StatusgoLoginWithKeycard(accountData, password, chatKey, nodeConfigJSON);
NSString *result = StatusgoLoginWithKeycard(accountData, password, chatKey);
NSLog(@"%@", result);
}
@@ -907,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
@@ -1157,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
View File
@@ -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);
+3 -72
View File
@@ -833,37 +833,6 @@ void _SaveAccountAndLogin(const FunctionCallbackInfo<Value>& args) {
}
void _CreateAccountAndLogin(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 SaveAccountAndLogin")));
return;
}
// Check the argument types
if (!args[0]->IsString()) {
isolate->ThrowException(Exception::TypeError(
String::NewFromUtf8Literal(isolate, "Wrong argument type for 'settingsJSON'")));
return;
}
String::Utf8Value arg0Obj(isolate, args[0]->ToString(context).ToLocalChecked());
char *arg0 = *arg0Obj;
// Call exported Go function, which returns a C string
char *c = CreateAccountAndLogin(arg0);
Local<String> ret = String::NewFromUtf8(isolate, c).ToLocalChecked();
args.GetReturnValue().Set(ret);
delete c;
}
void _GenerateAlias(const FunctionCallbackInfo<Value>& args) {
Isolate* isolate = args.GetIsolate();
Local<Context> context = isolate->GetCurrentContext();
@@ -1041,7 +1010,7 @@ void _LoginWithKeycard(const FunctionCallbackInfo<Value>& args) {
Isolate* isolate = args.GetIsolate();
Local<Context> context = isolate->GetCurrentContext();
if (args.Length() != 4) {
if (args.Length() != 3) {
// Throw an Error that is passed back to JavaScript
isolate->ThrowException(Exception::TypeError(
String::NewFromUtf8Literal(isolate, "Wrong number of arguments for LoginWithKeycard")));
@@ -1065,11 +1034,6 @@ void _LoginWithKeycard(const FunctionCallbackInfo<Value>& args) {
String::NewFromUtf8Literal(isolate, "Wrong argument type for 'keyHex'")));
return;
}
if (!args[3]->IsString()) {
isolate->ThrowException(Exception::TypeError(
String::NewFromUtf8Literal(isolate, "Wrong argument type for 'nodeConfigJSON'")));
return;
}
String::Utf8Value arg0Obj(isolate, args[0]->ToString(context).ToLocalChecked());
@@ -1078,11 +1042,9 @@ void _LoginWithKeycard(const FunctionCallbackInfo<Value>& args) {
char *arg1 = *arg1Obj;
String::Utf8Value arg2Obj(isolate, args[2]->ToString(context).ToLocalChecked());
char *arg2 = *arg2Obj;
String::Utf8Value arg3Obj(isolate, args[3]->ToString(context).ToLocalChecked());
char *arg3 = *arg3Obj;
// Call exported Go function, which returns a C string
char *c = LoginWithKeycard(arg0, arg1, arg2, arg3);
char *c = LoginWithKeycard(arg0, arg1, arg2);
Local<String> ret = String::NewFromUtf8(isolate, c).ToLocalChecked();
args.GetReturnValue().Set(ret);
@@ -1911,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);
@@ -1967,7 +1900,6 @@ void init(Local<Object> exports) {
NODE_SET_METHOD(exports, "hashMessage", _HashMessage);
NODE_SET_METHOD(exports, "resetChainData", _ResetChainData);
NODE_SET_METHOD(exports, "saveAccountAndLogin", _SaveAccountAndLogin);
NODE_SET_METHOD(exports, "createAccountAndLogin", _CreateAccountAndLogin);
NODE_SET_METHOD(exports, "generateAlias", _GenerateAlias);
NODE_SET_METHOD(exports, "validateMnemonic", _ValidateMnemonic);
NODE_SET_METHOD(exports, "multiformatSerializePublicKey", _MultiformatSerializePublicKey);
@@ -1990,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)
+1 -1
View File
@@ -18,4 +18,4 @@
"url": "https://github.com/status-im/react-native-status/issues"
},
"homepage": "https://github.com/status-im/react-native-status#readme"
}
}
-13
View File
@@ -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
View File
File diff suppressed because it is too large Load Diff
+11 -34
View File
@@ -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
View File
@@ -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
+4 -3
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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 ];
}
+2 -6
View File
@@ -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" ];
+3 -4
View File
@@ -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"
'';
}
-23
View File
@@ -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
-48
View File
@@ -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
'';
}
+1 -7
View File
@@ -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
View File
@@ -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
View File
@@ -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 -6
View File
@@ -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
+1 -1
View File
@@ -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
}
-37
View File
@@ -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
-8
View File
@@ -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
View File
@@ -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
View File
@@ -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
+5 -6
View File
@@ -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,14 +36,14 @@
"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": "^4.0.1",
"react-native-draggable-flatlist": "^3.0.3",
"react-native-fast-image": "^8.5.11",
"react-native-fetch-polyfill": "^1.1.2",
"react-native-fs": "^2.14.1",
@@ -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
View File
@@ -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,
},
},
},
};
+1 -1
View File
@@ -194,4 +194,4 @@
}
}
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 421 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 414 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 295 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 540 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 300 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 566 KiB

+365 -361
View File
@@ -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.
Binary file not shown.

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