Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6221b42f2a | ||
|
|
7ef466078a | ||
|
|
4b2d62ee1f | ||
|
|
05073e7453 | ||
|
|
fa11c232cc | ||
|
|
3038ceeb82 | ||
|
|
d2e38772b9 | ||
|
|
409c0a9e60 | ||
|
|
4b98f0e8de | ||
|
|
264b7ffab9 | ||
|
|
c71224e73e | ||
|
|
3c278ed06c | ||
|
|
d714dc1590 | ||
|
|
d2840885dd | ||
|
|
87247af86b | ||
|
|
159ad02e7a | ||
|
|
ce322c9537 | ||
|
|
13a1ee7479 | ||
|
|
c1f24fb1bb | ||
|
|
4afe251086 | ||
|
|
ac3eb3e660 | ||
|
|
638ec98db5 | ||
|
|
78131c1028 | ||
|
|
5655efa448 | ||
|
|
c008c01bc1 | ||
|
|
7e1af5b80d | ||
|
|
ee4bcf9116 | ||
|
|
1aff364595 | ||
|
|
929ec6a453 | ||
|
|
341497e98d | ||
|
|
c275205bed | ||
|
|
ebb110e6e3 | ||
|
|
ab973076eb | ||
|
|
c78bdda717 | ||
|
|
b7a138118a | ||
|
|
f03e11c877 | ||
|
|
6c5350573d | ||
|
|
521765e312 | ||
|
|
5f362f333f | ||
|
|
6aae68ba04 | ||
|
|
dbaaa54c83 | ||
|
|
e5913cc3ea | ||
|
|
0226a92c07 | ||
|
|
d7db401cb2 | ||
|
|
7e54aa0b0d | ||
|
|
4774b0f5e5 | ||
|
|
6aa38de7c7 | ||
|
|
a973976123 | ||
|
|
03aac0e4ce | ||
|
|
fac368521b | ||
|
|
51b9253734 | ||
|
|
08e6b8164e | ||
|
|
9a8354f783 | ||
|
|
6c0c742676 | ||
|
|
e0ed2a250b | ||
|
|
2f988fcd47 | ||
|
|
ee71117111 | ||
|
|
3e9d5dde54 | ||
|
|
2eed30be8f | ||
|
|
8e49a06dbe | ||
|
|
fb326bbf4e | ||
|
|
52c6687608 | ||
|
|
cfefef6b75 | ||
|
|
e6ba40ac17 | ||
|
|
efbf93f6e2 | ||
|
|
6eb2029c51 | ||
|
|
55bab9454a | ||
|
|
0ca6ee3934 | ||
|
|
0649c66dde | ||
|
|
1b0374a156 |
@@ -12,11 +12,11 @@ status-im.chat.models.message-content/actions
|
||||
status-im.chat.models.message-content/blank-string
|
||||
status-im.chat.models.message-content/sorted-ranges
|
||||
status-im.ethereum.mnemonic/words->passphrase
|
||||
status-im.native-module.core/listener
|
||||
status-im.native-module.core/multiaccount-reset
|
||||
status-im.native-module.core/extract-group-membership-signatures
|
||||
status-im.native-module.core/sign-group-membership
|
||||
status-im.native-module.core/update-mailservers
|
||||
native-module.core/listener
|
||||
native-module.core/multiaccount-reset
|
||||
native-module.core/extract-group-membership-signatures
|
||||
native-module.core/sign-group-membership
|
||||
native-module.core/update-mailservers
|
||||
status-im.ethereum.abi-spec/bytes-to-hex
|
||||
status-im.android.core/init
|
||||
status-im.chat.models.message/transport-keys
|
||||
|
||||
@@ -72,7 +72,7 @@ public class MainApplication extends NavigationApplication {
|
||||
OkHttpClientProvider.setOkHttpClientFactory(new StatusOkHttpClientFactory());
|
||||
|
||||
WebView.setWebContentsDebuggingEnabled(BuildConfig.DEBUG_WEBVIEW == "1");
|
||||
initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
|
||||
//initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
|
||||
}
|
||||
/**
|
||||
* Loads Flipper in React Native templates. Call this in the onCreate method with something like
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.7.2'
|
||||
library 'status-jenkins-lib@v1.7.3'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.7.2'
|
||||
library 'status-jenkins-lib@v1.7.3'
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux' }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.7.2'
|
||||
library 'status-jenkins-lib@v1.7.3'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.7.2'
|
||||
library 'status-jenkins-lib@v1.7.3'
|
||||
|
||||
pipeline {
|
||||
agent { label params.AGENT_LABEL }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.7.2'
|
||||
library 'status-jenkins-lib@v1.7.3'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
@@ -9,7 +9,7 @@ pipeline {
|
||||
options {
|
||||
timestamps()
|
||||
/* Prevent Jenkins jobs from running forever */
|
||||
timeout(time: 10, unit: 'MINUTES')
|
||||
timeout(time: 15, unit: 'MINUTES')
|
||||
/* Limit builds retained */
|
||||
buildDiscarder(logRotator(
|
||||
numToKeepStr: '10',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.7.2'
|
||||
library 'status-jenkins-lib@v1.7.3'
|
||||
|
||||
pipeline {
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.7.2'
|
||||
library 'status-jenkins-lib@v1.7.3'
|
||||
|
||||
pipeline {
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.7.2'
|
||||
library 'status-jenkins-lib@v1.7.3'
|
||||
|
||||
pipeline {
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.7.2'
|
||||
library 'status-jenkins-lib@v1.7.3'
|
||||
|
||||
pipeline {
|
||||
agent { label 'macos' }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.7.2'
|
||||
library 'status-jenkins-lib@v1.7.3'
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux' }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.7.2'
|
||||
library 'status-jenkins-lib@v1.7.3'
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
[Working on PR together with QA team](pipeline_process.md)
|
||||
|
||||
[Debugging](debugging.md)
|
||||
|
||||
|
||||
## Testing
|
||||
|
||||
@@ -91,30 +91,11 @@ These guidelines make db.cljs namespaces the place to go when making changes to
|
||||
|
||||
- If manual QA is not needed but all tests don't pass, you can ping @churik or @Serhy to confirm that failed E2E tests are not unrelated.
|
||||
|
||||
## Enabling debug logs
|
||||
Calls to `log/debug` will not be printed to the console by default. It can be enabled under "Advanced settings" in the app:
|
||||
|
||||

|
||||
|
||||
## Translations
|
||||
The app relies on system locale to select a language from the [list of supported languages](https://github.com/status-im/status-mobile/blob/bda73867471cf2bb8a68b1cc27c9f94b92d9a58b/src/status_im/i18n_resources.cljs#L9). It falls back to English in cash the system locale is not supported.
|
||||
|
||||
We use Lokalise App to manage [translations](https://translate.status.im/). In case you need to add/remove a key to translations, you only need to change `en.json`. Missing keys fallback to `en.json`. The actual translations will be added by Lokalise.
|
||||
|
||||
## re-frisk
|
||||
re-frisk is a state visualization tool written by our very own Andrey (@flexsurfer). To start re-frisk, execute the following command:
|
||||
```bash
|
||||
$ yarn shadow-cljs run re-frisk-remote.core/start
|
||||
```
|
||||
|
||||
or you can also use make:
|
||||
|
||||
```bash
|
||||
$ make run-re-frisk
|
||||
```
|
||||
|
||||
A server will be started at http://localhost:4567. It might show "not connected" at first. Don't worry and just start using the app. The events and state will populate.
|
||||
|
||||
## Merging approved PRs
|
||||
|
||||
We don't Github's UI to merge. Instead `./scripts/merge-pr.sh` is used to sign and merge PR to `develop`. You first need to enable [GPG signing on you commits](https://github.com/status-im/status-mobile/blob/develop/STARTING_GUIDE.md#configure-gpg-keys-for-signing-commits).
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
# Debugging
|
||||
|
||||
## Inspecting re-frame with re-frisk
|
||||
`re-frisk` is a state visualization tool written by our very own Andrey (@flexsurfer). With its help you can inspect the current state of app-db, watch event, etc.
|
||||
|
||||

|
||||
|
||||
To start `re-frisk`, execute the following command:
|
||||
```bash
|
||||
$ yarn shadow-cljs run re-frisk-remote.core/start
|
||||
```
|
||||
|
||||
or you can also use make:
|
||||
|
||||
```bash
|
||||
$ make run-re-frisk
|
||||
```
|
||||
|
||||
A server will be started at http://localhost:4567. It might show "not connected" at first. Don't worry and just start using the app. The events and state will populate.
|
||||
|
||||
More details about re-frisk are on the [project page](https://github.com/flexsurfer/re-frisk).
|
||||
|
||||
## Enabling debug logs
|
||||
Calls to `log/debug` will not be printed to the console by default. It can be enabled under "Advanced settings" in the app:
|
||||
|
||||

|
||||
|
||||
|
||||
## Checking status-go logs
|
||||
While status mobile works it saves logs from `status-go` to `geth.log` file.
|
||||
|
||||
|
||||
### Checking logs from physical device
|
||||
To obtain `geth.log` from physical device you need to shake it and in an opened menu select "Share logs".
|
||||
|
||||

|
||||
|
||||
|
||||
### Checking logs from iOS Simulator
|
||||
When developing with iOS simulator it is more convenient to see the `geth.log` updates in real-time.
|
||||
To do this:
|
||||
- open Activity Monitor
|
||||
- find the "StatusIm" app and doubleclick it
|
||||
- in the opened window select "Open files and ports" and find the full path to `geth.log` (note that it won't appear until you login to Status app)
|
||||
|
||||

|
||||
|
||||
|
||||
## Tips
|
||||
### From @ilmotta:
|
||||
|
||||
Something I find extremely convenient for Android is to use `adb` to tail logs. I don't use macOS so I don't know if the iOS simulator offers a CLI interface with the same capabilities.
|
||||
|
||||
But here's what I use for example:
|
||||
|
||||
```
|
||||
adb shell tail -n 10 -f /storage/emulated/0/Android/data/im.status.ethereum.debug/files/Download/geth.log | grep 'waku.relay'
|
||||
```
|
||||
|
||||
Also to inspect logs in a more flexible manner, instead of the strict output from `make run-metro`, I prefer `adb logcat`. Combined with enabling status-mobile logs in debug by default plus filtering the logs to only what I care during development, I find this helps me inspect the app without running re-frisk because with the debug log level I can already see which events are dispatched (one of the features I like the most from re-frisk).
|
||||
|
||||
```
|
||||
adb logcat | grep 'ReactNativeJS\|StatusModule\|GoLog'
|
||||
```
|
||||
|
After Width: | Height: | Size: 255 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 308 KiB |
|
After Width: | Height: | Size: 16 KiB |
@@ -234,7 +234,7 @@ PODS:
|
||||
- React
|
||||
- react-native-blob-util (0.13.18):
|
||||
- React-Core
|
||||
- react-native-blur (4.3.2):
|
||||
- react-native-blur (4.3.3):
|
||||
- React-Core
|
||||
- react-native-camera-kit (8.0.4):
|
||||
- React
|
||||
@@ -706,7 +706,7 @@ SPEC CHECKSUMS:
|
||||
React-logger: 85f4ef06b9723714b2dfa5b0e5502b673b271b58
|
||||
react-native-background-timer: 1f7d560647b40e6a60b01c452ba29c54bf581fc4
|
||||
react-native-blob-util: 600972b1782380a5a7d5db61a3817ea32349dae9
|
||||
react-native-blur: 4db8c7556566df4e8714c1af5762a4ebc99175d5
|
||||
react-native-blur: c6d0a1dc2b4b519f7afe3b14d8151998632b6d18
|
||||
react-native-camera-kit: 498a6d111a904834e0824e9073cfadef7303235f
|
||||
react-native-cameraroll: 88f4e62d9ecd0e1f253abe4f685474f2ea14bfa2
|
||||
react-native-config: 5330c8258265c1e5fdb8c009d2cabd6badd96727
|
||||
|
||||
@@ -1354,11 +1354,12 @@ class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventL
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void convertToKeycardAccount(final String keyUID, final String accountData, final String options, final String password, final String newPassword, final Callback callback) throws JSONException {
|
||||
public void convertToKeycardAccount(final String keyUID, final String accountData, final String options, final String keycardUID, final String password,
|
||||
final String newPassword, final Callback callback) throws JSONException {
|
||||
final String keyStoreDir = this.getKeyStorePath(keyUID);
|
||||
executeRunnableStatusGoMethod(() -> {
|
||||
Statusgo.initKeystore(keyStoreDir);
|
||||
return Statusgo.convertToKeycardAccount(accountData, options, password, newPassword);
|
||||
return Statusgo.convertToKeycardAccount(accountData, options, keycardUID, password, newPassword);
|
||||
}, callback);
|
||||
}
|
||||
|
||||
|
||||
@@ -692,6 +692,7 @@ RCT_EXPORT_METHOD(reEncryptDbAndKeystore:(NSString *)keyUID
|
||||
RCT_EXPORT_METHOD(convertToKeycardAccount:(NSString *)keyUID
|
||||
accountData:(NSString *)accountData
|
||||
settings:(NSString *)settings
|
||||
keycardUID:(NSString *)keycardUID
|
||||
currentPassword:(NSString *)currentPassword
|
||||
newPassword:(NSString *)newPassword
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
@@ -700,7 +701,7 @@ RCT_EXPORT_METHOD(convertToKeycardAccount:(NSString *)keyUID
|
||||
#endif
|
||||
NSURL *multiaccountKeystoreDir = [self getKeyStoreDir:keyUID];
|
||||
StatusgoInitKeystore(multiaccountKeystoreDir.path);
|
||||
NSString *result = StatusgoConvertToKeycardAccount(accountData, settings, currentPassword, newPassword);
|
||||
NSString *result = StatusgoConvertToKeycardAccount(accountData, settings, keycardUID, currentPassword, newPassword);
|
||||
callback(@[result]);
|
||||
}
|
||||
|
||||
|
||||
@@ -118,7 +118,6 @@ com.airbnb.android:lottie:3.4.4
|
||||
com.android.databinding:baseLibrary:1.0-rc5
|
||||
com.android.databinding:baseLibrary:3.0.0
|
||||
com.android.databinding:baseLibrary:3.0.1
|
||||
com.android.databinding:baseLibrary:3.1.4
|
||||
com.android.databinding:baseLibrary:3.2.1
|
||||
com.android.databinding:baseLibrary:3.3.1
|
||||
com.android.databinding:baseLibrary:3.5.4
|
||||
@@ -126,28 +125,24 @@ com.android.databinding:baseLibrary:4.1.0
|
||||
com.android.databinding:compilerCommon:1.0-rc5
|
||||
com.android.databinding:compilerCommon:3.0.0
|
||||
com.android.databinding:compilerCommon:3.0.1
|
||||
com.android.databinding:compilerCommon:3.1.4
|
||||
com.android.tools.analytics-library:crash:26.2.1
|
||||
com.android.tools.analytics-library:crash:26.3.1
|
||||
com.android.tools.analytics-library:crash:26.5.4
|
||||
com.android.tools.analytics-library:crash:27.1.0
|
||||
com.android.tools.analytics-library:protos:26.0.0
|
||||
com.android.tools.analytics-library:protos:26.0.1
|
||||
com.android.tools.analytics-library:protos:26.1.4
|
||||
com.android.tools.analytics-library:protos:26.2.1
|
||||
com.android.tools.analytics-library:protos:26.3.1
|
||||
com.android.tools.analytics-library:protos:26.5.4
|
||||
com.android.tools.analytics-library:protos:27.1.0
|
||||
com.android.tools.analytics-library:shared:26.0.0
|
||||
com.android.tools.analytics-library:shared:26.0.1
|
||||
com.android.tools.analytics-library:shared:26.1.4
|
||||
com.android.tools.analytics-library:shared:26.2.1
|
||||
com.android.tools.analytics-library:shared:26.3.1
|
||||
com.android.tools.analytics-library:shared:26.5.4
|
||||
com.android.tools.analytics-library:shared:27.1.0
|
||||
com.android.tools.analytics-library:tracker:26.0.0
|
||||
com.android.tools.analytics-library:tracker:26.0.1
|
||||
com.android.tools.analytics-library:tracker:26.1.4
|
||||
com.android.tools.analytics-library:tracker:26.2.1
|
||||
com.android.tools.analytics-library:tracker:26.3.1
|
||||
com.android.tools.analytics-library:tracker:26.5.4
|
||||
@@ -160,7 +155,6 @@ com.android.tools.build.jetifier:jetifier-processor:1.0.0-alpha10
|
||||
com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta02
|
||||
com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta04
|
||||
com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta09
|
||||
com.android.tools.build:aapt2-proto:0.1.0
|
||||
com.android.tools.build:aapt2-proto:0.3.1
|
||||
com.android.tools.build:aapt2-proto:0.4.0
|
||||
com.android.tools.build:aapt2-proto:4.1.0-6503028
|
||||
@@ -168,7 +162,6 @@ com.android.tools.build:aapt2-proto:4.1.0-alpha01-6193524
|
||||
com.android.tools.build:aaptcompiler:4.1.0
|
||||
com.android.tools.build:apksig:3.0.0
|
||||
com.android.tools.build:apksig:3.0.1
|
||||
com.android.tools.build:apksig:3.1.4
|
||||
com.android.tools.build:apksig:3.2.1
|
||||
com.android.tools.build:apksig:3.3.1
|
||||
com.android.tools.build:apksig:3.5.4
|
||||
@@ -182,7 +175,6 @@ com.android.tools.build:builder-model:1.3.1
|
||||
com.android.tools.build:builder-model:1.5.0
|
||||
com.android.tools.build:builder-model:3.0.0
|
||||
com.android.tools.build:builder-model:3.0.1
|
||||
com.android.tools.build:builder-model:3.1.4
|
||||
com.android.tools.build:builder-model:3.2.1
|
||||
com.android.tools.build:builder-model:3.3.1
|
||||
com.android.tools.build:builder-model:3.5.4
|
||||
@@ -192,7 +184,6 @@ com.android.tools.build:builder-test-api:1.3.1
|
||||
com.android.tools.build:builder-test-api:1.5.0
|
||||
com.android.tools.build:builder-test-api:3.0.0
|
||||
com.android.tools.build:builder-test-api:3.0.1
|
||||
com.android.tools.build:builder-test-api:3.1.4
|
||||
com.android.tools.build:builder-test-api:3.2.1
|
||||
com.android.tools.build:builder-test-api:3.3.1
|
||||
com.android.tools.build:builder-test-api:3.5.4
|
||||
@@ -202,19 +193,16 @@ com.android.tools.build:builder:1.3.1
|
||||
com.android.tools.build:builder:1.5.0
|
||||
com.android.tools.build:builder:3.0.0
|
||||
com.android.tools.build:builder:3.0.1
|
||||
com.android.tools.build:builder:3.1.4
|
||||
com.android.tools.build:builder:3.2.1
|
||||
com.android.tools.build:builder:3.3.1
|
||||
com.android.tools.build:builder:3.5.4
|
||||
com.android.tools.build:builder:4.1.0
|
||||
com.android.tools.build:bundletool:0.1.0-alpha01
|
||||
com.android.tools.build:bundletool:0.5.0
|
||||
com.android.tools.build:bundletool:0.6.0
|
||||
com.android.tools.build:bundletool:0.9.0
|
||||
com.android.tools.build:bundletool:0.14.0
|
||||
com.android.tools.build:gradle-api:3.0.0
|
||||
com.android.tools.build:gradle-api:3.0.1
|
||||
com.android.tools.build:gradle-api:3.1.4
|
||||
com.android.tools.build:gradle-api:3.2.1
|
||||
com.android.tools.build:gradle-api:3.3.1
|
||||
com.android.tools.build:gradle-api:3.5.4
|
||||
@@ -224,13 +212,11 @@ com.android.tools.build:gradle-core:1.3.1
|
||||
com.android.tools.build:gradle-core:1.5.0
|
||||
com.android.tools.build:gradle-core:3.0.0
|
||||
com.android.tools.build:gradle-core:3.0.1
|
||||
com.android.tools.build:gradle-core:3.1.4
|
||||
com.android.tools.build:gradle:1.1.3
|
||||
com.android.tools.build:gradle:1.3.1
|
||||
com.android.tools.build:gradle:1.5.0
|
||||
com.android.tools.build:gradle:3.0.0
|
||||
com.android.tools.build:gradle:3.0.1
|
||||
com.android.tools.build:gradle:3.1.4
|
||||
com.android.tools.build:gradle:3.2.1
|
||||
com.android.tools.build:gradle:3.3.1
|
||||
com.android.tools.build:gradle:3.5.4
|
||||
@@ -240,7 +226,6 @@ com.android.tools.build:manifest-merger:24.3.1
|
||||
com.android.tools.build:manifest-merger:24.5.0
|
||||
com.android.tools.build:manifest-merger:26.0.0
|
||||
com.android.tools.build:manifest-merger:26.0.1
|
||||
com.android.tools.build:manifest-merger:26.1.4
|
||||
com.android.tools.build:manifest-merger:26.2.1
|
||||
com.android.tools.build:manifest-merger:26.3.1
|
||||
com.android.tools.build:manifest-merger:26.5.4
|
||||
@@ -252,7 +237,6 @@ com.android.tools.ddms:ddmlib:24.3.1
|
||||
com.android.tools.ddms:ddmlib:24.5.0
|
||||
com.android.tools.ddms:ddmlib:26.0.0
|
||||
com.android.tools.ddms:ddmlib:26.0.1
|
||||
com.android.tools.ddms:ddmlib:26.1.4
|
||||
com.android.tools.ddms:ddmlib:26.2.1
|
||||
com.android.tools.ddms:ddmlib:26.3.1
|
||||
com.android.tools.ddms:ddmlib:26.5.4
|
||||
@@ -272,7 +256,6 @@ com.android.tools.layoutlib:layoutlib-api:24.3.1
|
||||
com.android.tools.layoutlib:layoutlib-api:24.5.0
|
||||
com.android.tools.layoutlib:layoutlib-api:26.0.0
|
||||
com.android.tools.layoutlib:layoutlib-api:26.0.1
|
||||
com.android.tools.layoutlib:layoutlib-api:26.1.4
|
||||
com.android.tools.layoutlib:layoutlib-api:26.2.1
|
||||
com.android.tools.layoutlib:layoutlib-api:26.3.1
|
||||
com.android.tools.layoutlib:layoutlib-api:26.5.4
|
||||
@@ -289,7 +272,6 @@ com.android.tools.lint:lint-checks:24.5.0
|
||||
com.android.tools.lint:lint-checks:26.0.0
|
||||
com.android.tools.lint:lint-checks:26.0.1
|
||||
com.android.tools.lint:lint-checks:27.1.0
|
||||
com.android.tools.lint:lint-gradle-api:26.1.4
|
||||
com.android.tools.lint:lint-gradle-api:26.2.1
|
||||
com.android.tools.lint:lint-gradle-api:26.3.1
|
||||
com.android.tools.lint:lint-gradle-api:26.5.4
|
||||
@@ -307,7 +289,6 @@ com.android.tools:annotations:24.3.1
|
||||
com.android.tools:annotations:24.5.0
|
||||
com.android.tools:annotations:26.0.0
|
||||
com.android.tools:annotations:26.0.1
|
||||
com.android.tools:annotations:26.1.4
|
||||
com.android.tools:annotations:26.2.1
|
||||
com.android.tools:annotations:26.3.1
|
||||
com.android.tools:annotations:26.5.4
|
||||
@@ -317,7 +298,6 @@ com.android.tools:common:24.3.1
|
||||
com.android.tools:common:24.5.0
|
||||
com.android.tools:common:26.0.0
|
||||
com.android.tools:common:26.0.1
|
||||
com.android.tools:common:26.1.4
|
||||
com.android.tools:common:26.2.1
|
||||
com.android.tools:common:26.3.1
|
||||
com.android.tools:common:26.5.4
|
||||
@@ -327,14 +307,12 @@ com.android.tools:dvlib:24.3.1
|
||||
com.android.tools:dvlib:24.5.0
|
||||
com.android.tools:dvlib:26.0.0
|
||||
com.android.tools:dvlib:26.0.1
|
||||
com.android.tools:dvlib:26.1.4
|
||||
com.android.tools:dvlib:26.2.1
|
||||
com.android.tools:dvlib:26.3.1
|
||||
com.android.tools:dvlib:26.5.4
|
||||
com.android.tools:dvlib:27.1.0
|
||||
com.android.tools:repository:26.0.0
|
||||
com.android.tools:repository:26.0.1
|
||||
com.android.tools:repository:26.1.4
|
||||
com.android.tools:repository:26.2.1
|
||||
com.android.tools:repository:26.3.1
|
||||
com.android.tools:repository:26.5.4
|
||||
@@ -344,7 +322,6 @@ com.android.tools:sdklib:24.3.1
|
||||
com.android.tools:sdklib:24.5.0
|
||||
com.android.tools:sdklib:26.0.0
|
||||
com.android.tools:sdklib:26.0.1
|
||||
com.android.tools:sdklib:26.1.4
|
||||
com.android.tools:sdklib:26.2.1
|
||||
com.android.tools:sdklib:26.3.1
|
||||
com.android.tools:sdklib:26.5.4
|
||||
@@ -354,7 +331,6 @@ com.android.tools:sdk-common:24.3.1
|
||||
com.android.tools:sdk-common:24.5.0
|
||||
com.android.tools:sdk-common:26.0.0
|
||||
com.android.tools:sdk-common:26.0.1
|
||||
com.android.tools:sdk-common:26.1.4
|
||||
com.android.tools:sdk-common:26.2.1
|
||||
com.android.tools:sdk-common:26.3.1
|
||||
com.android.tools:sdk-common:26.5.4
|
||||
@@ -391,7 +367,7 @@ com.facebook.soloader:annotation:0.10.1
|
||||
com.facebook.soloader:nativeloader:0.10.1
|
||||
com.facebook.soloader:soloader:0.10.1
|
||||
com.facebook.yoga:proguard-annotations:1.19.0
|
||||
com.github.Dimezis:BlurView:version-2.0.2
|
||||
com.github.Dimezis:BlurView:version-2.0.3
|
||||
com.github.bumptech.glide:annotations:4.12.0
|
||||
com.github.bumptech.glide:compiler:4.12.0
|
||||
com.github.bumptech.glide:disklrucache:4.12.0
|
||||
@@ -415,13 +391,11 @@ com.google.code.findbugs:jsr305:1.3.9
|
||||
com.google.code.findbugs:jsr305:3.0.2
|
||||
com.google.code.gson:gson:2.2.4
|
||||
com.google.code.gson:gson:2.3
|
||||
com.google.code.gson:gson:2.7
|
||||
com.google.code.gson:gson:2.8.0
|
||||
com.google.code.gson:gson:2.8.5
|
||||
com.google.code.gson:gson:2.8.6
|
||||
com.google.crypto.tink:tink:1.3.0-rc2
|
||||
com.google.errorprone:error_prone_annotations:2.0.18
|
||||
com.google.errorprone:error_prone_annotations:2.1.2
|
||||
com.google.errorprone:error_prone_annotations:2.2.0
|
||||
com.google.errorprone:error_prone_annotations:2.3.1
|
||||
com.google.errorprone:error_prone_annotations:2.3.2
|
||||
@@ -595,10 +569,7 @@ org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.50
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.72
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jre7:1.2.0
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jre8:1.2.0
|
||||
org.jetbrains.kotlin:kotlin-stdlib:1.1.3-2
|
||||
org.jetbrains.kotlin:kotlin-stdlib:1.2.0
|
||||
org.jetbrains.kotlin:kotlin-stdlib:1.2.71
|
||||
org.jetbrains.kotlin:kotlin-stdlib:1.3.20
|
||||
org.jetbrains.kotlin:kotlin-stdlib:1.3.50
|
||||
|
||||
@@ -122,14 +122,12 @@ https://dl.google.com/dl/android/maven2/android/arch/lifecycle/common/1.0.0/comm
|
||||
https://dl.google.com/dl/android/maven2/android/arch/lifecycle/runtime/1.0.0/runtime-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/3.0.0/baseLibrary-3.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/3.0.1/baseLibrary-3.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/3.1.4/baseLibrary-3.1.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/3.2.1/baseLibrary-3.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/3.3.1/baseLibrary-3.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/3.5.4/baseLibrary-3.5.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/4.1.0/baseLibrary-4.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/databinding/compilerCommon/3.0.0/compilerCommon-3.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/databinding/compilerCommon/3.0.1/compilerCommon-3.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/databinding/compilerCommon/3.1.4/compilerCommon-3.1.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/signflinger/4.1.0/signflinger-4.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/support/animated-vector-drawable/26.0.2/animated-vector-drawable-26.0.2.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/support/animated-vector-drawable/27.0.1/animated-vector-drawable-27.0.1.pom
|
||||
@@ -157,33 +155,28 @@ https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/cras
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/crash/27.1.0/crash-27.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/26.0.0/protos-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/26.0.1/protos-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/26.1.4/protos-26.1.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/26.2.1/protos-26.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/26.3.1/protos-26.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/26.5.4/protos-26.5.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/27.1.0/protos-27.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shared/26.0.0/shared-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shared/26.0.1/shared-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shared/26.1.4/shared-26.1.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shared/26.2.1/shared-26.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shared/26.3.1/shared-26.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shared/26.5.4/shared-26.5.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shared/27.1.0/shared-27.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/tracker/26.0.0/tracker-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/tracker/26.0.1/tracker-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/tracker/26.1.4/tracker-26.1.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/tracker/26.2.1/tracker-26.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/tracker/26.3.1/tracker-26.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/tracker/26.5.4/tracker-26.5.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/tracker/27.1.0/tracker-27.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/annotations/26.0.0/annotations-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/annotations/26.0.1/annotations-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/annotations/26.1.4/annotations-26.1.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/annotations/26.2.1/annotations-26.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/annotations/26.3.1/annotations-26.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/annotations/26.5.4/annotations-26.5.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/annotations/27.1.0/annotations-27.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2-proto/0.1.0/aapt2-proto-0.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2-proto/0.3.1/aapt2-proto-0.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2-proto/0.4.0/aapt2-proto-0.4.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2-proto/4.1.0-6503028/aapt2-proto-4.1.0-6503028.pom
|
||||
@@ -191,7 +184,6 @@ https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2-proto/4.1.
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/aaptcompiler/4.1.0/aaptcompiler-4.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/apksig/3.0.0/apksig-3.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/apksig/3.0.1/apksig-3.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/apksig/3.1.4/apksig-3.1.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/apksig/3.2.1/apksig-3.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/apksig/3.3.1/apksig-3.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/apksig/3.5.4/apksig-3.5.4.pom
|
||||
@@ -202,43 +194,36 @@ https://dl.google.com/dl/android/maven2/com/android/tools/build/apkzlib/3.5.4/ap
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/apkzlib/4.1.0/apkzlib-4.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-model/3.0.0/builder-model-3.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-model/3.0.1/builder-model-3.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-model/3.1.4/builder-model-3.1.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-model/3.2.1/builder-model-3.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-model/3.3.1/builder-model-3.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-model/3.5.4/builder-model-3.5.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-model/4.1.0/builder-model-4.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-test-api/3.0.0/builder-test-api-3.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-test-api/3.0.1/builder-test-api-3.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-test-api/3.1.4/builder-test-api-3.1.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-test-api/3.2.1/builder-test-api-3.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-test-api/3.3.1/builder-test-api-3.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-test-api/3.5.4/builder-test-api-3.5.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-test-api/4.1.0/builder-test-api-4.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.0.0/builder-3.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.0.1/builder-3.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.1.4/builder-3.1.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.2.1/builder-3.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.3.1/builder-3.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.5.4/builder-3.5.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/4.1.0/builder-4.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/0.1.0-alpha01/bundletool-0.1.0-alpha01.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/0.5.0/bundletool-0.5.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/0.6.0/bundletool-0.6.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/0.9.0/bundletool-0.9.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/0.14.0/bundletool-0.14.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-api/3.0.0/gradle-api-3.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-api/3.0.1/gradle-api-3.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-api/3.1.4/gradle-api-3.1.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-api/3.2.1/gradle-api-3.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-api/3.3.1/gradle-api-3.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-api/3.5.4/gradle-api-3.5.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-api/4.1.0/gradle-api-4.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-core/3.0.0/gradle-core-3.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-core/3.0.1/gradle-core-3.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-core/3.1.4/gradle-core-3.1.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.4/gradle-3.1.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.3.1/gradle-3.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.4/gradle-3.5.4.pom
|
||||
@@ -253,28 +238,24 @@ https://dl.google.com/dl/android/maven2/com/android/tools/build/jetifier/jetifie
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/jetifier/jetifier-processor/1.0.0-beta09/jetifier-processor-1.0.0-beta09.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/manifest-merger/26.0.0/manifest-merger-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/manifest-merger/26.0.1/manifest-merger-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/manifest-merger/26.1.4/manifest-merger-26.1.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/manifest-merger/26.2.1/manifest-merger-26.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/manifest-merger/26.3.1/manifest-merger-26.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/manifest-merger/26.5.4/manifest-merger-26.5.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/build/manifest-merger/27.1.0/manifest-merger-27.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/common/26.0.0/common-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/common/26.0.1/common-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/common/26.1.4/common-26.1.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/common/26.2.1/common-26.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/common/26.3.1/common-26.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/common/26.5.4/common-26.5.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/common/27.1.0/common-27.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/ddms/ddmlib/26.0.0/ddmlib-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/ddms/ddmlib/26.0.1/ddmlib-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/ddms/ddmlib/26.1.4/ddmlib-26.1.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/ddms/ddmlib/26.2.1/ddmlib-26.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/ddms/ddmlib/26.3.1/ddmlib-26.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/ddms/ddmlib/26.5.4/ddmlib-26.5.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/ddms/ddmlib/27.1.0/ddmlib-27.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/dvlib/26.0.0/dvlib-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/dvlib/26.0.1/dvlib-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/dvlib/26.1.4/dvlib-26.1.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/dvlib/26.2.1/dvlib-26.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/dvlib/26.3.1/dvlib-26.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/dvlib/26.5.4/dvlib-26.5.4.pom
|
||||
@@ -288,7 +269,6 @@ https://dl.google.com/dl/android/maven2/com/android/tools/external/org-jetbrains
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/external/org-jetbrains/uast/27.1.0/uast-27.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/layoutlib/layoutlib-api/26.0.0/layoutlib-api-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/layoutlib/layoutlib-api/26.0.1/layoutlib-api-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/layoutlib/layoutlib-api/26.1.4/layoutlib-api-26.1.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/layoutlib/layoutlib-api/26.2.1/layoutlib-api-26.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/layoutlib/layoutlib-api/26.3.1/layoutlib-api-26.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/layoutlib/layoutlib-api/26.5.4/layoutlib-api-26.5.4.pom
|
||||
@@ -299,7 +279,6 @@ https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-api/27.1.0/l
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-checks/26.0.0/lint-checks-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-checks/26.0.1/lint-checks-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-checks/27.1.0/lint-checks-27.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle-api/26.1.4/lint-gradle-api-26.1.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle-api/26.2.1/lint-gradle-api-26.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle-api/26.3.1/lint-gradle-api-26.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle-api/26.5.4/lint-gradle-api-26.5.4.pom
|
||||
@@ -311,21 +290,18 @@ https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint/26.0.1/lint-
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint/27.1.0/lint-27.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/repository/26.0.0/repository-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/repository/26.0.1/repository-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/repository/26.1.4/repository-26.1.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/repository/26.2.1/repository-26.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/repository/26.3.1/repository-26.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/repository/26.5.4/repository-26.5.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/repository/27.1.0/repository-27.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/26.0.0/sdklib-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/26.0.1/sdklib-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/26.1.4/sdklib-26.1.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/26.2.1/sdklib-26.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/26.3.1/sdklib-26.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/26.5.4/sdklib-26.5.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/27.1.0/sdklib-27.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/26.0.0/sdk-common-26.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/26.0.1/sdk-common-26.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/26.1.4/sdk-common-26.1.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/26.2.1/sdk-common-26.2.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/26.3.1/sdk-common-26.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/26.5.4/sdk-common-26.5.4.pom
|
||||
@@ -334,7 +310,7 @@ https://dl.google.com/dl/android/maven2/com/android/zipflinger/4.1.0/zipflinger-
|
||||
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/test/platform/core-proto/0.0.2-dev/core-proto-0.0.2-dev.pom
|
||||
https://jitpack.io/com/github/Dimezis/BlurView/version-2.0.2/BlurView-version-2.0.2.pom
|
||||
https://jitpack.io/com/github/Dimezis/BlurView/version-2.0.3/BlurView-version-2.0.3.pom
|
||||
https://jitpack.io/com/github/status-im/function/0.0.1/function-0.0.1.pom
|
||||
https://jitpack.io/com/github/status-im/status-keycard-java/android/3.1.1/android-3.1.1.pom
|
||||
https://jitpack.io/com/github/status-im/status-keycard-java/lib/3.1.1/lib-3.1.1.pom
|
||||
@@ -496,17 +472,15 @@ https://repo.maven.apache.org/maven2/com/google/code/gson/gson/2.8.5/gson-2.8.5.
|
||||
https://repo.maven.apache.org/maven2/com/google/code/gson/gson/2.8.6/gson-2.8.6.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/crypto/tink/tink/1.3.0-rc2/tink-1.3.0-rc2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.0.18/error_prone_annotations-2.0.18.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.1.2/error_prone_annotations-2.1.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.2.0/error_prone_annotations-2.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.3.1/error_prone_annotations-2.3.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.3.2/error_prone_annotations-2.3.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.18.0/error_prone_annotations-2.18.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.19.0/error_prone_annotations-2.19.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.0.18/error_prone_parent-2.0.18.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.1.2/error_prone_parent-2.1.2.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
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.3.2/error_prone_parent-2.3.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.18.0/error_prone_parent-2.18.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.19.0/error_prone_parent-2.19.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/flatbuffers/flatbuffers-java/1.12.0/flatbuffers-java-1.12.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/google/1/google-1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.pom
|
||||
@@ -572,10 +546,10 @@ https://repo.maven.apache.org/maven2/com/sun/activation/all/1.2.0/all-1.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/activation/javax.activation/1.2.0/javax.activation-1.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/istack/istack-commons-runtime/2.21/istack-commons-runtime-2.21.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/istack/istack-commons-runtime/3.0.7/istack-commons-runtime-3.0.7.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/istack/istack-commons-runtime/4.1.1/istack-commons-runtime-4.1.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/istack/istack-commons-runtime/4.2.0/istack-commons-runtime-4.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/istack/istack-commons/2.21/istack-commons-2.21.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/istack/istack-commons/3.0.7/istack-commons-3.0.7.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/istack/istack-commons/4.1.1/istack-commons-4.1.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/istack/istack-commons/4.2.0/istack-commons-4.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/jaxb-bom-ext/2.2.11/jaxb-bom-ext-2.2.11.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/jaxb-bom-ext/2.3.1/jaxb-bom-ext-2.3.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/jaxb-bom-ext/4.0.2/jaxb-bom-ext-4.0.2.pom
|
||||
@@ -603,7 +577,7 @@ https://repo.maven.apache.org/maven2/com/tunnelvisionlabs/antlr4/4.5/antlr4-4.5.
|
||||
https://repo.maven.apache.org/maven2/de/undercouch/gradle-download-task/3.4.3/gradle-download-task-3.4.3.pom
|
||||
https://repo.maven.apache.org/maven2/de/undercouch/gradle-download-task/4.0.2/gradle-download-task-4.0.2.pom
|
||||
https://repo.maven.apache.org/maven2/it/unimi/dsi/fastutil/7.2.0/fastutil-7.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/jakarta/activation/jakarta.activation-api/2.1.1/jakarta.activation-api-2.1.1.pom
|
||||
https://repo.maven.apache.org/maven2/jakarta/activation/jakarta.activation-api/2.1.2/jakarta.activation-api-2.1.2.pom
|
||||
https://repo.maven.apache.org/maven2/jakarta/xml/bind/jakarta.xml.bind-api-parent/4.0.0/jakarta.xml.bind-api-parent-4.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/jakarta/xml/bind/jakarta.xml.bind-api/4.0.0/jakarta.xml.bind-api-4.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/javax/activation/activation/1.1/activation-1.1.pom
|
||||
@@ -719,7 +693,7 @@ https://repo.maven.apache.org/maven2/org/bouncycastle/bcprov-jdk15on/1.60/bcprov
|
||||
https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/2.5.2/checker-qual-2.5.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/2.5.8/checker-qual-2.5.8.pom
|
||||
https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/2.8.1/checker-qual-2.8.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/3.32.0/checker-qual-3.32.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/3.34.0/checker-qual-3.34.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/codehaus-parent/4/codehaus-parent-4.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.pom
|
||||
@@ -739,8 +713,8 @@ https://repo.maven.apache.org/maven2/org/easymock/easymockclassextension/3.2/eas
|
||||
https://repo.maven.apache.org/maven2/org/easymock/easymock-parent/3.2/easymock-parent-3.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/easymock/easymock-parent/5.1.0/easymock-parent-5.1.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/easymock/easymock/5.1.0/easymock-5.1.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/eclipse/angus/angus-activation-project/2.0.0/angus-activation-project-2.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/eclipse/angus/angus-activation/2.0.0/angus-activation-2.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/eclipse/angus/angus-activation-project/2.0.1/angus-activation-project-2.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/eclipse/angus/angus-activation/2.0.1/angus-activation-2.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/eclipse/ee4j/project/1.0.7/project-1.0.7.pom
|
||||
https://repo.maven.apache.org/maven2/org/eclipse/ee4j/project/1.0.8/project-1.0.8.pom
|
||||
https://repo.maven.apache.org/maven2/org/eclipse/jdt/core/compiler/ecj/4.4.2/ecj-4.4.2.pom
|
||||
@@ -761,9 +735,9 @@ https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/2.2/hamcrest-cor
|
||||
https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-parent/1.3/hamcrest-parent-1.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest/2.2/hamcrest-2.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.build/0.7.4.201502262128/org.jacoco.build-0.7.4.201502262128.pom
|
||||
https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.build/0.8.8/org.jacoco.build-0.8.8.pom
|
||||
https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.build/0.8.10/org.jacoco.build-0.8.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.core/0.7.4.201502262128/org.jacoco.core-0.7.4.201502262128.pom
|
||||
https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.core/0.8.8/org.jacoco.core-0.8.8.pom
|
||||
https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.core/0.8.10/org.jacoco.core-0.8.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.report/0.7.4.201502262128/org.jacoco.report-0.7.4.201502262128.pom
|
||||
https://repo.maven.apache.org/maven2/org/jdom/jdom2/2.0.6/jdom2-2.0.6.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.pom
|
||||
@@ -844,8 +818,6 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.4.10/kotlin-stdlib-jdk8-1.4.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.5.30/kotlin-stdlib-jdk8-1.5.30.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.8.0/kotlin-stdlib-jdk8-1.8.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.2.0/kotlin-stdlib-jre7-1.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jre8/1.2.0/kotlin-stdlib-jre8-1.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.1.3-2/kotlin-stdlib-1.1.3-2.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.0/kotlin-stdlib-1.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.20/kotlin-stdlib-1.2.20.pom
|
||||
@@ -870,7 +842,7 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-util-klib/1.4.3
|
||||
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/20230227/json-20230227.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.9.3/junit-bom-5.9.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/jvnet/staxex/stax-ex/1.7.7/stax-ex-1.7.7.pom
|
||||
https://repo.maven.apache.org/maven2/org/jvnet/staxex/stax-ex/1.8/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
|
||||
@@ -880,6 +852,7 @@ https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/5.0.3/asm-analysis
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/5.1/asm-analysis-5.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/6.0/asm-analysis-6.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/7.0/asm-analysis-7.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-bom/9.5/asm-bom-9.5.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/5.1/asm-commons-5.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/6.0/asm-commons-6.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/7.0/asm-commons-7.0.pom
|
||||
|
||||
@@ -30,9 +30,9 @@ react-native-orientation-locker
|
||||
react-native-permissions
|
||||
react-native-randombytes
|
||||
react-native-reanimated
|
||||
react-native-safe-area-context
|
||||
react-native-shake
|
||||
react-native-share
|
||||
react-native-static-safe-area-insets
|
||||
react-native-status
|
||||
react-native-status-keycard
|
||||
react-native-svg
|
||||
|
||||
@@ -14,12 +14,12 @@ declare -a REPOS=(
|
||||
"https://jitpack.io"
|
||||
)
|
||||
|
||||
function nix_fetch() {
|
||||
nix-prefetch-url --print-path --type sha256 "${1}" 2>/dev/null
|
||||
function nix_prefetch() {
|
||||
nix store prefetch-file --json "${1}" 2>/dev/null
|
||||
}
|
||||
|
||||
function get_nix_path() { echo "${1}" | tail -n1; }
|
||||
function get_nix_sha() { echo "${1}" | head -n1; }
|
||||
function get_nix_path() { echo "${1}" | jq -r .storePath; }
|
||||
function get_nix_sha() { echo "${1}" | jq -r .hash; }
|
||||
function get_sha1() { sha1sum "${1}" | cut -d' ' -f1; }
|
||||
|
||||
# Assumes REPOS from repos.sh is available
|
||||
@@ -44,9 +44,9 @@ function fetch_and_template_file() {
|
||||
local OBJ_URL OBJ_NIX_FETCH_OUT OBJ_NAME OBJ_PATH
|
||||
|
||||
OBJ_URL="${REPO_URL}/${PKG_PATH}/${FILENAME}"
|
||||
if ! OBJ_NIX_FETCH_OUT=$(nix_fetch "${OBJ_URL}"); then
|
||||
if ! OBJ_NIX_FETCH_OUT=$(nix_prefetch "${OBJ_URL}"); then
|
||||
echo " ! Failed to fetch: ${OBJ_URL}" >&2
|
||||
exit 1
|
||||
return 1
|
||||
fi
|
||||
|
||||
OBJ_NAME="${FILENAME}"
|
||||
@@ -58,6 +58,10 @@ function fetch_and_template_file() {
|
||||
}"
|
||||
}
|
||||
|
||||
function fetch_and_template_file_no_fail() {
|
||||
fetch_and_template_file "${1}" 2>/dev/null || true
|
||||
}
|
||||
|
||||
if [[ -z "${1}" ]]; then
|
||||
echo "Required POM URL argument not given!" >&2
|
||||
exit 1
|
||||
@@ -81,7 +85,7 @@ PKG_PATH="${PKG_URL_NO_EXT#"${REPO_URL}/"}"
|
||||
PKG_PATH="$(dirname "${PKG_PATH}")"
|
||||
|
||||
# Both JARs and AARs have a POM
|
||||
POM_NIX_FETCH_OUT=$(nix_fetch "${PKG_URL_NO_EXT}.pom")
|
||||
POM_NIX_FETCH_OUT=$(nix_prefetch "${PKG_URL_NO_EXT}.pom")
|
||||
POM_PATH=$(get_nix_path "${POM_NIX_FETCH_OUT}")
|
||||
POM_NAME=$(basename "${PKG_URL_NO_EXT}.pom")
|
||||
if [[ -z "${POM_PATH}" ]]; then
|
||||
@@ -111,7 +115,7 @@ echo -ne "
|
||||
}"
|
||||
|
||||
# Some deps are just POMs, in which case there is no JAR to fetch.
|
||||
[[ "${OBJ_TYPE}" == "" ]] && fetch_and_template_file "${PKG_NAME}.jar"
|
||||
[[ "${OBJ_TYPE}" == "" ]] && fetch_and_template_file_no_fail "${PKG_NAME}.jar"
|
||||
[[ "${OBJ_TYPE}" == "jar" ]] && fetch_and_template_file "${PKG_NAME}.jar"
|
||||
[[ "${OBJ_TYPE}" == "bundle" ]] && fetch_and_template_file "${PKG_NAME}.jar"
|
||||
[[ "${OBJ_TYPE}" =~ aar* ]] && fetch_and_template_file "${PKG_NAME}.aar"
|
||||
|
||||
@@ -8,6 +8,9 @@ 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"@babel/preset-typescript": "^7.17.12",
|
||||
"@react-native-async-storage/async-storage": "^1.17.9",
|
||||
"@react-native-community/audio-toolkit": "git+https://github.com/tbenr/react-native-audio-toolkit.git#refs/tags/v2.0.3-status-v6",
|
||||
"@react-native-community/blur": "git+https://github.com/status-im/react-native-blur#refs/tags/v4.3.2-status",
|
||||
"@react-native-community/blur": "git+https://github.com/status-im/react-native-blur#refs/tags/v4.3.3-status",
|
||||
"@react-native-community/cameraroll": "git+https://github.com/status-im/react-native-cameraroll.git#refs/tags/v4.0.4-status.0",
|
||||
"@react-native-community/clipboard": "^1.2.2",
|
||||
"@react-native-community/hooks": "^2.5.1",
|
||||
|
||||
|
After Width: | Height: | Size: 528 B |
|
After Width: | Height: | Size: 769 B |
|
Before Width: | Height: | Size: 525 B After Width: | Height: | Size: 628 B |
|
Before Width: | Height: | Size: 759 B After Width: | Height: | Size: 913 B |
|
After Width: | Height: | Size: 271 B |
|
After Width: | Height: | Size: 367 B |
|
After Width: | Height: | Size: 363 B |
|
After Width: | Height: | Size: 524 B |
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 112 KiB |
|
After Width: | Height: | Size: 55 KiB |
|
After Width: | Height: | Size: 103 KiB |
|
After Width: | Height: | Size: 274 KiB |
|
After Width: | Height: | Size: 552 KiB |
|
After Width: | Height: | Size: 288 KiB |
|
After Width: | Height: | Size: 587 KiB |
@@ -39,9 +39,22 @@ chmod 644 ${SECRETS_FILE_PATH}
|
||||
# If secrets file was created we want to remove it.
|
||||
trap "rm -vf ${SECRETS_FILE_PATH}" EXIT ERR INT QUIT
|
||||
|
||||
# Names of variables containing secrets to save in env file.
|
||||
SECRETS_ENV_VARS=(
|
||||
'ALCHEMY_ARBITRUM_GOERLI_TOKEN'
|
||||
'ALCHEMY_ARBITRUM_MAINNET_TOKEN'
|
||||
'ALCHEMY_OPTIMISM_GOERLI_TOKEN'
|
||||
'ALCHEMY_OPTIMISM_MAINNET_TOKEN'
|
||||
'INFURA_TOKEN'
|
||||
'INFURA_TOKEN_SECRET'
|
||||
'OPENSEA_API_KEY'
|
||||
'POKT_TOKEN'
|
||||
)
|
||||
|
||||
# Secrets like this can't be passed via args or they end up in derivation.
|
||||
if [[ -n "${POKT_TOKEN}" ]]; then append_env_export 'POKT_TOKEN'; fi
|
||||
if [[ -n "${OPENSEA_API_KEY}" ]]; then append_env_export 'OPENSEA_API_KEY'; fi
|
||||
for SECRET_VAR_NAME in "${SECRETS_ENV_VARS[@]}"; do
|
||||
[[ -n "${!SECRET_VAR_NAME}" ]] && append_env_export "${SECRET_VAR_NAME}"
|
||||
done
|
||||
|
||||
# If no secrets were passed there's no need to pass the 'secretsFile'.
|
||||
if [[ -s "${SECRETS_FILE_PATH}" ]]; then
|
||||
|
||||
@@ -18,11 +18,11 @@ export function stackOpacity (stackId, selectedStackId) {
|
||||
);
|
||||
}
|
||||
|
||||
export function stackPointer (stackId, selectedStackId) {
|
||||
export function stackZIndex (stackId, selectedStackId) {
|
||||
return useDerivedValue(
|
||||
function () {
|
||||
'worklet'
|
||||
return selectedStackId.value == stackId ? "auto" : "none";
|
||||
return selectedStackId.value == stackId ? 10 : 9;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
(ns status-im.native-module.core
|
||||
(ns native-module.core
|
||||
(:require ["react-native" :as react-native]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im2.utils.validators :as validators]
|
||||
[status-im.utils.platform :as platform]
|
||||
[status-im.utils.react-native :as react-native-utils]
|
||||
[status-im.utils.types :as types]
|
||||
[utils.validators :as validators]
|
||||
[taoensso.timbre :as log]
|
||||
[status-im2.constants :as constants]))
|
||||
[react-native.platform :as platform]
|
||||
[react-native.core :as rn]
|
||||
[utils.transforms :as types]))
|
||||
|
||||
(defn status
|
||||
[]
|
||||
(when (exists? (.-NativeModules react-native))
|
||||
(.-Status ^js (.-NativeModules react-native))))
|
||||
|
||||
(def adjust-resize 16)
|
||||
(defn init
|
||||
[handler]
|
||||
(.addListener ^js rn/device-event-emitter "gethEvent" #(handler (.-jsonEvent ^js %))))
|
||||
|
||||
(defn clear-web-data
|
||||
[]
|
||||
@@ -72,15 +72,6 @@
|
||||
accounts-data
|
||||
chat-key)))
|
||||
|
||||
(defn login
|
||||
"NOTE: beware, the password has to be sha3 hashed"
|
||||
[key-uid account-data hashed-password]
|
||||
(log/debug "[native-module] login")
|
||||
(clear-web-data)
|
||||
(init-keystore
|
||||
key-uid
|
||||
#(.login ^js (status) account-data hashed-password)))
|
||||
|
||||
(defn login-with-config
|
||||
"NOTE: beware, the password has to be sha3 hashed"
|
||||
[key-uid account-data hashed-password config]
|
||||
@@ -123,11 +114,6 @@
|
||||
(clear-web-data)
|
||||
(.logout ^js (status)))
|
||||
|
||||
(defonce listener
|
||||
(.addListener ^js react-native-utils/device-event-emitter
|
||||
"gethEvent"
|
||||
#(re-frame/dispatch [:signals/signal-received (.-jsonEvent ^js %)])))
|
||||
|
||||
(defn multiaccount-load-account
|
||||
"NOTE: beware, the password has to be sha3 hashed
|
||||
|
||||
@@ -141,14 +127,6 @@
|
||||
:password hashed-password})
|
||||
callback))
|
||||
|
||||
(defn multiaccount-reset
|
||||
"TODO: this function is not used anywhere
|
||||
if usage isn't planned, remove"
|
||||
[callback]
|
||||
(log/debug "[native-module] multiaccount-reset")
|
||||
(.multiAccountReset ^js (status)
|
||||
callback))
|
||||
|
||||
(defn multiaccount-derive-addresses
|
||||
"NOTE: this should be named derive-accounts
|
||||
this only derive addresses, they still need to be stored
|
||||
@@ -298,43 +276,13 @@
|
||||
:key key})
|
||||
(.deserializeAndCompressKey ^js (status) key callback))
|
||||
|
||||
|
||||
(defn public-key->compressed-key
|
||||
"Provides public key to status-go and gets back a compressed key via serialization"
|
||||
[public-key callback]
|
||||
(let [serialization-key constants/serialization-key
|
||||
multi-code-prefix constants/multi-code-prefix
|
||||
multi-code-key (str multi-code-prefix (subs public-key 2))]
|
||||
(log/info "[native-module] Serializing public key"
|
||||
{:fn :public-key->compressed-key
|
||||
:public-key public-key
|
||||
:multi-code-key multi-code-key})
|
||||
(.multiformatSerializePublicKey ^js (status) multi-code-key serialization-key callback)))
|
||||
|
||||
(defn compressed-key->public-key
|
||||
"Provides compressed key to status-go and gets back the uncompressed public key via deserialization"
|
||||
[public-key callback]
|
||||
(let [deserialization-key constants/deserialization-key]
|
||||
(log/info "[native-module] Deserializing compressed key"
|
||||
{:fn :compressed-key->public-key
|
||||
:public-key public-key})
|
||||
(.multiformatDeserializePublicKey ^js (status) public-key deserialization-key callback)))
|
||||
|
||||
(defn decompress-public-key
|
||||
"Provides compressed key to status-go and gets back the uncompressed public key"
|
||||
[public-key callback]
|
||||
(log/info "[native-module] Decompressing public key"
|
||||
{:fn :decompress-public-key
|
||||
[public-key deserialization-key callback]
|
||||
(log/info "[native-module] Deserializing compressed key"
|
||||
{:fn :compressed-key->public-key
|
||||
:public-key public-key})
|
||||
(.decompressPublicKey ^js (status) public-key callback))
|
||||
|
||||
(defn compress-public-key
|
||||
"Provides a public key to status-go and gets back a 33bit compressed key back"
|
||||
[public-key callback]
|
||||
(log/info "[native-module] Compressing public key"
|
||||
{:fn :compress-public-key
|
||||
:public-key public-key})
|
||||
(.compressPublicKey ^js (status) public-key callback))
|
||||
(.multiformatDeserializePublicKey ^js (status) public-key deserialization-key callback))
|
||||
|
||||
(defn hash-typed-data
|
||||
"used for keycard"
|
||||
@@ -388,11 +336,6 @@
|
||||
(log/debug "[native-module] send-logs")
|
||||
(.sendLogs ^js (status) dbJson js-logs callback))
|
||||
|
||||
(defn add-peer
|
||||
[enode on-result]
|
||||
(log/debug "[native-module] add-peer")
|
||||
(.addPeer ^js (status) enode on-result))
|
||||
|
||||
(defn close-application
|
||||
[]
|
||||
(log/debug "[native-module] close-application")
|
||||
@@ -408,11 +351,6 @@
|
||||
(log/debug "[native-module] app-state-change")
|
||||
(.appStateChange ^js (status) state))
|
||||
|
||||
(defn stop-local-notifications
|
||||
[]
|
||||
(log/debug "[native-module] stop-local-notifications")
|
||||
(.stopLocalNotifications ^js (status)))
|
||||
|
||||
(defn start-local-notifications
|
||||
[]
|
||||
(log/debug "[native-module] start-local-notifications")
|
||||
@@ -433,26 +371,11 @@
|
||||
:build-id (.-buildId status)
|
||||
:device-id (.-deviceId status)}))
|
||||
|
||||
(defn extract-group-membership-signatures
|
||||
[signature-pairs callback]
|
||||
(log/debug "[native-module] extract-group-membership-signatures")
|
||||
(.extractGroupMembershipSignatures ^js (status) signature-pairs callback))
|
||||
|
||||
(defn sign-group-membership
|
||||
[content callback]
|
||||
(log/debug "[native-module] sign-group-membership")
|
||||
(.signGroupMembership ^js (status) content callback))
|
||||
|
||||
(defn get-node-config
|
||||
[callback]
|
||||
(log/debug "[native-module] get-node-config")
|
||||
(.getNodeConfig ^js (status) callback))
|
||||
|
||||
(defn update-mailservers
|
||||
[enodes on-result]
|
||||
(log/debug "[native-module] update-mailservers")
|
||||
(.updateMailservers ^js (status) enodes on-result))
|
||||
|
||||
(defn toggle-webview-debug
|
||||
[on]
|
||||
(log/debug "[native-module] toggle-webview-debug" on)
|
||||
@@ -483,12 +406,6 @@
|
||||
(when (validators/valid-public-key? public-key)
|
||||
(.generateAlias ^js (status) public-key)))
|
||||
|
||||
(defn generate-gfycat-async
|
||||
"Generate a 3 words random name based on the user public-key, asynchronously"
|
||||
[public-key callback]
|
||||
(when (validators/valid-public-key? public-key)
|
||||
(.generateAliasAsync ^js (status) public-key callback)))
|
||||
|
||||
(defn identicon
|
||||
"Generate a icon based on a string, synchronously"
|
||||
[seed]
|
||||
@@ -500,11 +417,6 @@
|
||||
(log/debug "[native-module] encode-transfer")
|
||||
(.encodeTransfer ^js (status) to-norm amount-hex))
|
||||
|
||||
(defn encode-function-call
|
||||
[method params]
|
||||
(log/debug "[native-module] encode-function-call")
|
||||
(.encodeFunctionCall ^js (status) method (types/clj->json params)))
|
||||
|
||||
(defn decode-parameters
|
||||
[bytes-string types]
|
||||
(log/debug "[native-module] decode-parameters")
|
||||
@@ -555,11 +467,6 @@
|
||||
(log/debug "[native-module] to-checksum-address")
|
||||
(.toChecksumAddress ^js (status) address))
|
||||
|
||||
(defn identicon-async
|
||||
"Generate a icon based on a string, asynchronously"
|
||||
[seed callback]
|
||||
(.identiconAsync ^js (status) seed callback))
|
||||
|
||||
(defn gfycat-identicon-async
|
||||
"Generate an icon based on a string and 3 words random name asynchronously"
|
||||
[seed callback]
|
||||
@@ -585,16 +492,6 @@
|
||||
(log/debug "[native-module] delete-imported-key")
|
||||
(.deleteImportedKey ^js (status) key-uid address hashed-password callback))
|
||||
|
||||
(defn activate-keep-awake
|
||||
[]
|
||||
(log/debug "[native-module] activateKeepAwake")
|
||||
(.activateKeepAwake ^js (status)))
|
||||
|
||||
(defn deactivate-keep-awake
|
||||
[]
|
||||
(log/debug "[native-module] deactivateKeepAwake")
|
||||
(.deactivateKeepAwake ^js (status)))
|
||||
|
||||
(defn reset-keyboard-input
|
||||
[input selection]
|
||||
(log/debug "[native-module] resetKeyboardInput")
|
||||
@@ -616,6 +513,7 @@
|
||||
key-uid
|
||||
(types/clj->json multiaccount-data)
|
||||
(types/clj->json settings)
|
||||
""
|
||||
current-password#
|
||||
new-password
|
||||
callback))
|
||||
@@ -11,7 +11,7 @@
|
||||
:inner 44
|
||||
:status-indicator 12
|
||||
:status-indicator-border 2
|
||||
:font-size :paragraph-1}
|
||||
:font-size :heading-2}
|
||||
:small {:outer 32
|
||||
:inner 28
|
||||
:status-indicator 12
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
(ns quo2.components.buttons.predictive-keyboard.component-spec
|
||||
(:require [quo2.components.buttons.predictive-keyboard.view :as predictive-keyboard]
|
||||
[test-helpers.component :as h]))
|
||||
|
||||
(h/describe "predictive-keyboard"
|
||||
(h/test "basic render"
|
||||
(h/render [predictive-keyboard/view {:type :error :text "Error message"}])
|
||||
(h/is-truthy (h/get-by-label-text :predictive-keyboard)))
|
||||
(h/test "rendered with correct text"
|
||||
(h/render [predictive-keyboard/view {:type :info :text "Error message"}])
|
||||
(h/is-truthy (h/get-by-text "Error message")))
|
||||
(h/test "rendered with correct words"
|
||||
(h/render [predictive-keyboard/view {:type :words :words ["lab" "label"]}])
|
||||
(h/is-truthy (h/get-by-text "lab"))
|
||||
(h/is-truthy (h/get-by-text "label")))
|
||||
(h/test "word press event"
|
||||
(let [event (h/mock-fn)]
|
||||
(h/render [predictive-keyboard/view {:type :words :words ["lab" "label"] :on-press #(event %)}])
|
||||
(h/fire-event :press (h/get-by-text "lab"))
|
||||
(h/was-called event))))
|
||||
@@ -0,0 +1,11 @@
|
||||
(ns quo2.components.buttons.predictive-keyboard.style)
|
||||
|
||||
(defn wrapper
|
||||
[type]
|
||||
{:flex 1
|
||||
:min-height 48
|
||||
:padding-vertical 8
|
||||
:justify-content :center
|
||||
:padding-horizontal (if (= type :words) 0 20)})
|
||||
|
||||
(def word-list {:align-items :center :padding-horizontal 20})
|
||||
@@ -0,0 +1,71 @@
|
||||
(ns quo2.components.buttons.predictive-keyboard.view
|
||||
(:require [react-native.core :as rn]
|
||||
[quo2.components.buttons.predictive-keyboard.style :as style]
|
||||
[quo2.components.info.info-message :as info-message]
|
||||
[react-native.linear-gradient :as linear-gradient]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[quo2.components.buttons.button :as button]))
|
||||
|
||||
(def ^:private gradients
|
||||
{:light [(colors/alpha colors/neutral-40 0.05) (colors/alpha colors/neutral-40 0)]
|
||||
:dark [(colors/alpha colors/neutral-80 0.7) (colors/alpha colors/neutral-80 0)]
|
||||
:blur [colors/white-opa-5 colors/white-opa-0]})
|
||||
|
||||
(defn- word-component
|
||||
[word _ _ {:keys [blur? on-press]}]
|
||||
[button/button
|
||||
(merge {:type :blur-bg
|
||||
:size 32
|
||||
:on-press #(on-press word)}
|
||||
(when blur? {:override-theme :dark}))
|
||||
word])
|
||||
|
||||
(defn- separator
|
||||
[]
|
||||
[rn/view {:style {:width 8}}])
|
||||
|
||||
(defn view
|
||||
"Options
|
||||
- `type` `:words`/`:error`/`:info`/`:empty`.
|
||||
- `blur?` Boolean to enable blur background support.
|
||||
- `text` error/info text.
|
||||
- `words` List of words to display in the keyboard.
|
||||
- `on-press` Callback called when a word is pressed `(fn [word])`."
|
||||
[{:keys [type blur? text words on-press]}]
|
||||
[linear-gradient/linear-gradient
|
||||
{:style {:flex-direction :row}
|
||||
:accessibility-label :predictive-keyboard
|
||||
:colors (if blur?
|
||||
(gradients :blur)
|
||||
(colors/theme-colors (gradients :light) (gradients :dark)))}
|
||||
[rn/view {:style (style/wrapper type)}
|
||||
(case type
|
||||
:words
|
||||
[rn/flat-list
|
||||
{:data words
|
||||
:content-container-style style/word-list
|
||||
:render-fn word-component
|
||||
:render-data {:blur? blur?
|
||||
:on-press on-press}
|
||||
:shows-horizontal-scroll-indicator false
|
||||
:separator [separator]
|
||||
:horizontal true
|
||||
:key-fn str}]
|
||||
|
||||
:error
|
||||
[info-message/info-message
|
||||
{:icon :i/info
|
||||
:size :default
|
||||
:type :error}
|
||||
text]
|
||||
|
||||
:info
|
||||
[info-message/info-message
|
||||
(merge {:icon :i/info
|
||||
:size :default
|
||||
:type (if (= type :error) :error :default)}
|
||||
(when blur?
|
||||
{:text-color colors/white-opa-70
|
||||
:icon-color colors/white-opa-70}))
|
||||
text]
|
||||
nil)]])
|
||||
@@ -11,7 +11,7 @@
|
||||
(defn neutral-border-color
|
||||
[in-blur-view? override-theme]
|
||||
(if in-blur-view?
|
||||
(colors/theme-colors colors/white-opa-10 colors/neutral-80-opa-5 override-theme)
|
||||
(colors/theme-colors colors/neutral-80-opa-5 colors/white-opa-10 override-theme)
|
||||
(colors/theme-colors colors/neutral-20 colors/neutral-80 override-theme)))
|
||||
|
||||
(def active-background-color (colors/custom-color :blue 50 10))
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
(ns quo2.components.drawers.documentation-drawers.component-spec
|
||||
(:require [quo2.components.drawers.documentation-drawers.view :as documentation-drawers]
|
||||
[test-helpers.component :as h]))
|
||||
|
||||
(h/describe "Documentation drawers component"
|
||||
(h/test "render component without button"
|
||||
(h/render [documentation-drawers/view {:title "Documentation"} "Content"])
|
||||
(-> (h/expect (h/get-by-label-text :documentation-drawer-title))
|
||||
(.toBeTruthy))
|
||||
(-> (h/expect (h/get-by-label-text :documentation-drawer-content))
|
||||
(.toBeTruthy)))
|
||||
(h/test "render component with button"
|
||||
(h/render [documentation-drawers/view
|
||||
{:title "Documentation" :show-button? true :button-label "Read more"} "Content"])
|
||||
(-> (h/expect (h/get-by-label-text :documentation-drawer-title))
|
||||
(.toBeTruthy))
|
||||
(-> (h/expect (h/get-by-label-text :documentation-drawer-content))
|
||||
(.toBeTruthy))
|
||||
(-> (h/expect (h/get-by-label-text :documentation-drawer-button))
|
||||
(.toBeTruthy)))
|
||||
(h/test "button is pressed"
|
||||
(let [event (h/mock-fn)]
|
||||
(h/render
|
||||
[documentation-drawers/view
|
||||
{:title "Documentation" :show-button? true :button-label "Read more" :on-press-button event}
|
||||
"Content"])
|
||||
(h/fire-event :press (h/get-by-label-text :documentation-drawer-button))
|
||||
(-> (h/expect event)
|
||||
(.toHaveBeenCalled)))))
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
(ns quo2.components.drawers.documentation-drawers.style)
|
||||
|
||||
(def container
|
||||
{:align-items :flex-start
|
||||
:padding 20})
|
||||
|
||||
(def content
|
||||
{:margin-top 12
|
||||
:margin-bottom 16})
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
(ns quo2.components.drawers.documentation-drawers.view
|
||||
(:require [quo2.components.markdown.text :as text]
|
||||
[quo2.components.drawers.documentation-drawers.style :as style]
|
||||
[react-native.core :as rn]
|
||||
[react-native.gesture :as gesture]
|
||||
[quo2.components.buttons.button :as button]
|
||||
[quo2.foundations.colors :as colors]))
|
||||
|
||||
(defn view
|
||||
"Options
|
||||
- `title` Title text
|
||||
- `show-button?` Show button
|
||||
- `button-label` button label
|
||||
- `button-icon` button icon
|
||||
- `on-press-button` On press handler for the button
|
||||
- `shell?` use shell theme
|
||||
|
||||
`content` Content of the drawer
|
||||
"
|
||||
[{:keys [title show-button? on-press-button button-label button-icon shell?]} content]
|
||||
[gesture/scroll-view
|
||||
[rn/view {:style style/container}
|
||||
[text/text
|
||||
{:size :heading-2
|
||||
:accessibility-label :documentation-drawer-title
|
||||
:style {:color (colors/theme-colors colors/neutral-100
|
||||
colors/white
|
||||
(when shell? :dark))}
|
||||
:weight :semi-bold} title]
|
||||
[rn/view {:style style/content :accessibility-label :documentation-drawer-content}
|
||||
content]
|
||||
(when show-button?
|
||||
[button/button
|
||||
(merge {:size 24
|
||||
:type (if shell? :blur-bg-outline :outline)
|
||||
:on-press on-press-button
|
||||
:accessibility-label :documentation-drawer-button
|
||||
:after button-icon}
|
||||
(when shell? {:override-theme :dark})) button-label])]])
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
[react-native.core :as rn]))
|
||||
|
||||
(def themes
|
||||
{:light {:default colors/neutral-40
|
||||
{:light {:default colors/neutral-50
|
||||
:success colors/success-50
|
||||
:error colors/danger-50}
|
||||
:dark {:default colors/neutral-60
|
||||
:dark {:default colors/neutral-40
|
||||
:success colors/success-60
|
||||
:error colors/danger-60}})
|
||||
|
||||
@@ -27,18 +27,20 @@
|
||||
:icon-color colors/white ;; icon color override
|
||||
:no-icon-color? false ;; disable tint color for icon"
|
||||
[{:keys [type size icon text-color icon-color no-icon-color? style]} message]
|
||||
(let [weight (if (= size :default) :regular :medium)
|
||||
size (if (= size :default) :paragraph-2 :label)
|
||||
text-color (or text-color (get-color type))
|
||||
icon-color (or icon-color text-color)]
|
||||
(let [weight (if (= size :default) :regular :medium)
|
||||
icon-size (if (= size :default) 16 12)
|
||||
icon-margin-top (if (= size :default) 2 3)
|
||||
size (if (= size :default) :paragraph-2 :label)
|
||||
text-color (or text-color (get-color type))
|
||||
icon-color (or icon-color text-color)]
|
||||
[rn/view
|
||||
{:style (merge {:flex-direction :row}
|
||||
style)}
|
||||
[quo2.icons/icon icon
|
||||
{:color icon-color
|
||||
:no-color no-icon-color?
|
||||
:size 12
|
||||
:container-style {:margin-top 3}}]
|
||||
:size icon-size
|
||||
:container-style {:margin-top icon-margin-top}}]
|
||||
[text/text
|
||||
{:size size
|
||||
:weight weight
|
||||
|
||||
@@ -1,8 +1,59 @@
|
||||
(ns quo2.components.inputs.recovery-phrase.component-spec
|
||||
(:require [quo2.components.inputs.recovery-phrase.view :as recovery-phrase]
|
||||
(:require [clojure.string :as string]
|
||||
[oops.core :as oops]
|
||||
[quo2.components.inputs.recovery-phrase.view :as recovery-phrase]
|
||||
[test-helpers.component :as h]))
|
||||
|
||||
(h/describe "Recovery phrase input"
|
||||
(h/test "Default render"
|
||||
(h/render [recovery-phrase/recovery-phrase-input {}])
|
||||
(h/is-truthy (h/get-by-label-text :recovery-phrase-input))))
|
||||
(h/is-truthy (h/get-by-label-text :recovery-phrase-input)))
|
||||
|
||||
(h/test "Renders specified text"
|
||||
(let [text-expected "My custom text"]
|
||||
(h/render [recovery-phrase/recovery-phrase-input {} text-expected])
|
||||
(h/is-equal (oops/oget (h/get-by-label-text :recovery-phrase-input) "props" "children")
|
||||
text-expected)))
|
||||
|
||||
(h/test "Text changes and dispatches on-change-text"
|
||||
(let [new-text "New text"
|
||||
on-change-mock (h/mock-fn)
|
||||
get-new-text #(-> % (oops/oget "props" "onChangeText" "mock" "calls") (aget 0 0))]
|
||||
(h/render [recovery-phrase/recovery-phrase-input {:on-change-text on-change-mock}
|
||||
"Old text"])
|
||||
(h/fire-event :change-text (h/get-by-label-text :recovery-phrase-input) new-text)
|
||||
(h/is-equal (get-new-text (h/get-by-label-text :recovery-phrase-input)) new-text)
|
||||
(h/was-called on-change-mock)))
|
||||
|
||||
(h/describe "Error text"
|
||||
(h/test "Marked when words doesn't satisfy a predicate"
|
||||
(h/render [recovery-phrase/recovery-phrase-input
|
||||
{:mark-errors? true
|
||||
:error-pred #(>= (count %) 5)}
|
||||
"Text with some error words that don't satisfy the predicate"])
|
||||
(let [children-text-nodes (-> (h/get-by-label-text :recovery-phrase-input)
|
||||
(oops/oget "props" "children" "props" "children")
|
||||
(js->clj :keywordize-keys true))
|
||||
{:keys [ok-words error-words]} (group-by #(if (string? %) :ok-words :error-words)
|
||||
children-text-nodes)]
|
||||
(h/is-equal (apply str ok-words) "Text with some that the ")
|
||||
(h/is-truthy (= (map #(-> % :props :argv second) error-words)
|
||||
["error" "words" "don't" "satisfy" "predicate"]))))
|
||||
|
||||
(h/test "Marked when words exceed the limit given"
|
||||
(h/render [recovery-phrase/recovery-phrase-input
|
||||
{:mark-errors? true
|
||||
:word-limit 4}
|
||||
"these are ok words, these words exceed the limit"])
|
||||
(let [children-text-nodes (-> (h/get-by-label-text :recovery-phrase-input)
|
||||
(oops/oget "props" "children" "props" "children")
|
||||
(js->clj :keywordize-keys true))
|
||||
{:keys [ok-words error-words]} (group-by #(if (string? %) :ok-words :error-words)
|
||||
children-text-nodes)]
|
||||
(h/is-equal (string/trim (apply str ok-words))
|
||||
"these are ok words,")
|
||||
(h/is-equal (->> error-words
|
||||
(map #(-> % :props :argv second))
|
||||
(interpose " ")
|
||||
(apply str))
|
||||
"these words exceed the limit")))))
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
set-default #(reset! state :default)]
|
||||
(fn [{:keys [customization-color override-theme blur? on-focus on-blur mark-errors?
|
||||
error-pred word-limit]
|
||||
:or {customization-color :blue}
|
||||
:or {customization-color :blue
|
||||
error-pred (constantly false)}
|
||||
:as props}
|
||||
text]
|
||||
(let [extra-props (apply dissoc props custom-props)]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
(ns quo2.components.inputs.title-input.style
|
||||
(:require [quo2.foundations.colors :as colors]))
|
||||
(:require [quo2.foundations.colors :as colors]
|
||||
[react-native.platform :as platform]))
|
||||
|
||||
(defn get-focused-placeholder-color
|
||||
[blur? override-theme]
|
||||
@@ -28,9 +29,11 @@
|
||||
|
||||
(defn get-selection-color
|
||||
[customization-color blur? override-theme]
|
||||
(if blur?
|
||||
(colors/theme-colors colors/neutral-100 colors/white override-theme)
|
||||
(colors/custom-color customization-color (if (or (= :dark override-theme) colors/dark?) 60 50))))
|
||||
(colors/alpha (if blur?
|
||||
(colors/theme-colors colors/neutral-100 colors/white override-theme)
|
||||
(colors/custom-color customization-color
|
||||
(if (or (= :dark override-theme) colors/dark?) 60 50)))
|
||||
(if platform/ios? 1 0.2)))
|
||||
|
||||
(def text-input-container {:flex 1})
|
||||
|
||||
|
||||
@@ -154,12 +154,12 @@
|
||||
ready-to-send? (reagent/atom false)
|
||||
ready-to-lock? (reagent/atom false)
|
||||
ready-to-delete? (reagent/atom false)
|
||||
reviewing-audio? (reagent/atom false)
|
||||
reviewing-audio? (reagent/atom (some? audio-file))
|
||||
playing-audio? (reagent/atom false)
|
||||
recording-length-ms (reagent/atom 0)
|
||||
audio-current-time-ms (reagent/atom 0)
|
||||
seeking-audio? (reagent/atom false)
|
||||
force-show-controls? (reagent/atom false)
|
||||
force-show-controls? (reagent/atom (some? audio-file))
|
||||
clear-timeout (atom nil)
|
||||
record-button-at-initial-position? (atom true)
|
||||
record-button-is-animating? (atom false)
|
||||
@@ -169,10 +169,11 @@
|
||||
touch-active? (atom false)
|
||||
recording-timer (atom nil)
|
||||
playing-timer (atom nil)
|
||||
output-file (atom nil)
|
||||
output-file (atom audio-file)
|
||||
reached-max-duration? (atom false)
|
||||
touch-timestamp (atom nil)
|
||||
disabled? (atom false)
|
||||
app-state-listener (atom nil)
|
||||
rec-options
|
||||
(merge
|
||||
audio/default-recorder-options
|
||||
@@ -512,10 +513,13 @@
|
||||
(on-init reset-recorder))
|
||||
(when audio-file
|
||||
(let [filename (last (string/split audio-file "/"))]
|
||||
(reload-player filename)
|
||||
(reset! output-file audio-file)
|
||||
(reset! reviewing-audio? true)
|
||||
(reset! force-show-controls? true)))))
|
||||
(reload-player filename)))
|
||||
(reset! app-state-listener
|
||||
(.addEventListener rn/app-state
|
||||
"change"
|
||||
#(when (= % "background")
|
||||
(reset! playing-audio? false))))
|
||||
#(.remove @app-state-listener)))
|
||||
[rn/view
|
||||
{:style style/bar-container
|
||||
:pointer-events :box-none}
|
||||
@@ -525,7 +529,7 @@
|
||||
seeking-audio?]
|
||||
[:f> soundtrack/f-soundtrack
|
||||
{:audio-current-time-ms audio-current-time-ms
|
||||
:player-ref player-ref
|
||||
:player-ref @player-ref
|
||||
:seeking-audio? seeking-audio?}]])
|
||||
(when (or @recording? @reviewing-audio?)
|
||||
[:f> f-time-counter @recording? @recording-length-ms @ready-to-delete? @reviewing-audio?
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
(let [player-ref (reagent/atom {})
|
||||
audio-current-time-ms (reagent/atom 0)]
|
||||
(h/render [:f> soundtrack/f-soundtrack
|
||||
{:player-ref player-ref
|
||||
{:player-ref @player-ref
|
||||
:audio-current-time-ms audio-current-time-ms}])
|
||||
(-> (h/expect (h/get-by-test-id "soundtrack"))
|
||||
(.toBeTruthy)))))
|
||||
@@ -31,7 +31,7 @@
|
||||
audio-current-time-ms (reagent/atom 0)]
|
||||
(h/render [:f> soundtrack/f-soundtrack
|
||||
{:seeking-audio? seeking-audio?
|
||||
:player-ref player-ref
|
||||
:player-ref @player-ref
|
||||
:audio-current-time-ms audio-current-time-ms}])
|
||||
(h/fire-event
|
||||
:on-sliding-start
|
||||
@@ -47,7 +47,7 @@
|
||||
audio-current-time-ms (reagent/atom 0)]
|
||||
(h/render [:f> soundtrack/f-soundtrack
|
||||
{:seeking-audio? seeking-audio?
|
||||
:player-ref player-ref
|
||||
:player-ref @player-ref
|
||||
:audio-current-time-ms audio-current-time-ms}])
|
||||
(h/fire-event
|
||||
:on-sliding-start
|
||||
@@ -69,7 +69,7 @@
|
||||
audio-current-time-ms (reagent/atom 0)]
|
||||
(h/render [:f> soundtrack/f-soundtrack
|
||||
{:seeking-audio? seeking-audio?
|
||||
:player-ref player-ref
|
||||
:player-ref @player-ref
|
||||
:audio-current-time-ms audio-current-time-ms}])
|
||||
(h/fire-event
|
||||
:on-sliding-start
|
||||
|
||||
@@ -10,12 +10,14 @@
|
||||
(def ^:private thumb-dark (js/require "../resources/images/icons2/12x12/thumb-dark.png"))
|
||||
|
||||
(defn f-soundtrack
|
||||
[{:keys [audio-current-time-ms player-ref seeking-audio?]}]
|
||||
(let [audio-duration-ms (audio/get-player-duration @player-ref)]
|
||||
[{:keys [audio-current-time-ms player-ref style seeking-audio?]}]
|
||||
(let [audio-duration-ms (audio/get-player-duration player-ref)]
|
||||
[:<>
|
||||
[slider/slider
|
||||
{:test-ID "soundtrack"
|
||||
:style (style/player-slider-container)
|
||||
:style (merge
|
||||
(style/player-slider-container)
|
||||
(or style {}))
|
||||
:minimum-value 0
|
||||
:maximum-value audio-duration-ms
|
||||
:value @audio-current-time-ms
|
||||
@@ -23,7 +25,7 @@
|
||||
:on-sliding-complete (fn [seek-time]
|
||||
(reset! seeking-audio? false)
|
||||
(audio/seek-player
|
||||
@player-ref
|
||||
player-ref
|
||||
seek-time
|
||||
#(log/debug "[record-audio] on seek - seek time: " seek-time)
|
||||
#(log/error "[record-audio] on seek - error: " %)))
|
||||
|
||||
@@ -5,15 +5,17 @@
|
||||
[react-native.core :as rn]))
|
||||
|
||||
(defn view
|
||||
[{:keys [checked? blur? on-change accessibility-label container-style]} label]
|
||||
[rn/view
|
||||
{:style (merge container-style (style/container blur?))}
|
||||
[selectors/checkbox
|
||||
{:accessibility-label accessibility-label
|
||||
:blur? blur?
|
||||
:checked? checked?
|
||||
:on-change on-change}]
|
||||
[text/text
|
||||
{:size :paragraph-2
|
||||
:style style/text}
|
||||
label]])
|
||||
[{:keys [checked? blur? accessibility-label container-style on-change]} label]
|
||||
[rn/touchable-opacity
|
||||
{:on-press on-change
|
||||
:accessibility-label "disclaimer-touchable-opacity"}
|
||||
[rn/view {:style (merge container-style (style/container blur?))}
|
||||
[selectors/checkbox
|
||||
{:accessibility-label accessibility-label
|
||||
:blur? blur?
|
||||
:checked? checked?
|
||||
:on-change on-change}]
|
||||
[text/text
|
||||
{:size :paragraph-2
|
||||
:style style/text}
|
||||
label]]])
|
||||
|
||||
@@ -12,12 +12,6 @@
|
||||
(colors/theme-colors colors/neutral-80-opa-5 colors/white-opa-5 override-theme)
|
||||
(colors/theme-colors colors/neutral-10 colors/neutral-90 override-theme))})
|
||||
|
||||
(def context-tag-image
|
||||
{:width 20
|
||||
:border-radius 10
|
||||
:background-color :white
|
||||
:height 20})
|
||||
|
||||
(defn context-tag-icon-color
|
||||
[blur?]
|
||||
(if blur?
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
(ns quo2.components.tags.context-tag.view
|
||||
(:require [quo2.components.avatars.group-avatar :as group-avatar]
|
||||
(:require [quo2.components.avatars.user-avatar.view :as user-avatar]
|
||||
[quo2.components.avatars.group-avatar :as group-avatar]
|
||||
[quo2.components.icon :as icons]
|
||||
[quo2.components.markdown.text :as text]
|
||||
[quo2.components.tags.context-tag.style :as style]
|
||||
@@ -43,9 +44,11 @@
|
||||
:size :paragraph-2
|
||||
:style (assoc text-style :justify-content :center)}]
|
||||
[base-tag (assoc-in params [:style :padding-left] 3)
|
||||
[rn/image
|
||||
{:style style/context-tag-image
|
||||
:source photo}]
|
||||
[user-avatar/user-avatar
|
||||
{:full-name name
|
||||
:profile-picture photo
|
||||
:size :xxs
|
||||
:status-indicator? false}]
|
||||
[rn/view {:style style/context-tag-text-container}
|
||||
[text/text text-params (str " " name)]
|
||||
(when channel-name
|
||||
@@ -58,7 +61,7 @@
|
||||
|
||||
(defn user-avatar-tag
|
||||
[params username photo]
|
||||
[context-tag params {:uri photo} username])
|
||||
[context-tag params photo username])
|
||||
|
||||
(defn audio-tag
|
||||
[duration params]
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
quo2.components.banners.banner.view
|
||||
quo2.components.buttons.button
|
||||
quo2.components.buttons.dynamic-button
|
||||
quo2.components.buttons.predictive-keyboard.view
|
||||
quo2.components.colors.color-picker.view
|
||||
quo2.components.community.community-card-view
|
||||
quo2.components.community.community-list-view
|
||||
@@ -24,6 +25,7 @@
|
||||
quo2.components.dividers.new-messages
|
||||
quo2.components.dividers.strength-divider.view
|
||||
quo2.components.drawers.action-drawers.view
|
||||
quo2.components.drawers.documentation-drawers.view
|
||||
quo2.components.drawers.drawer-buttons.view
|
||||
quo2.components.drawers.permission-context.view
|
||||
quo2.components.dropdowns.dropdown
|
||||
@@ -62,6 +64,7 @@
|
||||
quo2.components.profile.select-profile.view
|
||||
quo2.components.reactions.reaction
|
||||
quo2.components.record-audio.record-audio.view
|
||||
quo2.components.record-audio.soundtrack.view
|
||||
quo2.components.selectors.disclaimer.view
|
||||
quo2.components.selectors.filter.view
|
||||
quo2.components.selectors.selectors.view
|
||||
@@ -81,8 +84,6 @@
|
||||
quo2.components.tags.token-tag
|
||||
quo2.components.text-combinations.title.view))
|
||||
|
||||
(def button quo2.components.buttons.button/button)
|
||||
(def dynamic-button quo2.components.buttons.dynamic-button/dynamic-button)
|
||||
(def text quo2.components.markdown.text/text)
|
||||
(def icon quo2.components.icon/icon)
|
||||
(def separator quo2.components.separator/separator)
|
||||
@@ -118,6 +119,11 @@
|
||||
;;;; BANNER
|
||||
(def banner quo2.components.banners.banner.view/banner)
|
||||
|
||||
;;;; BUTTONS
|
||||
(def button quo2.components.buttons.button/button)
|
||||
(def dynamic-button quo2.components.buttons.dynamic-button/dynamic-button)
|
||||
(def predictive-keyboard quo2.components.buttons.predictive-keyboard.view/view)
|
||||
|
||||
;;;; CARDS
|
||||
(def small-option-card quo2.components.onboarding.small-option-card.view/small-option-card)
|
||||
|
||||
@@ -151,6 +157,7 @@
|
||||
|
||||
;;;; DRAWERS
|
||||
(def action-drawer quo2.components.drawers.action-drawers.view/action-drawer)
|
||||
(def documentation-drawers quo2.components.drawers.documentation-drawers.view/view)
|
||||
(def drawer-buttons quo2.components.drawers.drawer-buttons.view/view)
|
||||
(def permission-context quo2.components.drawers.permission-context.view/view)
|
||||
|
||||
@@ -184,6 +191,7 @@
|
||||
|
||||
;;;; RECORD AUDIO
|
||||
(def record-audio quo2.components.record-audio.record-audio.view/record-audio)
|
||||
(def soundtrack quo2.components.record-audio.soundtrack.view/f-soundtrack)
|
||||
|
||||
;;;; SETTINGS
|
||||
(def privacy-option quo2.components.settings.privacy-option/card)
|
||||
|
||||
@@ -3,12 +3,14 @@
|
||||
[quo2.components.avatars.user-avatar.component-spec]
|
||||
[quo2.components.banners.banner.component-spec]
|
||||
[quo2.components.buttons.--tests--.buttons-component-spec]
|
||||
[quo2.components.buttons.predictive-keyboard.component-spec]
|
||||
[quo2.components.colors.color-picker.component-spec]
|
||||
[quo2.components.counter.--tests--.counter-component-spec]
|
||||
[quo2.components.counter.step.component-spec]
|
||||
[quo2.components.dividers.--tests--.divider-label-component-spec]
|
||||
[quo2.components.dividers.strength-divider.component-spec]
|
||||
[quo2.components.drawers.action-drawers.component-spec]
|
||||
[quo2.components.drawers.documentation-drawers.component-spec]
|
||||
[quo2.components.drawers.drawer-buttons.component-spec]
|
||||
[quo2.components.drawers.permission-context.component-spec]
|
||||
[quo2.components.inputs.input.component-spec]
|
||||
|
||||
@@ -130,6 +130,11 @@
|
||||
(when (and player (.-canPlay ^js player))
|
||||
(.-currentTime ^js player)))
|
||||
|
||||
(defn set-player-wake-lock
|
||||
[player wake-lock?]
|
||||
(when player
|
||||
(set! (.-wakeLock player) wake-lock?)))
|
||||
|
||||
(defn toggle-playpause-player
|
||||
[player on-play on-pause on-error]
|
||||
(when (and player (.-canPlay ^js player))
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
|
||||
(def dismiss-keyboard! #(.dismiss keyboard))
|
||||
|
||||
(def device-event-emitter (.-DeviceEventEmitter ^js react-native))
|
||||
|
||||
(defn hide-splash-screen
|
||||
[]
|
||||
(.hide ^js (-> react-native .-NativeModules .-SplashScreen)))
|
||||
@@ -128,6 +130,9 @@
|
||||
(when (exists? (.-NativeModules ^js react-native))
|
||||
(.-RNSelectableTextInputManager ^js (.-NativeModules ^js react-native))))
|
||||
|
||||
;; TODO: iOS native implementation https://github.com/status-im/status-mobile/issues/14137
|
||||
(defonce selectable-text-input
|
||||
(reagent/adapt-react-class
|
||||
(.requireNativeComponent ^js react-native "RNSelectableTextInput")))
|
||||
(if platform/android?
|
||||
(reagent/adapt-react-class
|
||||
(.requireNativeComponent ^js react-native "RNSelectableTextInput"))
|
||||
view))
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
(ns status-im.add-new.core
|
||||
(:require [clojure.string :as string]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.add-new.db :as db]
|
||||
[status-im2.contexts.chat.events :as chat]
|
||||
[status-im2.contexts.contacts.events :as contact]
|
||||
[status-im.ethereum.core :as ethereum]
|
||||
[status-im.ethereum.ens :as ens]
|
||||
[status-im.ethereum.stateofus :as stateofus]
|
||||
[utils.i18n :as i18n]
|
||||
[status-im.router.core :as router]
|
||||
[status-im.utils.db :as utils.db]
|
||||
[utils.re-frame :as rf]
|
||||
[status-im.utils.random :as random]
|
||||
[status-im.utils.utils :as utils]
|
||||
[status-im2.navigation.events :as navigation]))
|
||||
|
||||
(re-frame/reg-fx
|
||||
:resolve-public-key
|
||||
(fn [{:keys [chain-id contact-identity cb]}]
|
||||
(let [ens-name (stateofus/ens-name-parse contact-identity)]
|
||||
(ens/pubkey chain-id ens-name cb))))
|
||||
|
||||
;;NOTE we want to handle only last resolve
|
||||
(def resolve-last-id (atom nil))
|
||||
|
||||
(rf/defn new-chat-set-new-identity
|
||||
{:events [:new-chat/set-new-identity]}
|
||||
[{db :db} new-identity-raw new-ens-name id]
|
||||
(let [ens-error (and (= new-identity-raw "0x") (not (string/blank? new-ens-name)))]
|
||||
(when (or (not id) (= id @resolve-last-id))
|
||||
(if ens-error
|
||||
{:db (assoc-in db [:contacts/new-identity :state] :error)}
|
||||
(let [new-identity (utils/safe-trim new-identity-raw)
|
||||
is-public-key? (and (string? new-identity)
|
||||
(utils.db/valid-public-key? new-identity))
|
||||
is-ens? (and (not is-public-key?)
|
||||
(ens/valid-eth-name-prefix? new-identity))
|
||||
error (db/validate-pub-key db new-identity)]
|
||||
(reset! resolve-last-id nil)
|
||||
(merge {:db (assoc db
|
||||
:contacts/new-identity
|
||||
{:public-key new-identity
|
||||
:state (cond is-ens?
|
||||
:searching
|
||||
(and (string/blank? new-identity) (not new-ens-name))
|
||||
:empty
|
||||
error
|
||||
:error
|
||||
:else
|
||||
:valid)
|
||||
:error error
|
||||
:ens-name (stateofus/ens-name-parse new-ens-name)})}
|
||||
(when is-ens?
|
||||
(reset! resolve-last-id (random/id))
|
||||
{:resolve-public-key
|
||||
{:chain-id (ethereum/chain-id db)
|
||||
:contact-identity new-identity
|
||||
:cb #(re-frame/dispatch [:new-chat/set-new-identity
|
||||
%
|
||||
new-identity
|
||||
@resolve-last-id])}})))))))
|
||||
|
||||
(rf/defn clear-new-identity
|
||||
{:events [::clear-new-identity ::new-chat-focus]}
|
||||
[{:keys [db]}]
|
||||
{:db (dissoc db :contacts/new-identity)})
|
||||
|
||||
(rf/defn qr-code-handled
|
||||
{:events [::qr-code-handled]}
|
||||
[{:keys [db] :as cofx} {:keys [type public-key chat-id data ens-name]}
|
||||
{:keys [new-contact? nickname] :as opts}]
|
||||
(let [public-key? (and (string? data)
|
||||
(string/starts-with? data "0x"))
|
||||
chat-key (cond
|
||||
(= type :private-chat) chat-id
|
||||
(= type :contact) public-key
|
||||
(and (= type :undefined)
|
||||
public-key?)
|
||||
data)
|
||||
validation-result (db/validate-pub-key db chat-key)]
|
||||
(if-not validation-result
|
||||
(if new-contact?
|
||||
(rf/merge cofx
|
||||
(contact/send-contact-request chat-key)
|
||||
(navigation/navigate-to :contacts-list {}))
|
||||
(chat/start-chat cofx chat-key ens-name))
|
||||
{:utils/show-popup {:title (i18n/label :t/unable-to-read-this-code)
|
||||
:content (case validation-result
|
||||
:invalid
|
||||
(i18n/label :t/use-valid-contact-code)
|
||||
:yourself
|
||||
(i18n/label :t/can-not-add-yourself))
|
||||
:on-dismiss #(re-frame/dispatch [:pop-to-root :shell-stack])}})))
|
||||
|
||||
(rf/defn qr-code-scanned
|
||||
{:events [:contact/qr-code-scanned]}
|
||||
[{:keys [db]} data opts]
|
||||
{::router/handle-uri {:chain (ethereum/chain-keyword db)
|
||||
:chats (get db :chats)
|
||||
:uri data
|
||||
:cb #(re-frame/dispatch [::qr-code-handled % opts])}})
|
||||
@@ -1,30 +0,0 @@
|
||||
(ns status-im.add-new.db
|
||||
(:require [cljs.spec.alpha :as spec]
|
||||
[status-im.ethereum.ens :as ens]
|
||||
[status-im2.utils.validators :as validators]))
|
||||
|
||||
(defn own-public-key?
|
||||
[{:keys [multiaccount]} public-key]
|
||||
(= (:public-key multiaccount) public-key))
|
||||
|
||||
(defn validate-pub-key
|
||||
[db public-key]
|
||||
(cond
|
||||
(or (not (validators/valid-public-key? public-key))
|
||||
(= public-key ens/default-key))
|
||||
:invalid
|
||||
(own-public-key? db public-key)
|
||||
:yourself))
|
||||
|
||||
(spec/def ::name (spec/and string? not-empty))
|
||||
|
||||
(spec/def ::topic
|
||||
(spec/and string?
|
||||
not-empty
|
||||
(partial re-matches #"[a-z0-9\-]+")))
|
||||
|
||||
(defn valid-topic?
|
||||
[topic]
|
||||
(and topic
|
||||
(spec/valid? ::topic topic)
|
||||
(not (validators/valid-public-key? topic))))
|
||||
@@ -1,7 +1,6 @@
|
||||
(ns status-im.bottom-sheet.sheets
|
||||
(:require [utils.re-frame :as rf]
|
||||
[status-im.ui.screens.about-app.views :as about-app]
|
||||
[status-im.ui.screens.home.sheet.views :as home.sheet]
|
||||
[status-im.ui.screens.keycard.views :as keycard]
|
||||
[status-im.ui.screens.mobile-network-settings.view :as mobile-network-settings]
|
||||
[status-im.ui.screens.multiaccounts.key-storage.views :as key-storage]
|
||||
@@ -27,9 +26,6 @@
|
||||
(= view :mobile-network-offline)
|
||||
(merge mobile-network-settings/offline-sheet)
|
||||
|
||||
(= view :add-new)
|
||||
(merge home.sheet/add-new)
|
||||
|
||||
(= view :keycard.login/more)
|
||||
(merge keycard/more-sheet)
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
[status-im.ethereum.ens :as ens]
|
||||
[utils.i18n :as i18n]
|
||||
[status-im.multiaccounts.update.core :as multiaccounts.update]
|
||||
[status-im.native-module.core :as status]
|
||||
[native-module.core :as native-module]
|
||||
[status-im.signing.core :as signing]
|
||||
[status-im.ui.components.list-selection :as list-selection]
|
||||
[utils.re-frame :as rf]
|
||||
@@ -537,7 +537,7 @@
|
||||
(re-frame/reg-fx
|
||||
:browser/call-rpc
|
||||
(fn [[payload callback]]
|
||||
(status/call-rpc
|
||||
(native-module/call-rpc
|
||||
(types/clj->json payload)
|
||||
(fn [response]
|
||||
(if (= "" response)
|
||||
@@ -559,7 +559,7 @@
|
||||
(re-frame/reg-fx
|
||||
:browser/clear-web-data
|
||||
(fn []
|
||||
(status/clear-web-data)))
|
||||
(native-module/clear-web-data)))
|
||||
|
||||
(defn share-link
|
||||
[url]
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
(ns status-im.chat.models
|
||||
(:require [utils.i18n :as i18n]
|
||||
[re-frame.core :as re-frame]
|
||||
[utils.re-frame :as rf]
|
||||
[taoensso.timbre :as log]
|
||||
[status-im.add-new.db :as new-public-chat.db]
|
||||
[status-im.data-store.chats :as chats-store]))
|
||||
|
||||
;; OLD
|
||||
|
||||
(rf/defn handle-public-chat-created
|
||||
{:events [::public-chat-created]}
|
||||
[{:keys [db]} chat-id response]
|
||||
{:db (-> db
|
||||
(assoc-in [:chats chat-id] (chats-store/<-rpc (first (:chats response))))
|
||||
(update :chats-home-list conj chat-id))
|
||||
:dispatch [:chat/navigate-to-chat chat-id]})
|
||||
|
||||
(rf/defn create-public-chat-go
|
||||
[_ chat-id]
|
||||
{:json-rpc/call [{:method "wakuext_createPublicChat"
|
||||
:params [{:id chat-id}]
|
||||
:on-success #(re-frame/dispatch [::public-chat-created chat-id %])
|
||||
:on-error #(log/error "failed to create public chat" chat-id %)}]})
|
||||
|
||||
(rf/defn start-public-chat
|
||||
"Starts a new public chat"
|
||||
{:events [:chat.ui/start-public-chat]}
|
||||
[cofx topic]
|
||||
(if (new-public-chat.db/valid-topic? topic)
|
||||
(create-public-chat-go
|
||||
cofx
|
||||
topic)
|
||||
{:utils/show-popup {:title (i18n/label :t/cant-open-public-chat)
|
||||
:content (i18n/label :t/invalid-public-chat-topic)}}))
|
||||
@@ -10,8 +10,7 @@
|
||||
[utils.re-frame :as rf]
|
||||
[utils.i18n :as i18n]
|
||||
[status-im.utils.utils :as utils]
|
||||
[taoensso.timbre :as log]
|
||||
[status-im.ui.screens.chat.components.input :as input]))
|
||||
[taoensso.timbre :as log]))
|
||||
|
||||
(defn text->emoji
|
||||
"Replaces emojis in a specified `text`"
|
||||
@@ -35,9 +34,12 @@
|
||||
"Set input text for current-chat. Takes db and input text and cofx
|
||||
as arguments and returns new fx. Always clear all validation messages."
|
||||
{:events [:chat.ui/set-chat-input-text]}
|
||||
[{db :db} new-input chat-id]
|
||||
[{:keys [db] :as cofx} new-input chat-id]
|
||||
(let [current-chat-id (or chat-id (:current-chat-id db))]
|
||||
{:db (assoc-in db [:chat/inputs current-chat-id :input-text] (text->emoji new-input))}))
|
||||
(rf/merge cofx
|
||||
{:db (assoc-in db [:chat/inputs current-chat-id :input-text] (text->emoji new-input))}
|
||||
(when (empty? new-input)
|
||||
(mentions/clear-mentions)))))
|
||||
|
||||
(rf/defn set-input-content-height
|
||||
{:events [:chat.ui/set-input-content-height]}
|
||||
@@ -51,24 +53,29 @@
|
||||
(let [current-chat-id (or chat-id (:current-chat-id db))]
|
||||
{:db (assoc-in db [:chat/inputs current-chat-id :input-maximized?] maximized?)}))
|
||||
|
||||
(rf/defn set-input-refocus
|
||||
{:events [:chat.ui/set-input-refocus]}
|
||||
[{db :db} refocus? chat-id]
|
||||
(rf/defn set-input-focused
|
||||
{:events [:chat.ui/set-input-focused]}
|
||||
[{db :db} focused? chat-id]
|
||||
(let [current-chat-id (or chat-id (:current-chat-id db))]
|
||||
{:db (assoc-in db [:chat/inputs current-chat-id :input-refocus?] refocus?)}))
|
||||
{:db (assoc-in db [:chat/inputs current-chat-id :focused?] focused?)}))
|
||||
|
||||
(rf/defn set-input-audio
|
||||
{:events [:chat.ui/set-input-audio]}
|
||||
[{db :db} audio chat-id]
|
||||
(let [current-chat-id (or chat-id (:current-chat-id db))]
|
||||
{:db (assoc-in db [:chat/inputs current-chat-id :audio] audio)}))
|
||||
|
||||
(rf/defn select-mention
|
||||
{:events [:chat.ui/select-mention]}
|
||||
[{:keys [db] :as cofx} text-input-ref {:keys [primary-name searched-text match public-key] :as user}]
|
||||
(let [chat-id (:current-chat-id db)
|
||||
text (get-in db [:chat/inputs chat-id :input-text])
|
||||
method "wakuext_chatMentionNewInputTextWithMention"
|
||||
params [chat-id text primary-name]]
|
||||
method "wakuext_chatMentionSelectMention"
|
||||
params [chat-id text primary-name public-key]]
|
||||
{:json-rpc/call [{:method method
|
||||
:params params
|
||||
:on-success #(rf/dispatch [:mention/on-new-input-text-with-mentions-success %
|
||||
primary-name text-input-ref match searched-text
|
||||
public-key])
|
||||
:on-success #(rf/dispatch [:mention/on-select-mention-success %
|
||||
primary-name match searched-text public-key])
|
||||
:on-error #(rf/dispatch [:mention/on-error
|
||||
{:method method
|
||||
:params params} %])}]}))
|
||||
@@ -98,15 +105,14 @@
|
||||
[{:keys [db] :as cofx} message]
|
||||
(let [current-chat-id (:current-chat-id db)
|
||||
text (get-in message [:content :text])]
|
||||
(rf/merge cofx
|
||||
{:db (-> db
|
||||
(assoc-in [:chat/inputs current-chat-id :metadata :editing-message]
|
||||
message)
|
||||
(assoc-in [:chat/inputs current-chat-id :metadata :responding-to-message] nil)
|
||||
(update-in [:chat/inputs current-chat-id :metadata]
|
||||
dissoc
|
||||
:sending-image))}
|
||||
(input/set-input-text text current-chat-id))))
|
||||
{:db (-> db
|
||||
(assoc-in [:chat/inputs current-chat-id :metadata :editing-message]
|
||||
message)
|
||||
(assoc-in [:chat/inputs current-chat-id :metadata :responding-to-message] nil)
|
||||
(update-in [:chat/inputs current-chat-id :metadata]
|
||||
dissoc
|
||||
:sending-image))
|
||||
:dispatch [:mention/to-input-field text current-chat-id]}))
|
||||
|
||||
(rf/defn show-contact-request-input
|
||||
"Sets reference to previous chat message and focuses on input"
|
||||
@@ -158,10 +164,7 @@
|
||||
:image-path (utils/safe-replace resized-uri #"file://" "")
|
||||
:image-width width
|
||||
:image-height height
|
||||
;; TODO: message not received if text field is
|
||||
;; nil or empty, issue:
|
||||
;; https://github.com/status-im/status-mobile/issues/14754
|
||||
:text (or input-text "placeholder")
|
||||
:text input-text
|
||||
:response-to message-id})
|
||||
images)))
|
||||
|
||||
@@ -181,7 +184,6 @@
|
||||
[{:keys [db] :as cofx}]
|
||||
(let [current-chat-id (:current-chat-id db)]
|
||||
(rf/merge cofx
|
||||
{:set-text-input-value [current-chat-id ""]}
|
||||
(clean-input current-chat-id)
|
||||
(mentions/clear-mentions))))
|
||||
|
||||
@@ -225,22 +227,21 @@
|
||||
|
||||
(rf/defn send-edited-message
|
||||
[{:keys [db] :as cofx} text {:keys [message-id quoted-message chat-id]}]
|
||||
(let [pinned-message (get-in db [:pin-messages chat-id message-id])]
|
||||
(rf/merge
|
||||
cofx
|
||||
{:json-rpc/call [{:method "wakuext_editMessage"
|
||||
:params [{:id message-id
|
||||
:text text
|
||||
:content-type (if (message-content/emoji-only-content?
|
||||
{:text text :response-to quoted-message})
|
||||
constants/content-type-emoji
|
||||
constants/content-type-text)}]
|
||||
:js-response true
|
||||
:on-error #(log/error "failed to edit message " %)
|
||||
:on-success (fn [result]
|
||||
(re-frame/dispatch [:sanitize-messages-and-process-response
|
||||
result]))}]}
|
||||
(cancel-message-edit))))
|
||||
(rf/merge
|
||||
cofx
|
||||
{:json-rpc/call [{:method "wakuext_editMessage"
|
||||
:params [{:id message-id
|
||||
:text text
|
||||
:content-type (if (message-content/emoji-only-content?
|
||||
{:text text :response-to quoted-message})
|
||||
constants/content-type-emoji
|
||||
constants/content-type-text)}]
|
||||
:js-response true
|
||||
:on-error #(log/error "failed to edit message " %)
|
||||
:on-success (fn [result]
|
||||
(re-frame/dispatch [:sanitize-messages-and-process-response
|
||||
result]))}]}
|
||||
(cancel-message-edit)))
|
||||
|
||||
(rf/defn send-current-message
|
||||
"Sends message from current chat input"
|
||||
@@ -248,21 +249,21 @@
|
||||
[{{:keys [current-chat-id] :as db} :db :as cofx}]
|
||||
(let [{:keys [input-text metadata]} (get-in db [:chat/inputs current-chat-id])
|
||||
editing-message (:editing-message metadata)
|
||||
method "wakuext_chatMentionCheckMentions"
|
||||
method "wakuext_chatMentionReplaceWithPublicKey"
|
||||
params [current-chat-id input-text]]
|
||||
{:json-rpc/call [{:method method
|
||||
:params params
|
||||
:on-error #(rf/dispatch [:mention/on-error {:method method :params params} %])
|
||||
:on-success #(rf/dispatch [:mention/on-check-mentions-success
|
||||
:on-success #(rf/dispatch [:mention/on-replace-with-public-key-success
|
||||
current-chat-id
|
||||
editing-message
|
||||
input-text
|
||||
%])}]}))
|
||||
|
||||
(rf/defn on-check-mentions-success
|
||||
{:events [:mention/on-check-mentions-success]}
|
||||
(rf/defn on-replace-with-public-key-success
|
||||
{:events [:mention/on-replace-with-public-key-success]}
|
||||
[{:keys [db] :as cofx} current-chat-id editing-message input-text new-text]
|
||||
(log/debug "[mentions] on-check-mentions-success"
|
||||
(log/debug "[mentions] on-replace-with-public-key-success"
|
||||
{:chat-id current-chat-id
|
||||
:editing-message editing-message
|
||||
:input-text input-text
|
||||
@@ -276,13 +277,12 @@
|
||||
{:events [:contacts/send-contact-request]}
|
||||
[{:keys [db] :as cofx} public-key message]
|
||||
(rf/merge cofx
|
||||
{:chat.ui/clear-inputs nil
|
||||
:chat.ui/clear-inputs-old nil
|
||||
:json-rpc/call [{:method "wakuext_sendContactRequest"
|
||||
:js-response true
|
||||
:params [{:id public-key :message message}]
|
||||
:on-error #(log/warn "failed to send a contact request" %)
|
||||
:on-success #(re-frame/dispatch [:transport/message-sent %])}]}
|
||||
{:chat.ui/clear-inputs nil
|
||||
:json-rpc/call [{:method "wakuext_sendContactRequest"
|
||||
:js-response true
|
||||
:params [{:id public-key :message message}]
|
||||
:on-error #(log/warn "failed to send a contact request" %)
|
||||
:on-success #(re-frame/dispatch [:transport/message-sent %])}]}
|
||||
(mentions/clear-mentions)
|
||||
(clean-input (:current-chat-id db))))
|
||||
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
(ns status-im.chat.models.mentions
|
||||
(:require [clojure.set :as set]
|
||||
[quo.react :as react]
|
||||
[quo.react-native :as rn]
|
||||
[re-frame.core :as re-frame]
|
||||
[utils.re-frame :as rf]
|
||||
[status-im.utils.platform :as platform]
|
||||
[taoensso.timbre :as log]
|
||||
[status-im.native-module.core :as status]))
|
||||
[taoensso.timbre :as log]))
|
||||
|
||||
(defn- transfer-input-segments
|
||||
[segments]
|
||||
@@ -56,8 +51,8 @@
|
||||
:ensVerified :ens-verified
|
||||
:added :added?
|
||||
:displayName :display-name
|
||||
:searchedText :searched-text
|
||||
})))
|
||||
:searchedText :searched-text})))
|
||||
|
||||
{}
|
||||
mentionable-users))
|
||||
(defn- transfer-mention-result
|
||||
@@ -81,111 +76,67 @@
|
||||
(log/error "[mentions] on-error"
|
||||
{:context context
|
||||
:error error}))
|
||||
|
||||
(rf/defn to-input-field
|
||||
{:events [:mention/to-input-field]}
|
||||
[_ text chat-id]
|
||||
(let [params [chat-id text]
|
||||
method "wakuext_chatMentionToInputField"]
|
||||
(log/debug "[mentions] to-input-field" {:params params})
|
||||
{:json-rpc/call [{:method method
|
||||
:params params
|
||||
:on-success #(rf/dispatch [:mention/on-to-input-field-success %])
|
||||
:on-error #(rf/dispatch [:mention/on-error
|
||||
{:method method
|
||||
:params params} %])}]}))
|
||||
(rf/defn on-to-input-field-success
|
||||
{:events [:mention/on-to-input-field-success]}
|
||||
[{:keys [db]} result]
|
||||
(log/debug "[mentions] on-to-input-field-success" {:result result})
|
||||
(let [{:keys [input-segments state chat-id new-text]} (transfer-mention-result result)]
|
||||
{:set-text-input-value [chat-id new-text]
|
||||
:db (-> db
|
||||
(assoc-in [:chats/mentions chat-id :mentions] state)
|
||||
(assoc-in [:chat/inputs-with-mentions chat-id] input-segments))}))
|
||||
|
||||
(rf/defn on-text-input
|
||||
{:events [:mention/on-text-input]}
|
||||
[{:keys [db]} {:keys [previous-text start end] :as args}]
|
||||
(let [previous-text
|
||||
;; NOTE(rasom): on iOS `previous-text` contains entire input's text. To
|
||||
;; get only removed part of text we have cut it.
|
||||
(if platform/android?
|
||||
previous-text
|
||||
(subs previous-text start end))
|
||||
chat-id (:current-chat-id db)
|
||||
state (merge args {:previous-text previous-text})
|
||||
state (set/rename-keys state
|
||||
{:previous-text :PreviousText
|
||||
:new-text :NewText
|
||||
:start :Start
|
||||
:end :End})
|
||||
params [chat-id state]
|
||||
method "wakuext_chatMentionOnTextInput"]
|
||||
(log/debug "[mentions] on-text-input" {:params params})
|
||||
{:json-rpc/call [{:method method
|
||||
:params [chat-id state]
|
||||
:on-success #(rf/dispatch [:mention/on-text-input-success %])
|
||||
:on-error #(rf/dispatch [:mention/on-error
|
||||
{:method method
|
||||
:params params} %])}]}))
|
||||
|
||||
(rf/defn on-text-input-success
|
||||
{:events [:mention/on-text-input-success]}
|
||||
[{:keys [db]} result]
|
||||
(log/debug "[mentions] on-text-input-success" {:result result})
|
||||
(let [{:keys [state chat-id]} (transfer-mention-result result)]
|
||||
{:db (assoc-in db [:chats/mentions chat-id :mentions] state)}))
|
||||
|
||||
(rf/defn recheck-at-idxs
|
||||
[{:keys [db]} public-key]
|
||||
(let [chat-id (:current-chat-id db)
|
||||
text (get-in db [:chat/inputs chat-id :input-text])
|
||||
params [chat-id text public-key]
|
||||
method "wakuext_chatMentionRecheckAtIdxs"]
|
||||
{:json-rpc/call [{:method method
|
||||
:params params
|
||||
:on-success #(rf/dispatch [:mention/on-recheck-at-idxs-success %])
|
||||
:on-error #(rf/dispatch [:mention/on-error
|
||||
{:method method
|
||||
:params params} %])}]}))
|
||||
|
||||
(rf/defn on-recheck-at-idxs-success
|
||||
{:events [:mention/on-recheck-at-idxs-success]}
|
||||
[{:keys [db]} result]
|
||||
(log/debug "[mentions] on-recheck-at-idxs-success" {:result result})
|
||||
(let [{:keys [input-segments state chat-id]} (transfer-mention-result result)]
|
||||
{:db (-> db
|
||||
(assoc-in [:chats/mentions chat-id :mentions] state)
|
||||
(assoc-in [:chat/inputs-with-mentions chat-id] input-segments))}))
|
||||
|
||||
(rf/defn reset-text-input-cursor
|
||||
[_ ref cursor]
|
||||
{::reset-text-input-cursor [ref cursor]})
|
||||
(rf/defn on-change-text
|
||||
{:events [:mention/on-change-text]}
|
||||
[{:keys [db]} text]
|
||||
(let [chat-id (:current-chat-id db)
|
||||
params [chat-id text]
|
||||
method "wakuext_chatMentionOnChangeText"]
|
||||
(log/debug "[mentions] on-change-text" {:params params})
|
||||
{:json-rpc/call [{:method method
|
||||
:params params
|
||||
:on-success #(rf/dispatch [:mention/on-change-text-success %])
|
||||
:on-error #(rf/dispatch [:mention/on-error
|
||||
{:method method
|
||||
:params params} %])}]}))
|
||||
|
||||
(rf/defn on-new-input-text-with-mentions-success
|
||||
{:events [:mention/on-new-input-text-with-mentions-success]}
|
||||
[{:keys [db] :as cofx} result primary-name text-input-ref match searched-text public-key]
|
||||
(log/debug "[mentions] on-new-input-text-with-mentions-success"
|
||||
(rf/defn on-change-text-success
|
||||
{:events [:mention/on-change-text-success]}
|
||||
[{:keys [db]} result]
|
||||
(log/debug "[mentions] on-text-input-success" {:result result})
|
||||
(let [{:keys [state chat-id mentionable-users input-segments]} (transfer-mention-result result)]
|
||||
{:db (-> db
|
||||
(assoc-in [:chats/mention-suggestions chat-id] mentionable-users)
|
||||
(assoc-in [:chats/mentions chat-id :mentions] state)
|
||||
(assoc-in [:chat/inputs-with-mentions chat-id] input-segments))}))
|
||||
|
||||
(rf/defn on-select-mention-success
|
||||
{:events [:mention/on-select-mention-success]}
|
||||
[{:keys [db] :as cofx} result primary-name match searched-text public-key]
|
||||
(log/debug "[mentions] on-select-mention-success"
|
||||
{:result result
|
||||
:primary-name primary-name
|
||||
:match match
|
||||
:searched-text searched-text
|
||||
:public-key public-key})
|
||||
(let [{:keys [new-text state chat-id]} (transfer-mention-result result)
|
||||
{:keys [at-sign-idx]} state
|
||||
cursor (+ at-sign-idx (count primary-name) 2)]
|
||||
(rf/merge
|
||||
cofx
|
||||
{:db (-> db
|
||||
(assoc-in [:chats/mention-suggestions chat-id] nil))
|
||||
:set-text-input-value [chat-id new-text text-input-ref]
|
||||
:dispatch [:chat.ui/set-chat-input-text new-text chat-id]}
|
||||
;; NOTE(rasom): Some keyboards do not react on selection property passed to
|
||||
;; text input (specifically Samsung keyboard with predictive text set on).
|
||||
;; In this case, if the user continues typing after the programmatic change,
|
||||
;; the new text is added to the last known cursor position before
|
||||
;; programmatic change. By calling `reset-text-input-cursor` we force the
|
||||
;; keyboard's cursor position to be changed before the next input.
|
||||
(reset-text-input-cursor text-input-ref cursor)
|
||||
;; NOTE(roman): on-text-input event is not dispatched when we change input
|
||||
;; programmatically, so we have to call `on-text-input` manually
|
||||
(on-text-input
|
||||
(let [match-len (count match)
|
||||
start (inc at-sign-idx)
|
||||
end (+ start match-len)]
|
||||
{:new-text match
|
||||
:previous-text searched-text
|
||||
:start start
|
||||
:end end}))
|
||||
(recheck-at-idxs public-key))))
|
||||
(let [{:keys [new-text chat-id state input-segments]} (transfer-mention-result result)]
|
||||
{:db (-> db
|
||||
(assoc-in [:chats/mentions chat-id :mentions] state)
|
||||
(assoc-in [:chat/inputs-with-mentions chat-id] input-segments)
|
||||
(assoc-in [:chats/mention-suggestions chat-id] nil))
|
||||
:dispatch [:chat.ui/set-chat-input-text new-text chat-id]}))
|
||||
|
||||
(rf/defn clear-suggestions
|
||||
[{:keys [db]}]
|
||||
@@ -208,60 +159,3 @@
|
||||
:on-error #(log/error "Error while calling wakuext_chatMentionClearMentions"
|
||||
{:error %})}]}
|
||||
(clear-suggestions))))
|
||||
|
||||
(rf/defn check-selection
|
||||
{:events [:mention/on-selection-change]}
|
||||
[{:keys [db]}
|
||||
{:keys [start end]}]
|
||||
(let [chat-id (:current-chat-id db)
|
||||
text (get-in db [:chat/inputs chat-id :input-text])
|
||||
params [chat-id text start end]
|
||||
method "wakuext_chatMentionHandleSelectionChange"]
|
||||
(when text
|
||||
(log/debug "[mentions] check-selection" {:params params})
|
||||
{:json-rpc/call [{:method method
|
||||
:params [chat-id text start end]
|
||||
:on-success #(rf/dispatch [:mention/on-handle-selection-change-success %])
|
||||
:on-error #(rf/dispatch [:mention/on-error
|
||||
{:method method
|
||||
:params params} %])}]})))
|
||||
|
||||
(rf/defn on-check-selection-success
|
||||
{:events [:mention/on-handle-selection-change-success]}
|
||||
[{:keys [db]} result]
|
||||
(log/debug "[mentions] on-check-selection-success" {:result result})
|
||||
(let [{:keys [state chat-id]} (transfer-mention-result result)]
|
||||
{:db (assoc-in db [:chats/mentions chat-id :mentions] (rename-state state))}))
|
||||
|
||||
(re-frame/reg-fx
|
||||
::reset-text-input-cursor
|
||||
(fn [[ref cursor]]
|
||||
(when ref
|
||||
(status/reset-keyboard-input
|
||||
(rn/find-node-handle (react/current-ref ref))
|
||||
cursor))))
|
||||
|
||||
(rf/defn calculate-suggestions
|
||||
{:events [:mention/calculate-suggestions]}
|
||||
[{:keys [db]}]
|
||||
(let [chat-id (:current-chat-id db)
|
||||
text (get-in db [:chat/inputs chat-id :input-text])
|
||||
params [chat-id text]
|
||||
method "wakuext_chatMentionCalculateSuggestions"]
|
||||
(log/debug "[mentions] calculate-suggestions" {:params params})
|
||||
{:json-rpc/call [{:method method
|
||||
:params [chat-id text]
|
||||
:on-success #(rf/dispatch [:mention/on-calculate-suggestions-success %])
|
||||
:on-error #(rf/dispatch [:mention/on-error
|
||||
{:method method
|
||||
:params params} %])}]}))
|
||||
|
||||
(rf/defn on-calculate-suggestions-success
|
||||
{:events [:mention/on-calculate-suggestions-success]}
|
||||
[{:keys [db]} result]
|
||||
(log/debug "[mentions] on-calculate-suggestions-success" {:result result})
|
||||
(let [{:keys [state chat-id mentionable-users input-segments]} (transfer-mention-result result)]
|
||||
{:db (-> db
|
||||
(assoc-in [:chats/mention-suggestions chat-id] mentionable-users)
|
||||
(assoc-in [:chats/mentions chat-id :mentions] state)
|
||||
(assoc-in [:chat/inputs-with-mentions chat-id] input-segments))}))
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
:clock clock-value
|
||||
:alias "alias"
|
||||
:name "name"
|
||||
:identicon "identicon"
|
||||
:from "from"}]
|
||||
;; <- cursor
|
||||
;; <- message
|
||||
@@ -107,7 +106,6 @@
|
||||
:clock (- clock-value 2)
|
||||
:alias "alias"
|
||||
:name "name"
|
||||
:identicon "identicon"
|
||||
:from "from"}
|
||||
result (dissoc (message/receive-many
|
||||
cofx
|
||||
|
||||
@@ -505,7 +505,7 @@
|
||||
(handle-response response-js)))
|
||||
|
||||
(rf/defn open-create-community
|
||||
{:events [::open-create-community]}
|
||||
{:events [:legacy-only-for-e2e/open-create-community]}
|
||||
[{:keys [db] :as cofx}]
|
||||
(rf/merge cofx
|
||||
{:db (assoc db :communities/create {:membership constants/community-no-membership-access})}
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
[clojure.string :as string]
|
||||
[status-im2.constants :as constants]
|
||||
[status-im.ethereum.core :as ethereum]
|
||||
[status-im.utils.gfycat.core :as gfycat]
|
||||
[status-im.utils.identicon :as identicon]))
|
||||
[status-im.utils.gfycat.core :as gfycat]))
|
||||
|
||||
(defn public-key->new-contact
|
||||
[public-key]
|
||||
@@ -12,7 +11,6 @@
|
||||
{:alias alias
|
||||
:name alias
|
||||
:primary-name alias
|
||||
:identicon (identicon/identicon public-key)
|
||||
:public-key public-key}))
|
||||
|
||||
(defn public-key-and-ens-name->new-contact
|
||||
@@ -59,7 +57,7 @@
|
||||
[members admins contacts {:keys [public-key preferred-name name] :as current-account}]
|
||||
(let [current-contact (some->
|
||||
current-account
|
||||
(select-keys [:name :preferred-name :public-key :identicon :images])
|
||||
(select-keys [:name :preferred-name :public-key :images])
|
||||
(set/rename-keys {:name :alias :preferred-name :name})
|
||||
(assoc :primary-name (or preferred-name name)))
|
||||
all-contacts (cond-> contacts
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
(ns status-im.contact.db-test
|
||||
(:require [cljs.test :refer-macros [deftest is testing]]
|
||||
[status-im.contact.db :as contact.db]
|
||||
[status-im.utils.gfycat.core :as gfycat]
|
||||
[status-im.utils.identicon :as identicon]))
|
||||
[status-im.utils.gfycat.core :as gfycat]))
|
||||
|
||||
(deftest contacts-subs
|
||||
(testing "get-all-contacts-in-group-chat"
|
||||
(with-redefs [gfycat/generate-gfy (constantly "generated")
|
||||
identicon/identicon (constantly "generated")]
|
||||
(with-redefs [gfycat/generate-gfy (constantly "generated")]
|
||||
(let
|
||||
[chat-contact-ids
|
||||
#{"0x04fcf40c526b09ff9fb22f4a5dbd08490ef9b64af700870f8a0ba2133f4251d5607ed83cd9047b8c2796576bc83fa0de23a13a4dced07654b8ff137fe744047917"
|
||||
@@ -21,7 +19,6 @@
|
||||
{:last-updated 0
|
||||
:name "User B"
|
||||
:primary-name "User B"
|
||||
:identicon "photo1"
|
||||
:last-online 0
|
||||
:public-key
|
||||
"0x04985040682b77a32bb4bb58268a0719bd24ca4d07c255153fe1eb2ccd5883669627bd1a092d7cc76e8e4b9104327667b19dcda3ac469f572efabe588c38c1985f"}}
|
||||
@@ -31,7 +28,6 @@
|
||||
:sharing-usage-data? false
|
||||
:primary-name "User A"
|
||||
:name "User A"
|
||||
:identicon "photo2"
|
||||
:public-key
|
||||
"0x048a2f8b80c60f89a91b4c1316e56f75b087f446e7b8701ceca06a40142d8efe1f5aa36bd0fee9e248060a8d5207b43ae98bef4617c18c71e66f920f324869c09f"}]
|
||||
(is
|
||||
@@ -42,20 +38,17 @@
|
||||
current-multiaccount)
|
||||
[{:name "generated"
|
||||
:primary-name "generated"
|
||||
:identicon "generated"
|
||||
:alias "generated"
|
||||
:admin? true
|
||||
:public-key
|
||||
"0x04fcf40c526b09ff9fb22f4a5dbd08490ef9b64af700870f8a0ba2133f4251d5607ed83cd9047b8c2796576bc83fa0de23a13a4dced07654b8ff137fe744047917"}
|
||||
{:alias "User A"
|
||||
:primary-name "User A"
|
||||
:identicon "photo2"
|
||||
:public-key
|
||||
"0x048a2f8b80c60f89a91b4c1316e56f75b087f446e7b8701ceca06a40142d8efe1f5aa36bd0fee9e248060a8d5207b43ae98bef4617c18c71e66f920f324869c09f"}
|
||||
{:last-updated 0
|
||||
:name "User B"
|
||||
:primary-name "User B"
|
||||
:identicon "photo1"
|
||||
:last-online 0
|
||||
:public-key
|
||||
"0x04985040682b77a32bb4bb58268a0719bd24ca4d07c255153fe1eb2ccd5883669627bd1a092d7cc76e8e4b9104327667b19dcda3ac469f572efabe588c38c1985f"}]))))))
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
(defn rpc->type
|
||||
[{:keys [chat-type name] :as chat}]
|
||||
(cond
|
||||
(or (= constants/public-chat-type chat-type)
|
||||
(= constants/profile-chat-type chat-type)
|
||||
(or (= constants/profile-chat-type chat-type)
|
||||
(= constants/timeline-chat-type chat-type))
|
||||
(assoc chat
|
||||
:chat-name (str "#" name)
|
||||
@@ -39,10 +38,6 @@
|
||||
(defn- unmarshal-members
|
||||
[{:keys [members chat-type] :as chat}]
|
||||
(cond
|
||||
(= constants/public-chat-type chat-type) (assoc chat
|
||||
:contacts #{}
|
||||
:admins #{}
|
||||
:members-joined #{})
|
||||
(= constants/private-group-chat-type chat-type) (merge chat
|
||||
(reduce members-reducer
|
||||
{:admins #{}
|
||||
@@ -84,7 +79,6 @@
|
||||
:emoji (.-emoji chat)
|
||||
:timestamp (.-timestamp chat)
|
||||
:alias (.-alias chat)
|
||||
:identicon (.-identicon chat)
|
||||
:muted (.-muted chat)
|
||||
:joined (.-joined chat)
|
||||
:muted-till (.-mutetill chat)
|
||||
@@ -96,10 +90,16 @@
|
||||
:chat-type (.-chatType chat)
|
||||
:unviewed-messages-count (.-unviewedMessagesCount chat)
|
||||
:unviewed-mentions-count (.-unviewedMentionsCount chat)
|
||||
:last-message {:content {:text (.-text chat)
|
||||
:parsed-text (types/js->clj (.-parsedText chat))}
|
||||
:content-type (.-contentType chat)
|
||||
:community-id (.-contentCommunityId chat)}
|
||||
:last-message {:content {:text (.-text chat)
|
||||
:parsed-text (types/js->clj (.-parsedText chat))
|
||||
:response-to (.-responseTo chat)}
|
||||
:content-type (.-contentType chat)
|
||||
:community-id (.-contentCommunityId chat)
|
||||
:outgoing (boolean (.-outgoingStatus chat))
|
||||
:album-images-count (.-albumImagesCount chat)
|
||||
:from (.-from chat)
|
||||
:deleted? (.-deleted chat)
|
||||
:deleted-for-me? (.-deletedForMe chat)}
|
||||
:last-clock-value (.-lastClockValue chat)
|
||||
:profile-public-key (.-profile chat)
|
||||
:highlight (.-highlight chat)
|
||||
|
||||
@@ -42,7 +42,8 @@
|
||||
:imageWidth :image-width
|
||||
:imageHeight :image-height
|
||||
:new :new?
|
||||
:albumImagesCount :album-images-count})
|
||||
:albumImagesCount :album-images-count
|
||||
:displayName :display-name})
|
||||
|
||||
(update :quoted-message
|
||||
set/rename-keys
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
(ns status-im.ethereum.core
|
||||
(:require [clojure.string :as string]
|
||||
[status-im.ethereum.eip55 :as eip55]
|
||||
[status-im.native-module.core :as status]))
|
||||
[native-module.core :as native-module]))
|
||||
|
||||
(defn sha3
|
||||
[s]
|
||||
(when s
|
||||
(status/sha3 (str s))))
|
||||
(native-module/sha3 (str s))))
|
||||
|
||||
(defn utf8-to-hex
|
||||
[s]
|
||||
(let [hex (status/utf8-to-hex (str s))]
|
||||
(let [hex (native-module/utf8-to-hex (str s))]
|
||||
(if (empty? hex)
|
||||
nil
|
||||
hex)))
|
||||
|
||||
(defn hex-to-utf8
|
||||
[s]
|
||||
(let [utf8 (status/hex-to-utf8 s)]
|
||||
(let [utf8 (native-module/hex-to-utf8 s)]
|
||||
(if (empty? utf8)
|
||||
nil
|
||||
utf8)))
|
||||
@@ -118,7 +118,7 @@
|
||||
(defn address?
|
||||
[s]
|
||||
(when s
|
||||
(status/address? s)))
|
||||
(native-module/address? s)))
|
||||
|
||||
(defn network->chain-id
|
||||
[network]
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
e.g. 0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed"
|
||||
(:require [clojure.string :as string]
|
||||
[status-im.native-module.core :as status]))
|
||||
[native-module.core :as native-module]))
|
||||
|
||||
(def hex-prefix "0x")
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"Converts an arbitrary case address to one with correct checksum case."
|
||||
[address]
|
||||
(when address
|
||||
(status/to-checksum-address
|
||||
(native-module/to-checksum-address
|
||||
(if (string/starts-with? address hex-prefix)
|
||||
address
|
||||
(str hex-prefix address)))))
|
||||
@@ -21,4 +21,4 @@
|
||||
(defn valid-address-checksum?
|
||||
"Checks address checksum validity."
|
||||
[address]
|
||||
(status/check-address-checksum address))
|
||||
(native-module/check-address-checksum address))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
(ns status-im.ethereum.encode
|
||||
(:require [status-im.native-module.core :as status]))
|
||||
(:require [native-module.core :as native-module]))
|
||||
|
||||
(defn uint
|
||||
[x]
|
||||
(str "0x" (status/number-to-hex x)))
|
||||
(str "0x" (native-module/number-to-hex x)))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
(ns status-im.ethereum.ens
|
||||
(:require [clojure.string :as string]
|
||||
[status-im.native-module.core :as status]
|
||||
[native-module.core :as native-module]
|
||||
[status-im2.common.json-rpc.events :as json-rpc]))
|
||||
|
||||
;; this is the addresses of ens registries for the different networks
|
||||
@@ -66,7 +66,7 @@
|
||||
:params [chain-id ens-name]
|
||||
:on-success
|
||||
;;NOTE: returns a timestamp in s and we want ms
|
||||
#(cb (* (js/Number (status/hex-to-number %)) 1000))}))
|
||||
#(cb (* (js/Number (native-module/hex-to-number %)) 1000))}))
|
||||
|
||||
(defn register-prepare-tx
|
||||
[chain-id from ens-name pubkey cb]
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
status-im.bootnodes.core
|
||||
status-im.browser.core
|
||||
status-im.browser.permissions
|
||||
status-im.chat.models
|
||||
status-im.chat.models.images
|
||||
status-im.chat.models.input
|
||||
status-im.chat.models.loading
|
||||
@@ -30,7 +29,7 @@
|
||||
status-im.multiaccounts.logout.core
|
||||
[status-im.multiaccounts.model :as multiaccounts.model]
|
||||
status-im.multiaccounts.update.core
|
||||
[status-im.native-module.core :as status]
|
||||
[native-module.core :as native-module]
|
||||
status-im.network.net-info
|
||||
status-im.pairing.core
|
||||
status-im.profile.core
|
||||
@@ -60,7 +59,11 @@
|
||||
status-im2.contexts.onboarding.events
|
||||
status-im.chat.models.gaps
|
||||
[status-im2.navigation.events :as navigation]
|
||||
status-im2.contexts.chat.home.events))
|
||||
[status-im2.common.theme.core :as theme]
|
||||
[react-native.core :as rn]
|
||||
[react-native.platform :as platform]
|
||||
status-im2.contexts.chat.home.events
|
||||
status-im2.contexts.communities.home.events))
|
||||
|
||||
(re-frame/reg-fx
|
||||
:dismiss-keyboard
|
||||
@@ -85,12 +88,16 @@
|
||||
(re-frame/reg-fx
|
||||
:ui/close-application
|
||||
(fn [_]
|
||||
(status/close-application)))
|
||||
(native-module/close-application)))
|
||||
|
||||
(re-frame/reg-fx
|
||||
::app-state-change-fx
|
||||
(fn [state]
|
||||
(status/app-state-change state)))
|
||||
(when (and platform/ios? (= state "active"))
|
||||
;; Change the app theme if the ios device theme was updated when the app was in the background
|
||||
;; https://github.com/status-im/status-mobile/issues/15708
|
||||
(theme/change-device-theme (rn/get-color-scheme)))
|
||||
(native-module/app-state-change state)))
|
||||
|
||||
(re-frame/reg-fx
|
||||
:ui/listen-to-window-dimensions-change
|
||||
@@ -102,11 +109,6 @@
|
||||
[_]
|
||||
{:dismiss-keyboard nil})
|
||||
|
||||
(rf/defn identicon-generated
|
||||
{:events [:identicon-generated]}
|
||||
[{:keys [db]} path identicon]
|
||||
{:db (assoc-in db path identicon)})
|
||||
|
||||
(rf/defn gfycat-generated
|
||||
{:events [:gfycat-generated]}
|
||||
[{:keys [db]} path gfycat]
|
||||
@@ -142,7 +144,8 @@
|
||||
|
||||
(rf/defn on-return-from-background
|
||||
[{:keys [db now] :as cofx}]
|
||||
(let [app-in-background-since (get db :app-in-background-since)
|
||||
(let [new-account? (get db :onboarding-2/new-account?)
|
||||
app-in-background-since (get db :app-in-background-since)
|
||||
signed-up? (get-in db [:multiaccount :signed-up?])
|
||||
biometric-auth? (= (:auth-method db) "biometric")
|
||||
requires-bio-auth (and
|
||||
@@ -155,7 +158,8 @@
|
||||
{:db (dissoc db :app-in-background-since)}
|
||||
(mailserver/process-next-messages-request)
|
||||
(wallet/restart-wallet-service-after-background app-in-background-since)
|
||||
(universal-links/process-stored-event)
|
||||
(when-not new-account?
|
||||
(universal-links/process-stored-event))
|
||||
#(when-let [chat-id (:current-chat-id db)]
|
||||
{:dispatch [:chat/mark-all-as-read chat-id]})
|
||||
#(when requires-bio-auth
|
||||
|
||||
@@ -2,21 +2,6 @@
|
||||
(:require [re-frame.core :as re-frame]
|
||||
[status-im.utils.http :as http]))
|
||||
|
||||
(re-frame/reg-fx
|
||||
:http-get
|
||||
(fn [{:keys [url response-validator on-success on-error timeout-ms]}]
|
||||
(let [opts {:valid-response? response-validator
|
||||
:timeout-ms timeout-ms}]
|
||||
(http/get url on-success on-error opts))))
|
||||
|
||||
(re-frame/reg-fx
|
||||
:http-get-n
|
||||
(fn [calls]
|
||||
(doseq [{:keys [url response-validator on-success on-error timeout-ms]} calls]
|
||||
(let [opts {:valid-response? response-validator
|
||||
:timeout-ms timeout-ms}]
|
||||
(http/get url on-success on-error opts)))))
|
||||
|
||||
(re-frame/reg-fx
|
||||
:http-post
|
||||
(fn [{:keys [url data response-validator on-success on-error timeout-ms opts]}]
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
(rf-test/wait-for ; wait for login
|
||||
[::transport/messenger-started]
|
||||
(assert-messenger-started)
|
||||
(rf/dispatch-sync [:status-im.communities.core/open-create-community])
|
||||
(rf/dispatch-sync [:legacy-only-for-e2e/open-create-community])
|
||||
(doseq [[k v] (dissoc community :membership)]
|
||||
(rf/dispatch-sync [:status-im.communities.core/create-field k v]))
|
||||
(rf/dispatch [:status-im.communities.core/create-confirmation-pressed])
|
||||
|
||||
@@ -339,11 +339,10 @@
|
||||
(let [{:keys [key-uid encryption-public-key whisper-private-key]
|
||||
:as account-data}
|
||||
(js->clj data :keywordize-keys true)
|
||||
{:keys [identicon name]} (get-in db [:multiaccounts/multiaccounts key-uid])
|
||||
{:keys [name]} (get-in db [:multiaccounts/multiaccounts key-uid])
|
||||
key-uid (get-in db [:keycard :application-info :key-uid])
|
||||
multiaccount-data (types/clj->json {:name name
|
||||
:key-uid key-uid
|
||||
:identicon identicon})
|
||||
multiaccount-data (types/clj->json {:name name
|
||||
:key-uid key-uid})
|
||||
save-keys? (get-in db [:multiaccounts/login :save-password?])]
|
||||
(rf/merge cofx
|
||||
{:db
|
||||
@@ -360,7 +359,6 @@
|
||||
(update :multiaccounts/login assoc
|
||||
:password encryption-public-key
|
||||
:key-uid key-uid
|
||||
:identicon identicon
|
||||
:name name))
|
||||
|
||||
:keycard/login-with-keycard {:multiaccount-data multiaccount-data
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
["react-native" :refer (BackHandler)]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.keycard.card :as card]
|
||||
[status-im.native-module.core :as status]
|
||||
[native-module.core :as native-module]
|
||||
[status-im.utils.types :as types]
|
||||
[taoensso.timbre :as log]))
|
||||
|
||||
@@ -200,9 +200,9 @@
|
||||
(.remove listener)))
|
||||
|
||||
(re-frame/reg-fx
|
||||
:keycard/generate-name-and-photo
|
||||
:keycard/generate-name
|
||||
(fn [{:keys [public-key on-success]}]
|
||||
(status/gfycat-identicon-async
|
||||
(native-module/gfycat-identicon-async
|
||||
public-key
|
||||
(fn [whisper-name photo-path]
|
||||
(re-frame/dispatch
|
||||
|
||||
@@ -151,13 +151,12 @@
|
||||
:multiaccounts-stack
|
||||
[:multiaccounts
|
||||
:keycard-login-pin])
|
||||
(let [{:keys [identicon name]} (get-in db [:multiaccounts/multiaccounts key-uid])
|
||||
multiaccount-data (types/clj->json {:name name
|
||||
:key-uid key-uid
|
||||
:identicon identicon})
|
||||
account-data {:key-uid key-uid
|
||||
:encryption-public-key encryption-public-key
|
||||
:whisper-private-key whisper-private-key}]
|
||||
(let [{:keys [name]} (get-in db [:multiaccounts/multiaccounts key-uid])
|
||||
multiaccount-data (types/clj->json {:name name
|
||||
:key-uid key-uid})
|
||||
account-data {:key-uid key-uid
|
||||
:encryption-public-key encryption-public-key
|
||||
:whisper-private-key whisper-private-key}]
|
||||
{:db
|
||||
(-> db
|
||||
(assoc-in [:keycard :pin :status] nil)
|
||||
@@ -168,7 +167,6 @@
|
||||
(update :multiaccounts/login assoc
|
||||
:password encryption-public-key
|
||||
:key-uid key-uid
|
||||
:identicon identicon
|
||||
:name name
|
||||
:save-password? true))
|
||||
:keycard/login-with-keycard
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
[clojure.string :as string]
|
||||
[status-im.ethereum.core :as ethereum]
|
||||
[status-im.keycard.keycard :as keycard]
|
||||
[status-im.native-module.core :as status]
|
||||
[native-module.core :as native-module]
|
||||
[status-im.utils.platform :as platform]
|
||||
[status-im.utils.types :as types]
|
||||
[taoensso.timbre :as log]))
|
||||
@@ -296,7 +296,7 @@
|
||||
|
||||
(defn save-multiaccount-and-login
|
||||
[{:keys [key-uid multiaccount-data password settings node-config accounts-data chat-key]}]
|
||||
(status/save-multiaccount-and-login-with-keycard
|
||||
(native-module/save-multiaccount-and-login-with-keycard
|
||||
key-uid
|
||||
(types/clj->json multiaccount-data)
|
||||
password
|
||||
@@ -307,15 +307,15 @@
|
||||
|
||||
(defn login
|
||||
[args]
|
||||
(status/login-with-keycard args))
|
||||
(native-module/login-with-keycard args))
|
||||
|
||||
(defn send-transaction-with-signature
|
||||
[{:keys [transaction signature on-completed]}]
|
||||
(status/send-transaction-with-signature transaction signature on-completed))
|
||||
(native-module/send-transaction-with-signature transaction signature on-completed))
|
||||
|
||||
(defn delete-multiaccount-before-migration
|
||||
[{:keys [key-uid on-success on-error]}]
|
||||
(status/delete-multiaccount
|
||||
(native-module/delete-multiaccount
|
||||
key-uid
|
||||
(fn [result]
|
||||
(let [{:keys [error]} (types/json->clj result)]
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
status-im.keycard.fx
|
||||
[status-im.multiaccounts.create.core :as multiaccounts.create]
|
||||
[status-im.multiaccounts.model :as multiaccounts.model]
|
||||
[status-im.native-module.core :as status]
|
||||
[native-module.core :as native-module]
|
||||
[status-im.popover.core :as popover]
|
||||
[utils.re-frame :as rf]
|
||||
[utils.datetime :as datetime]
|
||||
@@ -160,7 +160,6 @@
|
||||
(let [{{:keys [multiaccount secrets flow]} :keycard} db
|
||||
{:keys [address
|
||||
name
|
||||
identicon
|
||||
public-key
|
||||
whisper-public-key
|
||||
wallet-public-key
|
||||
@@ -175,18 +174,17 @@
|
||||
recovered]}
|
||||
multiaccount
|
||||
{:keys [pairing paired-on]} secrets
|
||||
{:keys [name identicon]}
|
||||
{:keys [name]}
|
||||
(if (nil? name)
|
||||
;; name might have been generated during recovery via passphrase
|
||||
(get-in db [:intro-wizard :derived constants/path-whisper-keyword])
|
||||
{:name name
|
||||
:identicon identicon})]
|
||||
{:name name})]
|
||||
;; if a name is still `nil` we have to generate it before multiaccount's
|
||||
;; creation otherwise spec validation will fail
|
||||
(if (nil? name)
|
||||
{:keycard/generate-name-and-photo
|
||||
{:keycard/generate-name
|
||||
{:public-key whisper-public-key
|
||||
:on-success ::on-name-and-photo-generated}}
|
||||
:on-success ::on-name-generated}}
|
||||
(rf/merge cofx
|
||||
{:db (-> db
|
||||
(assoc-in [:keycard :setup-step] nil)
|
||||
@@ -199,8 +197,7 @@
|
||||
constants/path-whisper-keyword
|
||||
{:public-key whisper-public-key
|
||||
:address (eip55/address->checksum whisper-address)
|
||||
:name name
|
||||
:identicon identicon}
|
||||
:name name}
|
||||
constants/path-default-wallet-keyword
|
||||
{:public-key wallet-public-key
|
||||
:address (eip55/address->checksum wallet-address)}}
|
||||
@@ -250,14 +247,14 @@
|
||||
(re-frame/reg-fx
|
||||
::finish-migration
|
||||
(fn [[account settings password encryption-pass login-params]]
|
||||
(status/convert-to-keycard-account
|
||||
(native-module/convert-to-keycard-account
|
||||
account
|
||||
settings
|
||||
password
|
||||
encryption-pass
|
||||
#(let [{:keys [error]} (types/json->clj %)]
|
||||
(if (string/blank? error)
|
||||
(status/login-with-keycard login-params)
|
||||
(native-module/login-with-keycard login-params)
|
||||
(throw
|
||||
(js/Error.
|
||||
"Please shake the phone to report this error and restart the app. Migration failed unexpectedly.")))))))
|
||||
@@ -382,11 +379,11 @@
|
||||
{:on-card-connected :keycard/load-recovering-key-screen
|
||||
:handler (common/dispatch-event :keycard/import-multiaccount)}))
|
||||
|
||||
(rf/defn on-name-and-photo-generated
|
||||
{:events [::on-name-and-photo-generated]
|
||||
(rf/defn on-name-generated
|
||||
{:events [::on-name-generated]
|
||||
:interceptors [(re-frame/inject-cofx :random-guid-generator)
|
||||
(re-frame/inject-cofx ::multiaccounts.create/get-signing-phrase)]}
|
||||
[{:keys [db] :as cofx} whisper-name identicon]
|
||||
[{:keys [db] :as cofx} whisper-name]
|
||||
(rf/merge
|
||||
cofx
|
||||
{:db (update-in db
|
||||
@@ -394,6 +391,5 @@
|
||||
(fn [multiacc]
|
||||
(assoc multiacc
|
||||
:recovered (get db :recovered-account?)
|
||||
:name whisper-name
|
||||
:identicon identicon)))}
|
||||
:name whisper-name)))}
|
||||
(create-keycard-multiaccount)))
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
[utils.i18n :as i18n]
|
||||
[status-im.keycard.keycard :as keycard]
|
||||
[status-im.multiaccounts.create.core :as multiaccounts.create]
|
||||
[status-im.native-module.core :as status]
|
||||
[native-module.core :as native-module]
|
||||
[status-im.node.core :as node]
|
||||
[status-im.utils.types :as types]
|
||||
[status-im.utils.utils :as utils]
|
||||
@@ -249,14 +249,14 @@
|
||||
[{:keys [password on-success]}]
|
||||
(when (and (not @initialization)
|
||||
(not @derived-acc))
|
||||
(status/multiaccount-import-mnemonic
|
||||
(native-module/multiaccount-import-mnemonic
|
||||
"night fortune spider version version armed amused winner matter tonight cave flag"
|
||||
nil
|
||||
(fn [result]
|
||||
(let [{:keys [id] :as root-data}
|
||||
(multiaccounts.create/normalize-multiaccount-data-keys
|
||||
(types/json->clj result))]
|
||||
(status-im.native-module.core/multiaccount-derive-addresses
|
||||
(native-module.core/multiaccount-derive-addresses
|
||||
id
|
||||
[constants/path-wallet-root
|
||||
constants/path-eip1581
|
||||
@@ -266,14 +266,11 @@
|
||||
(let [derived-data (multiaccounts.create/normalize-derived-data-keys
|
||||
(types/json->clj result))
|
||||
public-key (get-in derived-data [constants/path-whisper-keyword :public-key])]
|
||||
(status/gfycat-identicon-async
|
||||
(native-module/gfycat-identicon-async
|
||||
public-key
|
||||
(fn [name photo-path]
|
||||
(fn [name _]
|
||||
(let [derived-data-extended
|
||||
(update derived-data
|
||||
constants/path-whisper-keyword
|
||||
merge
|
||||
{:name name :identicon photo-path})]
|
||||
(update derived-data constants/path-whisper-keyword assoc :name name)]
|
||||
(reset! derived-acc
|
||||
{:root-key root-data
|
||||
:derived derived-data-extended})))))))))))
|
||||
@@ -294,7 +291,7 @@
|
||||
(if delete-multiaccount?
|
||||
(fn [on-deletion-success]
|
||||
(js/alert "OH SHEET")
|
||||
(status/delete-multiaccount
|
||||
(native-module/delete-multiaccount
|
||||
key-uid
|
||||
(fn [result]
|
||||
(let [{:keys [error]} (types/json->clj result)]
|
||||
@@ -304,7 +301,7 @@
|
||||
(fn [cb] (cb)))]
|
||||
(deletion-wrapper
|
||||
(fn []
|
||||
(status/multiaccount-store-derived
|
||||
(native-module/multiaccount-store-derived
|
||||
id
|
||||
(:key-uid response)
|
||||
[constants/path-wallet-root
|
||||
@@ -398,14 +395,14 @@
|
||||
path-num (inc (get-in @re-frame.db/app-db
|
||||
[:multiaccount :latest-derived-path]))
|
||||
path (str "m/" path-num)]
|
||||
(status/multiaccount-load-account
|
||||
(native-module/multiaccount-load-account
|
||||
wallet-root-address
|
||||
hashed-password
|
||||
(fn [value]
|
||||
(let [{:keys [id error]} (types/json->clj value)]
|
||||
(if error
|
||||
(re-frame/dispatch [::new-account-error :password-error error])
|
||||
(status/multiaccount-derive-addresses
|
||||
(native-module/multiaccount-derive-addresses
|
||||
id
|
||||
[path]
|
||||
(fn [derived]
|
||||
@@ -413,7 +410,7 @@
|
||||
(if (some (fn [a] (= derived-address (get a :address))) accounts)
|
||||
(re-frame/dispatch [::new-account-error :account-error
|
||||
(i18n/label :t/account-exists-title)])
|
||||
(status/multiaccount-store-derived
|
||||
(native-module/multiaccount-store-derived
|
||||
id
|
||||
key-uid
|
||||
[path]
|
||||
@@ -436,7 +433,7 @@
|
||||
(swap! state assoc-in
|
||||
[:application-info :key-uid]
|
||||
(:key-uid keys))
|
||||
(status/multiaccount-store-derived
|
||||
(native-module/multiaccount-store-derived
|
||||
id
|
||||
(:key-uid keys)
|
||||
[constants/path-wallet-root
|
||||
@@ -473,7 +470,7 @@
|
||||
{:account address
|
||||
:password password
|
||||
:data (or data (str "0x" hash))})]
|
||||
(status/sign-message
|
||||
(native-module/sign-message
|
||||
params
|
||||
(fn [res]
|
||||
(let [signature (-> res
|
||||
@@ -481,7 +478,7 @@
|
||||
:result
|
||||
ethereum/normalized-hex)]
|
||||
(on-success signature)))))
|
||||
(status/sign-typed-data
|
||||
(native-module/sign-typed-data
|
||||
data
|
||||
address
|
||||
password
|
||||
@@ -498,7 +495,7 @@
|
||||
|
||||
(defn save-multiaccount-and-login
|
||||
[{:keys [key-uid multiaccount-data password settings node-config accounts-data]}]
|
||||
(status/save-account-and-login
|
||||
(native-module/save-account-and-login
|
||||
key-uid
|
||||
(types/clj->json multiaccount-data)
|
||||
password
|
||||
@@ -508,11 +505,11 @@
|
||||
|
||||
(defn login
|
||||
[{:keys [key-uid multiaccount-data password]}]
|
||||
(status/login-with-config key-uid multiaccount-data password node/login-node-config))
|
||||
(native-module/login-with-config key-uid multiaccount-data password node/login-node-config))
|
||||
|
||||
(defn send-transaction-with-signature
|
||||
[{:keys [transaction on-completed]}]
|
||||
(status/send-transaction transaction account-password on-completed))
|
||||
(native-module/send-transaction transaction account-password on-completed))
|
||||
|
||||
(defn delete-multiaccount-before-migration
|
||||
[{:keys [on-success]}]
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
[quo.design-system.colors :as colors]
|
||||
[re-frame.core :as re-frame]
|
||||
[utils.i18n :as i18n]
|
||||
[status-im.native-module.core :as status]
|
||||
[native-module.core :as native-module]
|
||||
[status-im.popover.core :as popover]
|
||||
[utils.re-frame :as rf]
|
||||
[status-im.utils.keychain.core :as keychain]
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
;;; android blacklist based on device info:
|
||||
|
||||
(def deviceinfo (status/get-device-model-info))
|
||||
(def deviceinfo (native-module/get-device-model-info))
|
||||
|
||||
;; {:model ?
|
||||
;; :brand "Xiaomi"
|
||||
|
||||
@@ -4,12 +4,11 @@
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.bottom-sheet.events :as bottom-sheet]
|
||||
[status-im.multiaccounts.update.core :as multiaccounts.update]
|
||||
[status-im.native-module.core :as native-module]
|
||||
[native-module.core :as native-module]
|
||||
[utils.re-frame :as rf]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[status-im2.constants :as constants]
|
||||
[status-im.utils.gfycat.core :as gfycat]
|
||||
[status-im.utils.identicon :as identicon]
|
||||
[status-im2.setup.hot-reload :as hot-reload]
|
||||
[status-im2.common.theme.core :as theme]
|
||||
[taoensso.timbre :as log]
|
||||
@@ -48,23 +47,11 @@
|
||||
(gfycat/generate-gfy identity))]
|
||||
[(:primary-name contact) (:secondary-name contact)])))
|
||||
|
||||
(def photo-quality-thumbnail :thumbnail)
|
||||
(def photo-quality-large :large)
|
||||
|
||||
(defn displayed-photo
|
||||
"If a photo, a image or an images array is set use it, otherwise fallback on identicon or generate"
|
||||
[{:keys [images identicon public-key]}]
|
||||
(cond
|
||||
(pos? (count images))
|
||||
(:uri (or (photo-quality-thumbnail images)
|
||||
(photo-quality-large images)
|
||||
(first images)))
|
||||
|
||||
(not (string/blank? identicon))
|
||||
identicon
|
||||
|
||||
:else
|
||||
(identicon/identicon public-key)))
|
||||
[{:keys [images]}]
|
||||
(or (:thumbnail images)
|
||||
(:large images)
|
||||
(first images)))
|
||||
|
||||
(re-frame/reg-fx
|
||||
::webview-debug-changed
|
||||
@@ -150,6 +137,7 @@
|
||||
(re-frame/dispatch [:change-shell-status-bar-style
|
||||
(if (shell.animation/home-stack-open?) status-bar-theme :light)])
|
||||
(when reload-ui?
|
||||
(rf/dispatch [:dissmiss-all-overlays])
|
||||
(hot-reload/reload)
|
||||
(when-not (= view-id :shell-stack)
|
||||
(re-frame/dispatch [:change-shell-nav-bar-color nav-bar-color]))))))
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
[status-im.ethereum.core :as ethereum]
|
||||
[status-im.ethereum.eip55 :as eip55]
|
||||
[utils.i18n :as i18n]
|
||||
[status-im.native-module.core :as status]
|
||||
[native-module.core :as native-module]
|
||||
[status-im.node.core :as node]
|
||||
[status-im2.config :as config]
|
||||
[utils.re-frame :as rf]
|
||||
@@ -44,7 +44,7 @@
|
||||
(re-frame/reg-fx
|
||||
::store-multiaccount
|
||||
(fn [[id key-uid hashed-password callback]]
|
||||
(status/multiaccount-store-derived
|
||||
(native-module/multiaccount-store-derived
|
||||
id
|
||||
key-uid
|
||||
[constants/path-wallet-root
|
||||
@@ -69,19 +69,19 @@
|
||||
(fn [result]
|
||||
(let [derived-data (normalize-derived-data-keys (types/json->clj result))
|
||||
public-key (get-in derived-data [constants/path-whisper-keyword :public-key])]
|
||||
(status/gfycat-identicon-async
|
||||
(native-module/gfycat-identicon-async
|
||||
public-key
|
||||
(fn [name identicon]
|
||||
(fn [name _]
|
||||
(let [derived-whisper (derived-data constants/path-whisper-keyword)
|
||||
derived-data-extended (assoc-in derived-data
|
||||
[constants/path-whisper-keyword]
|
||||
(merge derived-whisper {:name name :identicon identicon}))]
|
||||
(assoc derived-whisper :name name))]
|
||||
(re-frame/dispatch [::store-multiaccount-success key-code derived-data-extended]))))))]}))
|
||||
|
||||
(re-frame/reg-fx
|
||||
:multiaccount-generate-and-derive-addresses
|
||||
(fn []
|
||||
(status/multiaccount-generate-and-derive-addresses
|
||||
(native-module/multiaccount-generate-and-derive-addresses
|
||||
5
|
||||
12
|
||||
[constants/path-whisper
|
||||
@@ -127,7 +127,7 @@
|
||||
(re-frame/reg-fx
|
||||
::save-account-and-login
|
||||
(fn [[key-uid multiaccount-data hashed-password settings config accounts-data]]
|
||||
(status/save-account-and-login
|
||||
(native-module/save-account-and-login
|
||||
key-uid
|
||||
multiaccount-data
|
||||
hashed-password
|
||||
@@ -154,13 +154,12 @@
|
||||
:wallet true
|
||||
:path constants/path-default-wallet
|
||||
:name (i18n/label :t/main-account)})
|
||||
(let [{:keys [compressed-key public-key address name identicon]}
|
||||
(let [{:keys [compressed-key public-key address name]}
|
||||
(get-in multiaccount [:derived constants/path-whisper-keyword])]
|
||||
{:public-key public-key
|
||||
:compressed-key compressed-key
|
||||
:address (eip55/address->checksum address)
|
||||
:name name
|
||||
:identicon identicon
|
||||
:path constants/path-whisper
|
||||
:chat true})])
|
||||
|
||||
@@ -174,13 +173,11 @@
|
||||
(let [[wallet-account
|
||||
{:keys [public-key
|
||||
compressed-key
|
||||
identicon
|
||||
name]} :as accounts-data]
|
||||
(prepare-accounts-data
|
||||
multiaccount)
|
||||
multiaccount-data {:name name
|
||||
:address address
|
||||
:identicon identicon
|
||||
:key-uid key-uid
|
||||
:keycard-pairing keycard-pairing}
|
||||
keycard-multiaccount? (boolean keycard-pairing)
|
||||
@@ -202,7 +199,6 @@
|
||||
constants/path-wallet-root-keyword
|
||||
:address])
|
||||
:name name
|
||||
:identicon identicon
|
||||
;; public key of the chat account
|
||||
:public-key public-key
|
||||
;; compressed key of the chat account
|
||||
@@ -231,7 +227,6 @@
|
||||
db (assoc db
|
||||
:multiaccounts/login {:key-uid key-uid
|
||||
:name name
|
||||
:identicon identicon
|
||||
:password password
|
||||
:creating? true
|
||||
:processing true}
|
||||
|
||||