Compare commits

...
Author SHA1 Message Date
Andrea Maria Piana 1249371a1e Return data from cache if present
When we can't update the balance but we have an original balance, the
backend should return the last available data.

To test:

1) Login, make sure balances are present
2) Logout, go offline
3) Login again

It should show the latest available balance instead of 0s

https://github.com/status-im/status-go/compare/a93c8572...c5991352
2024-08-13 10:05:52 +01:00
Jamie Caprani 9a52339ea7 wallet(account): disable send and bridge options for assets with a 0 balance (#21033) 2024-08-12 17:26:40 +01:00
Mohsen d53bef385a [#20971] fix: app crash when collectible max limit is nan (#20992) 2024-08-09 21:39:07 +03:30
Parvesh Monu 35e71289dc Improve theme switch (#20984) 2024-08-09 16:42:49 +02:00
frank 0dfc8384e6 chore_: ignore sensitive fields of WalletConfig when logging (#20986) 2024-08-09 17:20:43 +08:00
Yevheniia Berdnyk 605e3a727d e2e: fixes for welcome button and more 2024-08-09 00:20:50 +03:00
Ulises Manuel 41e18993be fix(wallet): Remove redirection to send flow when the user scans an address QR code (#20979) 2024-08-08 08:19:41 -06:00
flexsurfer ce3f2b5895 Token-gated permissions are not displayed on community's homepage #20965 (#20976) 2024-08-08 12:16:38 +02:00
frank 3b4cbfa4bc fix_: enable light client and disable store confirmation for mobile v1 by default (#20953)
https://github.com/status-im/status-go/compare/cba3ac57...6581f75c
2024-08-07 21:48:10 +08:00
Yevheniia Berdnyk 9a3cdc4f8b e2e: fixes for community link and welcome button error 2024-08-06 18:58:31 +03:00
frankandSiddarth Kumar 1d84c30de3 chore:enable status proxy (#20931)
* feat_: enable status proxy

* chore: update jenkins lib

* chore: add missing env reference

---------

Co-authored-by: Siddarth Kumar <siddarthkay@gmail.com>
2024-08-06 07:19:36 -07:00
Jamie CapraniandYevheniia Berdnyk 8133c4c5f0 chore(wallet): feature flag adding watch only accounts (#20955)
* chore(wallet): feature flag adding watch only accounts

* e2e: disabled test for watch-only accounts

---------

Co-authored-by: Yevheniia Berdnyk <ie.berdnyk@gmail.com>
2024-08-05 10:08:05 -07:00
Yevheniia Berdnyk e21ece0f8d e2e: update for deep links tests 2024-08-05 17:57:35 +03:00
Sean Hagstrom 89828ba7fd chore: allow for overriding metro server port (#20202)
This change will now allow for customizing the port number when running the metro server. The environment variable `RCT_METRO_PORT` can now be set when executing commands like `make run-ios`, `make run ios-device`, and `make run-android`. Though, it should be noted that `make clean` may need to be ran before attempting to set or change `RCT_METRO_PORT` since the react-native app will have statically built code that references the value of RCT_METRO_PORT from compile time and not runtime.
2024-08-05 12:48:35 +01:00
Shivek Khurana 8215498ddb 📈 Capture onboarding funnel (#20926)
* 📈 Capture onboarding funnel

*  Faster lookup

*  Capture how many people enabled metrics

- It technically captures disabled too
- But we'll never know if someone disabled
- Because that info won't be transmitted

* ✏️ Fix tests

* 🧯 Fix lint
2024-08-02 22:19:58 +05:30
Ulises Manuel ae6205c874 fix(wallet): Fix input amount step skipped while sending a token (#20852)
* fix(wallet): Fix input amount step skipped while sending a token

* Add comment about ^:flush-dom metadata
2024-08-02 09:30:00 -06:00
Lungu Cristian 328f9686c9 Fix typed-data chainid check (#20943)
* fix: typed-data chainid check & toast on sign fail

* fix: parsing the chain-id and error-handling
2024-08-02 14:55:46 +03:00
Sean Hagstrom 9f412577d7 fix: remove mobile-data sync setting inside legacy settings (#20942) 2024-08-02 11:59:09 +01:00
Parvesh Monu 11bd340a94 fix 'Usage data' bottom sheet reappears after reopening the app if you swipe it down on onboarding (#20945) 2024-08-02 15:17:18 +05:30
Parvesh Monu 3c102b9797 fix Mobile app doesn't allow taking screenshots when the 'Block Screenshots' toggle is turned off (#20941) 2024-08-01 17:06:14 +05:30
Ulises Manuel bd4b7fc49d fix(wallet): Error while bridging tokens due to bonderFees (#20929) 2024-07-31 15:40:24 -06:00
Brian Sztamfater 29252336cc chore: bump react-native-camera-link version to Status fork to remove usage of ML Kit (#20891) 2024-07-31 17:54:21 -03:00
Brian Sztamfater 4b5b4f9099 fix(wallet): inverted values of receiver and sender when displaying bridging routes (#20893)
Signed-off-by: Brian Sztamfater <brian@status.im>
2024-07-31 17:02:03 -03:00
Yevheniia Berdnyk 28da6f8bfc e2e: fixes for wallet, community urls and more 2024-07-31 19:27:28 +03:00
Mohamed Javid e0fe0d2dbd fix(android): send and bridge ERC-20 tokens (#20924)
This commit adds the missing "encodeFunctionCall" method in Android

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2024-07-31 18:33:46 +05:30
frank 07cf34ad60 feat_: add fallback pairing support (#20921)
Creating this PR for regression testing the comparability of feature sync
between different versions(mainly current PR build vs v2.29) after adding
backend fallback pairing support. Because frontend haven't added the invocations
relate to fallback pairing API yet, so fallback pairing won't support with
current build.

relate status-go PR https://github.com/status-im/status-go/pull/5614

Testing notes expected: sync should work as before between different versions
like following: v2.29 <-> PR build PR build <-> recent desktop build

NOTE: It breaks with v1 of pairing, but that's ancient (last year I believe), so
safe to break.
2024-07-30 16:08:20 -03:00
Mohamed Javid 7c4c9a9fc0 fix_: use usd as default currency (#20916)
This commit uses "usd" currency as default for the fiat price calculation for the tokens. 

Every currency has a different format - decimal which we need to rely on a separate RPC to fetch currency format and do the calculation. So, this PR will change to use usd as the default for v2.30.

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2024-07-30 21:03:26 +05:30
Brian Sztamfater 59ceddbaad fix(wallet): fix bridge transactions (#20902)
* fix(wallet): fix bridge transactions

Signed-off-by: Brian Sztamfater <brian@status.im>

* add support for approve transactions

Signed-off-by: Brian Sztamfater <brian@status.im>

---------

Signed-off-by: Brian Sztamfater <brian@status.im>
2024-07-30 11:02:11 -03:00
mmilad75 99ccbc3383 Cover wallet send events with tests Part 2 #20411 #20533 (#20721) 2024-07-30 14:14:36 +02:00
Lungu Cristian 8c2d5398b0 Enabling WalletConnect feature flag (#20906)
* feat: removed wallet connect feature flag

* fix: show pending requests when logging out and in

* fix: don't show requests across (test/main)nets

* format: added env newlines

* fix: network state reset on network type change

* fix: reject typed-data if wrong chain-id

* chore: added logs for future debugging
2024-07-29 19:55:54 +03:00
mmilad75andJamie Caprani 67c83b13e3 fix(wallet): remove edit routes button in bridging (#20874)
Co-authored-by: Jamie Caprani <jamiecaprani@gmail.com>
2024-07-29 18:10:32 +02:00
Brian Sztamfater 11a84ba145 feat(wallet): disable complex routing (#20901) 2024-07-29 16:47:35 +01:00
Jamie Caprani 1f5bb579c9 chore(wallet): disable bridging on unsupported tokens (#20846) 2024-07-29 03:02:10 -07:00
Parvesh MonuandAndrea Maria Piana 4586f8007c Add toggle in advanced settings for mobile data
https://github.com/status-im/status-go/compare/4a43b2b2...9755b3de
Co-authored-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2024-07-29 14:27:28 +05:30
yqrashawn 55c620e59d fix: create password for small screen (#20645)
* fix: create password for small screen

* feat: use floating button page

Signed-off-by: yqrashawn <namy.19@gmail.com>

* fix: use keyboard will show for ios

Signed-off-by: yqrashawn <namy.19@gmail.com>

* fix: safe area bottom on devices without physical home button

Signed-off-by: yqrashawn <namy.19@gmail.com>

* feat(create-password): tips and checkbox stick with confirm button

* fix: floating button blur after rebase

* fix(floating-button): absolute content avoid keyboard view

---------

Signed-off-by: yqrashawn <namy.19@gmail.com>
2024-07-29 13:41:15 +08:00
mmilad75 525609f0af Wallet Activity: transactions are not sorted by time #20808 (#20862) 2024-07-27 17:22:01 +02:00
Icaro Motta 90653955a6 chore(settings): Disable telemetry option (#20881) 2024-07-26 16:51:49 -03:00
John Ngei d27ab756d0 fix_:display group message using the new ui (#20787) 2024-07-26 21:14:04 +02:00
Siddarth Kumar c6a1db6334 ci: enable split apks & build only for arm64-v8a (#20683)
In this commit:
- we set `ANDROID_ABI_SPLIT` to `true`
- we set `ANDROID_ABI_INCLUDE` to `arm64-v8a` for debug & PR android builds
- release builds would still contain `armeabi-v7a;arm64-v8a` and there is no change for E2E android builds
- we point to relevant changes in `status-jenkins-lib` which also introduces a size check for this `apk`.
The agreed threshold is 100 MB.
2024-07-27 00:02:44 +05:30
flexsurfer 73777e052e Ensure keycard account can send transaction after upgrading from v1 to v2 #20552 (#20845) 2024-07-26 17:45:45 +02:00
Mohsen a6d3fc3742 [#20524] fix: the missed keypairs are shown in the key pair list screen (#20888) 2024-07-26 19:11:01 +03:30
Parvesh Monu a671c70838 fix broken screen and navigation when syncing fails (#20887) 2024-07-26 19:31:42 +05:30
Shivek Khurana a45991b6dc 🥅 Filter connected dapps based on testnet mode, reject proposals and requests gracefully (#20799)
* 🥅 Filter connected dapps based on testnet mode

- Fixes #20794

* 🥅 Remove map, just filter

* 💿 Rebase

*  Remove greedy fetch

* 🙅‍♀️ Properly reject proposals and requests

* 🎗️ Remove newline and move `set`

- `set` was applied at the wrong place here

* ✏️ Address review comments

* 👀 Read proposal to reject from state

* ◀️ Bring back network filtering

* 🧹 Cleanup

* ✏️ Move comment around

* 🎣 Use filter operable accounts helper

*  Add back events deleted during rebase

* 🧰 Fix Issue 2, Testnet sessions not visible

* 🖊️ Fix lint

* 🔗 Make testnet filtering more explicit

* 🥢 Use union instead of two subsets call

* ✏️ Fix lint

* 🔇 Undo changes that creeped in an unrelated ns
2024-07-26 18:24:53 +05:30
BalogunofAfrica 2e9fa22e4f feat: wallet router v2 (#20631)
* add v2 method

* rename v2 to get-suggested-route

* remove timestamp check on success

* handle async signal for suggestion

* fix stop get suggested routes

* address feedback

* rename get-suggest-route

* prefer lazy seq

* fix formatting

* update suggested routes success

* refactor get-in calls in start-get-suggested-routes

* move transformations to data store

* clean suggested routes immediately

* fix lint

* pass precision as ar

* change test name

* fix big number division error (issues 1,2)

* only trigger router fetch when there address (to/from)

* check response data for error response when routes received via signal

* update status-go

* fix: test failure

* update status go

* handle error message for generic errors
2024-07-26 12:23:09 +01:00
John Ngei 737d8c4d53 rename sub to fix error when requesting to join community (#20868) 2024-07-26 11:38:49 +02:00
Parvesh Monu 3aa7e103f7 Sync process is blocked on Enabled notifications screen (#20883) 2024-07-26 13:48:38 +05:30
Icaro Motta c1d2d44da4 perf: Fix app freeze after login (#20729)
We do a few things to reduce the initial load and make the app more responsive
after login. The scenario we are covering is a user who joined communities with
a large number of members and/or which contain token-gated channels with many
members.

- Related to https://github.com/status-im/status-mobile/issues/20283
- Related to https://github.com/status-im/status-mobile/issues/20285

- Optimize how we convert a community from JS to CLJS. Community members and
  chat members are no longer transformed to CLJS, they are kept as JS. Read more
  details below.
- Delay processing lower-priority events by creating a third login phase. The
  goal is to not put on the same queue we process communities less important
  events, like fetching the count of unread notifications. Around 15 events
  could be delayed without causing trouble (and this further prevent a big chain
  of more events to be dispatched right after login).
- Tried to use re-frame's flush-dom metadata, but removed due to uncertainty,
  check out the discussion:
  https://github.com/status-im/status-mobile/pull/20729#discussion_r1683047969
  Use re-frame’s support for the flush-dom metadata whenever a signal arrives.
  According to the official documentation, this should tell re-frame to only
  process the event after the UI has been updated. It’s hard to say if this
  makes any difference, but the theory is sound.
- Reduce the amount of data returned to the subscription that renders a list of
  communities. We were returning too much, like all members, chats, token
  permissions, etc.

Other things I fixed or improved along the way:

- Because members are now stored as JS, I took the opportunity to fix how
  members are sorted when they are listed.
- Removed a few unused subs.
- Configured oops to not throw during development (in production the behavior is
  to never throw). This means oops is now safe to be used instead of interop
  that can mysteriously fail in advanced compilation.
- Show compressed key instead of public key in member list for the account
  currently logged in.

Technical details

The number one reason affecting the freeze after login was coming from
converting thousands of members inside communities and also because we were
doing it in an inefficient way using clojure.walk/stringify-keys. We shouldn't
also transform that much data on the client as the parent issue created by
flexsurfer correctly recommends. Ever since PR
https://github.com/status-im/status-mobile/pull/20414 was merged, status-go
doesn't return members in open channels, which greatly helps, for example, to
load the Status community. The problem still exists for communities with
token-gated channels with many members.

The current code in develop does something quite inefficient: it fetches the
communities, then transforms them recursively with js->clj and keywordizes keys,
then transforms again all the potentially thousands of member IDs back to
strings. This PR changes this. We now shallowly convert a community and ignore
members because they can grow too fast. From artificial benchmarks simulating
many members in token-gated channels, or communities with thousands of members,
the improvement is noticeable.

You will only really notice improvements if you have spectated or joined a
community with 1000+ members and/or a community with many token-gated channels,
each containing perhaps hundreds of members.

What's the ideal solution?

We should consider removing community members and channel members from the
community entity returned by status-go entirely. The members should be a
separate resource and paginated so that the client doesn't need to worry
about the number of members, for the most part.
2024-07-25 21:23:08 -03:00
Yevheniia Berdnyk 0fed8113d1 e2e: updated testnet switching and added one test into smoke 2024-07-25 23:46:13 +03:00
Ulises Manuel 53c35cb554 fix(wallet): Linear gradient exception on invalid colors for watched account cards (#20854)
* Create a linear-gradient wrapper to avoid crashes and notify color errors

* Fix references to the flamingo color

* Add customization color fallback
2024-07-25 13:35:46 -06:00
Mohamed Javid be82365542 chore(settings)_: Remove testnet toggle from legacy advanced settings (#20875)
This commit removes two toggles from legacy advanced settings

- "Testnet mode" - duplicate toggle as the user can switch to testnet from wallet settings
- "Enable Goerli as test network" - Goerli is depreciated and wallet services use Sepolia testnet as default. 

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2024-07-25 21:41:57 +05:30
Mohamed Javid eae8a65597 feat(wallet)_: Add beta info box in activity tab (#20873)
This commit adds the beta info box with links to chain explorers to the activity tab in the wallet.

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2024-07-25 21:28:30 +05:30
Lungu Cristian fe54a25a3a fix: not clearing network & web3-wallet on logout (#20886) 2024-07-25 18:37:26 +03:00
Alexander 15a4219ef4 Reject wallet-connect request by dragging the modal down (#20763) (#20836)
* Reject wallet-connect request by dragging the modal down (#20763)

* Fix
2024-07-25 16:51:10 +02:00
Alexander 2ffbdac89e WalletConnect show expired toast (#20857)
* WalletConnect show expired toast

* Fixes

* Fix

* Post-rebase fix
2024-07-25 16:11:31 +02:00
Parvesh Monu 402eb8397d fix Issue with scrolling WalletConnect transaction on Android (#20867) 2024-07-25 18:22:17 +05:30
Lungu Cristian ff88049a08 Fix WalletConnect header alignment on Android (#20860)
* fix: header align and max width for summary-tag

* fix: standard-title show ellipse when text is long

* fix: summary-tag long name overflowing
2024-07-25 14:21:19 +03:00
197 changed files with 3445 additions and 2888 deletions
+1
View File
@@ -35,3 +35,4 @@ FAST_CREATE_COMMUNITY_ENABLED=1
TEST_NETWORKS_ENABLED=1 TEST_NETWORKS_ENABLED=1
SHOW_NOT_IMPLEMENTED_FEATURES=0 SHOW_NOT_IMPLEMENTED_FEATURES=0
ENABLE_ALERT_BANNER=0 ENABLE_ALERT_BANNER=0
FLAG_WALLET_CONNECT_ENABLED=1
+2
View File
@@ -38,3 +38,5 @@ SHOW_NOT_IMPLEMENTED_FEATURES=1
DELETE_MESSAGE_FOR_ME_UNDO_TIME_LIMIT=10000 DELETE_MESSAGE_FOR_ME_UNDO_TIME_LIMIT=10000
DELETE_MESSAGE_UNDO_TIME_LIMIT=10000 DELETE_MESSAGE_UNDO_TIME_LIMIT=10000
ENABLE_ALERT_BANNER=0 ENABLE_ALERT_BANNER=0
FLAG_WALLET_CONNECT_ENABLED=1
MOBILE_DATA_SYNCING_TOGGLE_ENABLE=0
+1
View File
@@ -36,3 +36,4 @@ LOCAL_PAIRING_ENABLED=1
FAST_CREATE_COMMUNITY_ENABLED=1 FAST_CREATE_COMMUNITY_ENABLED=1
TEST_NETWORKS_ENABLED=1 TEST_NETWORKS_ENABLED=1
ENABLE_ALERT_BANNER=1 ENABLE_ALERT_BANNER=1
FLAG_WALLET_CONNECT_ENABLED=1
+1
View File
@@ -23,3 +23,4 @@ DELETE_MESSAGE_ENABLED=1
FAST_CREATE_COMMUNITY_ENABLED=0 FAST_CREATE_COMMUNITY_ENABLED=0
TEST_NETWORKS_ENABLED=0 TEST_NETWORKS_ENABLED=0
ENABLE_ALERT_BANNER=1 ENABLE_ALERT_BANNER=1
FLAG_WALLET_CONNECT_ENABLED=1
+1
View File
@@ -19,3 +19,4 @@ MAX_IMAGES_BATCH=1
DELETE_MESSAGE_ENABLED=1 DELETE_MESSAGE_ENABLED=1
FAST_CREATE_COMMUNITY_ENABLED=0 FAST_CREATE_COMMUNITY_ENABLED=0
TEST_NETWORKS_ENABLED=0 TEST_NETWORKS_ENABLED=0
FLAG_WALLET_CONNECT_ENABLED=1
+4 -5
View File
@@ -215,15 +215,13 @@ build-fdroid: ##@build Build release for F-Droid
build-android: export BUILD_ENV ?= prod build-android: export BUILD_ENV ?= prod
build-android: export BUILD_TYPE ?= nightly build-android: export BUILD_TYPE ?= nightly
build-android: export ORG_GRADLE_PROJECT_versionCode ?= $(TMP_BUILD_NUMBER) build-android: export ORG_GRADLE_PROJECT_versionCode ?= $(TMP_BUILD_NUMBER)
build-android: export ANDROID_ABI_SPLIT ?= false
build-android: export ANDROID_ABI_INCLUDE ?= armeabi-v7a;arm64-v8a;x86
build-android: ##@build Build unsigned Android APK build-android: ##@build Build unsigned Android APK
@scripts/build-android.sh @scripts/build-android.sh
release-android: export TARGET := keytool release-android: export TARGET := keytool
release-android: export KEYSTORE_PATH ?= $(HOME)/.gradle/status-im.keystore release-android: export KEYSTORE_PATH ?= $(HOME)/.gradle/status-im.keystore
release-android: keystore build-android ##@build Build signed Android APK release-android: keystore build-android ##@build Build signed Android APK
@scripts/sign-android.sh result/app-release-unsigned.apk @scripts/sign-android.sh result/app-arm64-v8a-release-unsigned.apk
release-ios: export TARGET := ios release-ios: export TARGET := ios
release-ios: export IOS_STATUS_GO_TARGETS := ios/arm64 release-ios: export IOS_STATUS_GO_TARGETS := ios/arm64
@@ -438,10 +436,11 @@ android-clean: ##@prepare Clean Gradle state
rm -rf ~/.gradle rm -rf ~/.gradle
android-ports: export FLOWSTORM_PORT := 7722 android-ports: export FLOWSTORM_PORT ?= 7722
android-ports: export TARGET := android-sdk android-ports: export TARGET := android-sdk
android-ports: export RCT_METRO_PORT ?= 8081
android-ports: ##@other Add proxies to Android Device/Simulator android-ports: ##@other Add proxies to Android Device/Simulator
adb reverse tcp:8081 tcp:8081 && \ adb reverse tcp:$(RCT_METRO_PORT) tcp:$(RCT_METRO_PORT) && \
adb reverse tcp:3449 tcp:3449 && \ adb reverse tcp:3449 tcp:3449 && \
adb reverse tcp:4567 tcp:4567 && \ adb reverse tcp:4567 tcp:4567 && \
adb reverse tcp:$(FLOWSTORM_PORT) tcp:$(FLOWSTORM_PORT) && \ adb reverse tcp:$(FLOWSTORM_PORT) tcp:$(FLOWSTORM_PORT) && \
+1 -1
View File
@@ -211,7 +211,7 @@ android {
reset() reset()
enable getEnvOrConfig('ANDROID_ABI_SPLIT').toBoolean() enable getEnvOrConfig('ANDROID_ABI_SPLIT').toBoolean()
include getEnvOrConfig('ANDROID_ABI_INCLUDE').split(";") include getEnvOrConfig('ANDROID_ABI_INCLUDE').split(";")
universalApk true universalApk false
} }
} }
signingConfigs { signingConfigs {
+4 -4
View File
@@ -38,10 +38,10 @@ KEYSTORE_PASSWORD=password
KEYSTORE_ALIAS=status KEYSTORE_ALIAS=status
KEYSTORE_KEY_PASSWORD=password KEYSTORE_KEY_PASSWORD=password
# By default we build a mostly universal APK # Splitting by CPU Architecture produces smaller APKs.
ANDROID_ABI_SPLIT=false ANDROID_ABI_SPLIT=true
# Some platforms are excluded though # By default its better to only build apk for most recent devices.
ANDROID_ABI_INCLUDE=armeabi-v7a;arm64-v8a;x86;x86_64 ANDROID_ABI_INCLUDE=arm64-v8a
org.gradle.jvmargs=-Xmx8704M -XX:+UseParallelGC org.gradle.jvmargs=-Xmx8704M -XX:+UseParallelGC
+2 -6
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.1' library 'status-jenkins-lib@v1.9.4'
/* Options section can't access functions in objects. */ /* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild() def isPRBuild = utils.isPRBuild()
@@ -72,11 +72,7 @@ pipeline {
stage('Upload') { stage('Upload') {
steps { script { steps { script {
def urls = apks.collect { s5cmd.upload(it) } def urls = apks.collect { s5cmd.upload(it) }
if (urls.size() > 1) { /* Return only the universal APK. */ env.PKG_URL = urls.first()
env.PKG_URL = urls.find { it.contains('universal') }
} else { /* If no universal is available pick first. */
env.PKG_URL = urls.first()
}
jenkins.setBuildDesc(APK: env.PKG_URL) jenkins.setBuildDesc(APK: env.PKG_URL)
} } } }
} }
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.1' library 'status-jenkins-lib@v1.9.4'
import groovy.json.JsonBuilder import groovy.json.JsonBuilder
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.1' library 'status-jenkins-lib@v1.9.4'
pipeline { pipeline {
agent { label 'linux' } agent { label 'linux' }
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.1' library 'status-jenkins-lib@v1.9.4'
/* Options section can't access functions in objects. */ /* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild() def isPRBuild = utils.isPRBuild()
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.1' library 'status-jenkins-lib@v1.9.4'
/* Options section can't access functions in objects. */ /* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild() def isPRBuild = utils.isPRBuild()
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.1' library 'status-jenkins-lib@v1.9.4'
pipeline { pipeline {
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.1' library 'status-jenkins-lib@v1.9.4'
pipeline { pipeline {
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.1' library 'status-jenkins-lib@v1.9.4'
pipeline { pipeline {
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.1' library 'status-jenkins-lib@v1.9.4'
pipeline { pipeline {
agent { label 'macos' } agent { label 'macos' }
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.1' library 'status-jenkins-lib@v1.9.4'
pipeline { pipeline {
agent { label params.AGENT_LABEL } agent { label params.AGENT_LABEL }
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.1' library 'status-jenkins-lib@v1.9.4'
pipeline { pipeline {
agent { label 'linux' } agent { label 'linux' }
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.1' library 'status-jenkins-lib@v1.9.4'
pipeline { pipeline {
agent { agent {
@@ -62,6 +62,11 @@ public class EncryptionUtils extends ReactContextBaseJavaModule {
return Statusgo.encodeTransfer(to, value); return Statusgo.encodeTransfer(to, value);
} }
@ReactMethod(isBlockingSynchronousMethod = true)
public String encodeFunctionCall(final String method, final String paramsJSON) {
return Statusgo.encodeFunctionCall(method, paramsJSON);
}
@ReactMethod(isBlockingSynchronousMethod = true) @ReactMethod(isBlockingSynchronousMethod = true)
public String decodeParameters(final String decodeParamJSON) { public String decodeParameters(final String decodeParamJSON) {
return Statusgo.decodeParameters(decodeParamJSON); return Statusgo.decodeParameters(decodeParamJSON);
+317 -460
View File
File diff suppressed because it is too large Load Diff
+1 -19
View File
@@ -45,7 +45,6 @@ androidx.core:core-splashscreen:1.0.0
androidx.core:core:1.0.0 androidx.core:core:1.0.0
androidx.core:core:1.1.0 androidx.core:core:1.1.0
androidx.core:core:1.1.0-rc01 androidx.core:core:1.1.0-rc01
androidx.core:core:1.2.0
androidx.core:core:1.6.0 androidx.core:core:1.6.0
androidx.core:core:1.9.0 androidx.core:core:1.9.0
androidx.cursoradapter:cursoradapter:1.0.0 androidx.cursoradapter:cursoradapter:1.0.0
@@ -68,7 +67,6 @@ androidx.documentfile:documentfile:1.0.0
androidx.drawerlayout:drawerlayout:1.0.0 androidx.drawerlayout:drawerlayout:1.0.0
androidx.emoji2:emoji2-views-helper:1.2.0 androidx.emoji2:emoji2-views-helper:1.2.0
androidx.emoji2:emoji2:1.2.0 androidx.emoji2:emoji2:1.2.0
androidx.exifinterface:exifinterface:1.0.0
androidx.exifinterface:exifinterface:1.1.0-beta01 androidx.exifinterface:exifinterface:1.1.0-beta01
androidx.exifinterface:exifinterface:1.1.0-rc01 androidx.exifinterface:exifinterface:1.1.0-rc01
androidx.exifinterface:exifinterface:1.2.0 androidx.exifinterface:exifinterface:1.2.0
@@ -518,15 +516,7 @@ com.googlecode.javaewah:JavaEWAH:1.1.12
com.googlecode.javaewah:JavaEWAH:1.1.13 com.googlecode.javaewah:JavaEWAH:1.1.13
com.googlecode.json-simple:json-simple:1.1 com.googlecode.json-simple:json-simple:1.1
com.googlecode.juniversalchardet:juniversalchardet:1.0.3 com.googlecode.juniversalchardet:juniversalchardet:1.0.3
com.google.android.datatransport:transport-api:2.2.1
com.google.android.datatransport:transport-backend-cct:2.3.3
com.google.android.datatransport:transport-runtime:2.2.6
com.google.android.gms:play-services-basement:18.0.0
com.google.android.gms:play-services-base:18.0.1
com.google.android.gms:play-services-mlkit-barcode-scanning:18.0.0
com.google.android.gms:play-services-tasks:18.0.1
com.google.android.material:material:1.2.0-alpha03 com.google.android.material:material:1.2.0-alpha03
com.google.android.odml:image:1.0.0-beta1
com.google.android:annotations:4.1.1.4 com.google.android:annotations:4.1.1.4
com.google.api.grpc:proto-google-common-protos:1.12.0 com.google.api.grpc:proto-google-common-protos:1.12.0
com.google.api.grpc:proto-google-common-protos:2.0.1 com.google.api.grpc:proto-google-common-protos:2.0.1
@@ -553,10 +543,6 @@ com.google.errorprone:error_prone_annotations:2.3.4
com.google.errorprone:error_prone_annotations:2.4.0 com.google.errorprone:error_prone_annotations:2.4.0
com.google.errorprone:error_prone_annotations:2.9.0 com.google.errorprone:error_prone_annotations:2.9.0
com.google.errorprone:error_prone_annotations:2.11.0 com.google.errorprone:error_prone_annotations:2.11.0
com.google.firebase:firebase-annotations:16.0.0
com.google.firebase:firebase-components:16.1.0
com.google.firebase:firebase-encoders-json:17.1.0
com.google.firebase:firebase-encoders:16.1.0
com.google.flatbuffers:flatbuffers-java:1.12.0 com.google.flatbuffers:flatbuffers-java:1.12.0
com.google.guava:failureaccess:1.0.1 com.google.guava:failureaccess:1.0.1
com.google.guava:guava:17.0 com.google.guava:guava:17.0
@@ -572,11 +558,6 @@ com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
com.google.j2objc:j2objc-annotations:1.1 com.google.j2objc:j2objc-annotations:1.1
com.google.j2objc:j2objc-annotations:1.3 com.google.j2objc:j2objc-annotations:1.3
com.google.jimfs:jimfs:1.1 com.google.jimfs:jimfs:1.1
com.google.mlkit:barcode-scanning-common:17.0.0
com.google.mlkit:barcode-scanning:17.0.2
com.google.mlkit:common:18.0.0
com.google.mlkit:vision-common:17.0.0
com.google.mlkit:vision-interfaces:16.0.0
com.google.prefab:cli:2.0.0 com.google.prefab:cli:2.0.0
com.google.protobuf:protobuf-java-util:3.4.0 com.google.protobuf:protobuf-java-util:3.4.0
com.google.protobuf:protobuf-java-util:3.10.0 com.google.protobuf:protobuf-java-util:3.10.0
@@ -591,6 +572,7 @@ com.google.testing.platform:core-proto:0.0.8-alpha04
com.google.testing.platform:core-proto:0.0.8-alpha07 com.google.testing.platform:core-proto:0.0.8-alpha07
com.google.testing.platform:core-proto:0.0.8-alpha08 com.google.testing.platform:core-proto:0.0.8-alpha08
com.google.test.platform:core-proto:0.0.2-dev com.google.test.platform:core-proto:0.0.2-dev
com.google.zxing:core:3.4.1
com.ibm.icu:icu4j:53.1 com.ibm.icu:icu4j:53.1
com.intellij:annotations:12.0 com.intellij:annotations:12.0
com.parse.bolts:bolts-tasks:1.4.0 com.parse.bolts:bolts-tasks:1.4.0
+35 -44
View File
@@ -87,7 +87,6 @@ https://dl.google.com/dl/android/maven2/androidx/documentfile/documentfile/1.0.0
https://dl.google.com/dl/android/maven2/androidx/drawerlayout/drawerlayout/1.0.0/drawerlayout-1.0.0.pom https://dl.google.com/dl/android/maven2/androidx/drawerlayout/drawerlayout/1.0.0/drawerlayout-1.0.0.pom
https://dl.google.com/dl/android/maven2/androidx/emoji2/emoji2-views-helper/1.2.0/emoji2-views-helper-1.2.0.pom https://dl.google.com/dl/android/maven2/androidx/emoji2/emoji2-views-helper/1.2.0/emoji2-views-helper-1.2.0.pom
https://dl.google.com/dl/android/maven2/androidx/emoji2/emoji2/1.2.0/emoji2-1.2.0.pom https://dl.google.com/dl/android/maven2/androidx/emoji2/emoji2/1.2.0/emoji2-1.2.0.pom
https://dl.google.com/dl/android/maven2/androidx/exifinterface/exifinterface/1.0.0/exifinterface-1.0.0.pom
https://dl.google.com/dl/android/maven2/androidx/exifinterface/exifinterface/1.1.0-beta01/exifinterface-1.1.0-beta01.pom https://dl.google.com/dl/android/maven2/androidx/exifinterface/exifinterface/1.1.0-beta01/exifinterface-1.1.0-beta01.pom
https://dl.google.com/dl/android/maven2/androidx/exifinterface/exifinterface/1.1.0-rc01/exifinterface-1.1.0-rc01.pom https://dl.google.com/dl/android/maven2/androidx/exifinterface/exifinterface/1.1.0-rc01/exifinterface-1.1.0-rc01.pom
https://dl.google.com/dl/android/maven2/androidx/exifinterface/exifinterface/1.2.0/exifinterface-1.2.0.pom https://dl.google.com/dl/android/maven2/androidx/exifinterface/exifinterface/1.2.0/exifinterface-1.2.0.pom
@@ -481,26 +480,8 @@ https://dl.google.com/dl/android/maven2/com/android/zipflinger/7.0.4/zipflinger-
https://dl.google.com/dl/android/maven2/com/android/zipflinger/7.2.1/zipflinger-7.2.1.pom https://dl.google.com/dl/android/maven2/com/android/zipflinger/7.2.1/zipflinger-7.2.1.pom
https://dl.google.com/dl/android/maven2/com/android/zipflinger/7.3.1/zipflinger-7.3.1.pom https://dl.google.com/dl/android/maven2/com/android/zipflinger/7.3.1/zipflinger-7.3.1.pom
https://dl.google.com/dl/android/maven2/com/android/zipflinger/8.1.1/zipflinger-8.1.1.pom https://dl.google.com/dl/android/maven2/com/android/zipflinger/8.1.1/zipflinger-8.1.1.pom
https://dl.google.com/dl/android/maven2/com/google/android/datatransport/transport-api/2.2.1/transport-api-2.2.1.pom
https://dl.google.com/dl/android/maven2/com/google/android/datatransport/transport-backend-cct/2.3.3/transport-backend-cct-2.3.3.pom
https://dl.google.com/dl/android/maven2/com/google/android/datatransport/transport-runtime/2.2.5/transport-runtime-2.2.5.pom
https://dl.google.com/dl/android/maven2/com/google/android/datatransport/transport-runtime/2.2.6/transport-runtime-2.2.6.pom
https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-basement/18.0.0/play-services-basement-18.0.0.pom
https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-base/18.0.1/play-services-base-18.0.1.pom
https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-mlkit-barcode-scanning/18.0.0/play-services-mlkit-barcode-scanning-18.0.0.pom
https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-tasks/18.0.1/play-services-tasks-18.0.1.pom
https://dl.google.com/dl/android/maven2/com/google/android/material/material/1.0.0/material-1.0.0.pom https://dl.google.com/dl/android/maven2/com/google/android/material/material/1.0.0/material-1.0.0.pom
https://dl.google.com/dl/android/maven2/com/google/android/material/material/1.2.0-alpha03/material-1.2.0-alpha03.pom https://dl.google.com/dl/android/maven2/com/google/android/material/material/1.2.0-alpha03/material-1.2.0-alpha03.pom
https://dl.google.com/dl/android/maven2/com/google/android/odml/image/1.0.0-beta1/image-1.0.0-beta1.pom
https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-annotations/16.0.0/firebase-annotations-16.0.0.pom
https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-components/16.1.0/firebase-components-16.1.0.pom
https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-encoders-json/17.1.0/firebase-encoders-json-17.1.0.pom
https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-encoders/16.1.0/firebase-encoders-16.1.0.pom
https://dl.google.com/dl/android/maven2/com/google/mlkit/barcode-scanning-common/17.0.0/barcode-scanning-common-17.0.0.pom
https://dl.google.com/dl/android/maven2/com/google/mlkit/barcode-scanning/17.0.2/barcode-scanning-17.0.2.pom
https://dl.google.com/dl/android/maven2/com/google/mlkit/common/18.0.0/common-18.0.0.pom
https://dl.google.com/dl/android/maven2/com/google/mlkit/vision-common/17.0.0/vision-common-17.0.0.pom
https://dl.google.com/dl/android/maven2/com/google/mlkit/vision-interfaces/16.0.0/vision-interfaces-16.0.0.pom
https://dl.google.com/dl/android/maven2/com/google/prefab/cli/2.0.0/cli-2.0.0.pom https://dl.google.com/dl/android/maven2/com/google/prefab/cli/2.0.0/cli-2.0.0.pom
https://dl.google.com/dl/android/maven2/com/google/testing/platform/core-proto/0.0.8-alpha04/core-proto-0.0.8-alpha04.pom https://dl.google.com/dl/android/maven2/com/google/testing/platform/core-proto/0.0.8-alpha04/core-proto-0.0.8-alpha04.pom
https://dl.google.com/dl/android/maven2/com/google/testing/platform/core-proto/0.0.8-alpha07/core-proto-0.0.8-alpha07.pom https://dl.google.com/dl/android/maven2/com/google/testing/platform/core-proto/0.0.8-alpha07/core-proto-0.0.8-alpha07.pom
@@ -523,12 +504,12 @@ https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.6/commons-cod
https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.9/commons-codec-1.9.pom https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.9/commons-codec-1.9.pom
https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.10/commons-codec-1.10.pom https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.10/commons-codec-1.10.pom
https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.11/commons-codec-1.11.pom https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.11/commons-codec-1.11.pom
https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.17.0/commons-codec-1.17.0.pom https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.17.1/commons-codec-1.17.1.pom
https://repo.maven.apache.org/maven2/commons-io/commons-io/2.4/commons-io-2.4.pom https://repo.maven.apache.org/maven2/commons-io/commons-io/2.4/commons-io-2.4.pom
https://repo.maven.apache.org/maven2/commons-io/commons-io/2.16.1/commons-io-2.16.1.pom https://repo.maven.apache.org/maven2/commons-io/commons-io/2.16.1/commons-io-2.16.1.pom
https://repo.maven.apache.org/maven2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.pom https://repo.maven.apache.org/maven2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.pom
https://repo.maven.apache.org/maven2/commons-logging/commons-logging/1.2/commons-logging-1.2.pom https://repo.maven.apache.org/maven2/commons-logging/commons-logging/1.2/commons-logging-1.2.pom
https://repo.maven.apache.org/maven2/commons-logging/commons-logging/1.3.2/commons-logging-1.3.2.pom https://repo.maven.apache.org/maven2/commons-logging/commons-logging/1.3.3/commons-logging-1.3.3.pom
https://repo.maven.apache.org/maven2/com/adobe/xmp/xmpcore/6.1.11/xmpcore-6.1.11.pom https://repo.maven.apache.org/maven2/com/adobe/xmp/xmpcore/6.1.11/xmpcore-6.1.11.pom
https://repo.maven.apache.org/maven2/com/afollestad/material-dialogs/commons/0.9.6.0/commons-0.9.6.0.pom https://repo.maven.apache.org/maven2/com/afollestad/material-dialogs/commons/0.9.6.0/commons-0.9.6.0.pom
https://repo.maven.apache.org/maven2/com/afollestad/material-dialogs/core/0.9.6.0/core-0.9.6.0.pom https://repo.maven.apache.org/maven2/com/afollestad/material-dialogs/core/0.9.6.0/core-0.9.6.0.pom
@@ -628,22 +609,22 @@ https://repo.maven.apache.org/maven2/com/facebook/soloader/soloader/0.10.1/soloa
https://repo.maven.apache.org/maven2/com/facebook/soloader/soloader/0.10.5/soloader-0.10.5.pom https://repo.maven.apache.org/maven2/com/facebook/soloader/soloader/0.10.5/soloader-0.10.5.pom
https://repo.maven.apache.org/maven2/com/facebook/yoga/proguard-annotations/1.19.0/proguard-annotations-1.19.0.pom https://repo.maven.apache.org/maven2/com/facebook/yoga/proguard-annotations/1.19.0/proguard-annotations-1.19.0.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.11.1/jackson-annotations-2.11.1.pom https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.11.1/jackson-annotations-2.11.1.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.17.1/jackson-annotations-2.17.1.pom https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.17.2/jackson-annotations-2.17.2.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-core/2.11.1/jackson-core-2.11.1.pom https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-core/2.11.1/jackson-core-2.11.1.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-core/2.17.1/jackson-core-2.17.1.pom https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-core/2.17.2/jackson-core-2.17.2.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.11.1/jackson-databind-2.11.1.pom https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.11.1/jackson-databind-2.11.1.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.17.1/jackson-databind-2.17.1.pom https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.17.2/jackson-databind-2.17.2.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-xml/2.11.1/jackson-dataformat-xml-2.11.1.pom https://repo.maven.apache.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-xml/2.11.1/jackson-dataformat-xml-2.11.1.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-base/2.11.1/jackson-base-2.11.1.pom https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-base/2.11.1/jackson-base-2.11.1.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-base/2.17.1/jackson-base-2.17.1.pom https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-base/2.17.2/jackson-base-2.17.2.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-bom/2.11.1/jackson-bom-2.11.1.pom https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-bom/2.11.1/jackson-bom-2.11.1.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-bom/2.17.1/jackson-bom-2.17.1.pom https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-bom/2.17.2/jackson-bom-2.17.2.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-parent/2.11/jackson-parent-2.11.pom https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-parent/2.11/jackson-parent-2.11.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-parent/2.17/jackson-parent-2.17.pom https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-parent/2.17/jackson-parent-2.17.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-modules-base/2.11.1/jackson-modules-base-2.11.1.pom https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-modules-base/2.11.1/jackson-modules-base-2.11.1.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-modules-base/2.17.1/jackson-modules-base-2.17.1.pom https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-modules-base/2.17.2/jackson-modules-base-2.17.2.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.11.1/jackson-module-jaxb-annotations-2.11.1.pom https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.11.1/jackson-module-jaxb-annotations-2.11.1.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.17.1/jackson-module-jaxb-annotations-2.17.1.pom https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.17.2/jackson-module-jaxb-annotations-2.17.2.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-module-kotlin/2.11.1/jackson-module-kotlin-2.11.1.pom https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-module-kotlin/2.11.1/jackson-module-kotlin-2.11.1.pom
https://repo.maven.apache.org/maven2/com/fasterxml/oss-parent/38/oss-parent-38.pom https://repo.maven.apache.org/maven2/com/fasterxml/oss-parent/38/oss-parent-38.pom
https://repo.maven.apache.org/maven2/com/fasterxml/oss-parent/58/oss-parent-58.pom https://repo.maven.apache.org/maven2/com/fasterxml/oss-parent/58/oss-parent-58.pom
@@ -712,7 +693,7 @@ https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotatio
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.10.0/error_prone_annotations-2.10.0.pom https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.10.0/error_prone_annotations-2.10.0.pom
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.11.0/error_prone_annotations-2.11.0.pom https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.11.0/error_prone_annotations-2.11.0.pom
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.27.0/error_prone_annotations-2.27.0.pom https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.27.0/error_prone_annotations-2.27.0.pom
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.28.0/error_prone_annotations-2.28.0.pom https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.29.2/error_prone_annotations-2.29.2.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.0.18/error_prone_parent-2.0.18.pom
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.2.0/error_prone_parent-2.2.0.pom https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.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.1/error_prone_parent-2.3.1.pom
@@ -725,7 +706,7 @@ https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.10.0/error_prone_parent-2.10.0.pom https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.10.0/error_prone_parent-2.10.0.pom
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.11.0/error_prone_parent-2.11.0.pom https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.11.0/error_prone_parent-2.11.0.pom
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.27.0/error_prone_parent-2.27.0.pom https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.27.0/error_prone_parent-2.27.0.pom
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.28.0/error_prone_parent-2.28.0.pom https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.29.2/error_prone_parent-2.29.2.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/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/google/1/google-1.pom
https://repo.maven.apache.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.pom https://repo.maven.apache.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.pom
@@ -770,7 +751,7 @@ https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-bom/3.13.0/pro
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-bom/3.17.2/protobuf-bom-3.17.2.pom https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-bom/3.17.2/protobuf-bom-3.17.2.pom
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-bom/3.19.2/protobuf-bom-3.19.2.pom https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-bom/3.19.2/protobuf-bom-3.19.2.pom
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-bom/3.19.3/protobuf-bom-3.19.3.pom https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-bom/3.19.3/protobuf-bom-3.19.3.pom
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-bom/4.27.0/protobuf-bom-4.27.0.pom https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-bom/4.28.0-RC1/protobuf-bom-4.28.0-RC1.pom
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-javalite/3.17.2/protobuf-javalite-3.17.2.pom https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-javalite/3.17.2/protobuf-javalite-3.17.2.pom
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-javalite/3.19.2/protobuf-javalite-3.19.2.pom https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-javalite/3.19.2/protobuf-javalite-3.19.2.pom
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java-util/3.4.0/protobuf-java-util-3.4.0.pom https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java-util/3.4.0/protobuf-java-util-3.4.0.pom
@@ -787,7 +768,7 @@ https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.13.0/pr
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.17.2/protobuf-java-3.17.2.pom https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.17.2/protobuf-java-3.17.2.pom
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.19.2/protobuf-java-3.19.2.pom https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.19.2/protobuf-java-3.19.2.pom
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.19.3/protobuf-java-3.19.3.pom https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.19.3/protobuf-java-3.19.3.pom
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/4.27.0/protobuf-java-4.27.0.pom https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/4.28.0-RC1/protobuf-java-4.28.0-RC1.pom
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-lite/3.0.1/protobuf-lite-3.0.1.pom https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-lite/3.0.1/protobuf-lite-3.0.1.pom
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/3.0.0/protobuf-parent-3.0.0.pom https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/3.0.0/protobuf-parent-3.0.0.pom
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/3.4.0/protobuf-parent-3.4.0.pom https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/3.4.0/protobuf-parent-3.4.0.pom
@@ -798,9 +779,11 @@ https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/3.13.0/
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/3.17.2/protobuf-parent-3.17.2.pom https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/3.17.2/protobuf-parent-3.17.2.pom
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/3.19.2/protobuf-parent-3.19.2.pom https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/3.19.2/protobuf-parent-3.19.2.pom
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/3.19.3/protobuf-parent-3.19.3.pom https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/3.19.3/protobuf-parent-3.19.3.pom
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/4.27.0/protobuf-parent-4.27.0.pom https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/4.28.0-RC1/protobuf-parent-4.28.0-RC1.pom
https://repo.maven.apache.org/maven2/com/google/truth/truth-parent/1.4.2/truth-parent-1.4.2.pom https://repo.maven.apache.org/maven2/com/google/truth/truth-parent/1.4.4/truth-parent-1.4.4.pom
https://repo.maven.apache.org/maven2/com/google/truth/truth/1.4.2/truth-1.4.2.pom https://repo.maven.apache.org/maven2/com/google/truth/truth/1.4.4/truth-1.4.4.pom
https://repo.maven.apache.org/maven2/com/google/zxing/core/3.4.1/core-3.4.1.pom
https://repo.maven.apache.org/maven2/com/google/zxing/zxing-parent/3.4.1/zxing-parent-3.4.1.pom
https://repo.maven.apache.org/maven2/com/ibm/icu/icu4j/53.1/icu4j-53.1.pom https://repo.maven.apache.org/maven2/com/ibm/icu/icu4j/53.1/icu4j-53.1.pom
https://repo.maven.apache.org/maven2/com/intellij/annotations/12.0/annotations-12.0.pom https://repo.maven.apache.org/maven2/com/intellij/annotations/12.0/annotations-12.0.pom
https://repo.maven.apache.org/maven2/com/parse/bolts/bolts-tasks/1.4.0/bolts-tasks-1.4.0.pom https://repo.maven.apache.org/maven2/com/parse/bolts/bolts-tasks/1.4.0/bolts-tasks-1.4.0.pom
@@ -971,9 +954,11 @@ https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-agent/1.14.15/byte
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-parent/1.11.13/byte-buddy-parent-1.11.13.pom https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-parent/1.11.13/byte-buddy-parent-1.11.13.pom
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-parent/1.11.19/byte-buddy-parent-1.11.19.pom https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-parent/1.11.19/byte-buddy-parent-1.11.19.pom
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-parent/1.14.15/byte-buddy-parent-1.14.15.pom https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-parent/1.14.15/byte-buddy-parent-1.14.15.pom
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-parent/1.14.17/byte-buddy-parent-1.14.17.pom
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy/1.11.13/byte-buddy-1.11.13.pom https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy/1.11.13/byte-buddy-1.11.13.pom
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy/1.11.19/byte-buddy-1.11.19.pom https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy/1.11.19/byte-buddy-1.11.19.pom
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy/1.14.15/byte-buddy-1.14.15.pom https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy/1.14.15/byte-buddy-1.14.15.pom
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy/1.14.17/byte-buddy-1.14.17.pom
https://repo.maven.apache.org/maven2/net/java/dev/jna/jna-platform/5.6.0/jna-platform-5.6.0.pom https://repo.maven.apache.org/maven2/net/java/dev/jna/jna-platform/5.6.0/jna-platform-5.6.0.pom
https://repo.maven.apache.org/maven2/net/java/dev/jna/jna/5.6.0/jna-5.6.0.pom https://repo.maven.apache.org/maven2/net/java/dev/jna/jna/5.6.0/jna-5.6.0.pom
https://repo.maven.apache.org/maven2/net/java/jvnet-parent/1/jvnet-parent-1.pom https://repo.maven.apache.org/maven2/net/java/jvnet-parent/1/jvnet-parent-1.pom
@@ -1018,6 +1003,7 @@ https://repo.maven.apache.org/maven2/org/apache/apache/18/apache-18.pom
https://repo.maven.apache.org/maven2/org/apache/apache/21/apache-21.pom https://repo.maven.apache.org/maven2/org/apache/apache/21/apache-21.pom
https://repo.maven.apache.org/maven2/org/apache/apache/23/apache-23.pom https://repo.maven.apache.org/maven2/org/apache/apache/23/apache-23.pom
https://repo.maven.apache.org/maven2/org/apache/apache/31/apache-31.pom https://repo.maven.apache.org/maven2/org/apache/apache/31/apache-31.pom
https://repo.maven.apache.org/maven2/org/apache/apache/32/apache-32.pom
https://repo.maven.apache.org/maven2/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.pom https://repo.maven.apache.org/maven2/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.pom
https://repo.maven.apache.org/maven2/org/apache/commons/commons-compress/1.12/commons-compress-1.12.pom https://repo.maven.apache.org/maven2/org/apache/commons/commons-compress/1.12/commons-compress-1.12.pom
https://repo.maven.apache.org/maven2/org/apache/commons/commons-compress/1.20/commons-compress-1.20.pom https://repo.maven.apache.org/maven2/org/apache/commons/commons-compress/1.20/commons-compress-1.20.pom
@@ -1037,6 +1023,7 @@ https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/42/common
https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/48/commons-parent-48.pom https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/48/commons-parent-48.pom
https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/52/commons-parent-52.pom https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/52/commons-parent-52.pom
https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/69/commons-parent-69.pom https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/69/commons-parent-69.pom
https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/71/commons-parent-71.pom
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.1.1/httpclient-4.1.1.pom https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.1.1/httpclient-4.1.1.pom
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.2.6/httpclient-4.2.6.pom https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.2.6/httpclient-4.2.6.pom
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.5.2/httpclient-4.5.2.pom https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.5.2/httpclient-4.5.2.pom
@@ -1091,7 +1078,7 @@ https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/2.8.1/che
https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/2.11.1/checker-qual-2.11.1.pom https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/2.11.1/checker-qual-2.11.1.pom
https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/3.5.0/checker-qual-3.5.0.pom https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/3.5.0/checker-qual-3.5.0.pom
https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/3.12.0/checker-qual-3.12.0.pom https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/3.12.0/checker-qual-3.12.0.pom
https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/3.44.0/checker-qual-3.44.0.pom https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/3.45.0/checker-qual-3.45.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/codehaus-parent/4/codehaus-parent-4.pom
https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy-xml/3.0.9/groovy-xml-3.0.9.pom https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy-xml/3.0.9/groovy-xml-3.0.9.pom
https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy-xml/3.0.10/groovy-xml-3.0.10.pom https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy-xml/3.0.10/groovy-xml-3.0.10.pom
@@ -1101,21 +1088,21 @@ https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-annotation
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.17/animal-sniffer-annotations-1.17.pom https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.17/animal-sniffer-annotations-1.17.pom
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.18/animal-sniffer-annotations-1.18.pom https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.18/animal-sniffer-annotations-1.18.pom
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.19/animal-sniffer-annotations-1.19.pom https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.19/animal-sniffer-annotations-1.19.pom
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.23/animal-sniffer-annotations-1.23.pom https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.24/animal-sniffer-annotations-1.24.pom
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-parent/1.14/animal-sniffer-parent-1.14.pom https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-parent/1.14/animal-sniffer-parent-1.14.pom
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-parent/1.17/animal-sniffer-parent-1.17.pom https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-parent/1.17/animal-sniffer-parent-1.17.pom
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-parent/1.18/animal-sniffer-parent-1.18.pom https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-parent/1.18/animal-sniffer-parent-1.18.pom
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-parent/1.19/animal-sniffer-parent-1.19.pom https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-parent/1.19/animal-sniffer-parent-1.19.pom
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-parent/1.23/animal-sniffer-parent-1.23.pom https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-parent/1.24/animal-sniffer-parent-1.24.pom
https://repo.maven.apache.org/maven2/org/codehaus/mojo/mojo-parent/34/mojo-parent-34.pom https://repo.maven.apache.org/maven2/org/codehaus/mojo/mojo-parent/34/mojo-parent-34.pom
https://repo.maven.apache.org/maven2/org/codehaus/mojo/mojo-parent/40/mojo-parent-40.pom https://repo.maven.apache.org/maven2/org/codehaus/mojo/mojo-parent/40/mojo-parent-40.pom
https://repo.maven.apache.org/maven2/org/codehaus/mojo/mojo-parent/50/mojo-parent-50.pom https://repo.maven.apache.org/maven2/org/codehaus/mojo/mojo-parent/50/mojo-parent-50.pom
https://repo.maven.apache.org/maven2/org/codehaus/mojo/mojo-parent/74/mojo-parent-74.pom https://repo.maven.apache.org/maven2/org/codehaus/mojo/mojo-parent/84/mojo-parent-84.pom
https://repo.maven.apache.org/maven2/org/codehaus/woodstox/stax2-api/4.2.1/stax2-api-4.2.1.pom https://repo.maven.apache.org/maven2/org/codehaus/woodstox/stax2-api/4.2.1/stax2-api-4.2.1.pom
https://repo.maven.apache.org/maven2/org/easymock/easymockclassextension/3.2/easymockclassextension-3.2.pom https://repo.maven.apache.org/maven2/org/easymock/easymockclassextension/3.2/easymockclassextension-3.2.pom
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/3.2/easymock-parent-3.2.pom
https://repo.maven.apache.org/maven2/org/easymock/easymock-parent/5.2.0/easymock-parent-5.2.0.pom https://repo.maven.apache.org/maven2/org/easymock/easymock-parent/5.3.0/easymock-parent-5.3.0.pom
https://repo.maven.apache.org/maven2/org/easymock/easymock/5.2.0/easymock-5.2.0.pom https://repo.maven.apache.org/maven2/org/easymock/easymock/5.3.0/easymock-5.3.0.pom
https://repo.maven.apache.org/maven2/org/eclipse/angus/angus-activation-project/2.0.2/angus-activation-project-2.0.2.pom https://repo.maven.apache.org/maven2/org/eclipse/angus/angus-activation-project/2.0.2/angus-activation-project-2.0.2.pom
https://repo.maven.apache.org/maven2/org/eclipse/angus/angus-activation/2.0.2/angus-activation-2.0.2.pom https://repo.maven.apache.org/maven2/org/eclipse/angus/angus-activation/2.0.2/angus-activation-2.0.2.pom
https://repo.maven.apache.org/maven2/org/eclipse/ee4j/project/1.0.2/project-1.0.2.pom https://repo.maven.apache.org/maven2/org/eclipse/ee4j/project/1.0.2/project-1.0.2.pom
@@ -1146,9 +1133,10 @@ https://repo.maven.apache.org/maven2/org/glassfish/jaxb/txw2/2.3.1/txw2-2.3.1.po
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/txw2/2.3.2/txw2-2.3.2.pom https://repo.maven.apache.org/maven2/org/glassfish/jaxb/txw2/2.3.2/txw2-2.3.2.pom
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/txw2/4.0.5/txw2-4.0.5.pom https://repo.maven.apache.org/maven2/org/glassfish/jaxb/txw2/4.0.5/txw2-4.0.5.pom
https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.pom https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.pom
https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/2.2/hamcrest-core-2.2.pom https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/3.0-rc1/hamcrest-core-3.0-rc1.pom
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-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/hamcrest/hamcrest/2.2/hamcrest-2.2.pom
https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest/3.0-rc1/hamcrest-3.0-rc1.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.7.4.201502262128/org.jacoco.build-0.7.4.201502262128.pom
https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.build/0.8.12/org.jacoco.build-0.8.12.pom https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.build/0.8.12/org.jacoco.build-0.8.12.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.7.4.201502262128/org.jacoco.core-0.7.4.201502262128.pom
@@ -1248,7 +1236,7 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.6.10/
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.6.20/kotlin-reflect-1.6.20.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.6.20/kotlin-reflect-1.6.20.pom
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.7.22/kotlin-reflect-1.7.22.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.7.22/kotlin-reflect-1.7.22.pom
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.8.20-RC2/kotlin-reflect-1.8.20-RC2.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.8.20-RC2/kotlin-reflect-1.8.20-RC2.pom
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/2.0.0/kotlin-reflect-2.0.0.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/2.0.20-Beta2/kotlin-reflect-2.0.20-Beta2.pom
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-scripting-common/1.6.20/kotlin-scripting-common-1.6.20.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-scripting-common/1.6.20/kotlin-scripting-common-1.6.20.pom
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-scripting-common/1.7.22/kotlin-scripting-common-1.7.22.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-scripting-common/1.7.22/kotlin-scripting-common-1.7.22.pom
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-scripting-common/1.8.0/kotlin-scripting-common-1.8.0.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-scripting-common/1.8.0/kotlin-scripting-common-1.8.0.pom
@@ -1353,7 +1341,7 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.8.20-R
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.8.21/kotlin-stdlib-1.8.21.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.8.21/kotlin-stdlib-1.8.21.pom
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.9.0/kotlin-stdlib-1.9.0.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.9.0/kotlin-stdlib-1.9.0.pom
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.9.21/kotlin-stdlib-1.9.21.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.9.21/kotlin-stdlib-1.9.21.pom
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/2.0.0/kotlin-stdlib-2.0.0.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/2.0.20-Beta2/kotlin-stdlib-2.0.20-Beta2.pom
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-tooling-core/1.7.22/kotlin-tooling-core-1.7.22.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-tooling-core/1.7.22/kotlin-tooling-core-1.7.22.pom
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-tooling-core/1.8.0/kotlin-tooling-core-1.8.0.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-tooling-core/1.8.0/kotlin-tooling-core-1.8.0.pom
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-tooling-core/1.9.0/kotlin-tooling-core-1.9.0.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-tooling-core/1.9.0/kotlin-tooling-core-1.9.0.pom
@@ -1372,6 +1360,7 @@ https://repo.maven.apache.org/maven2/org/jetbrains/trove4j/trove4j/20160824/trov
https://repo.maven.apache.org/maven2/org/json/json/20180813/json-20180813.pom https://repo.maven.apache.org/maven2/org/json/json/20180813/json-20180813.pom
https://repo.maven.apache.org/maven2/org/json/json/20240303/json-20240303.pom https://repo.maven.apache.org/maven2/org/json/json/20240303/json-20240303.pom
https://repo.maven.apache.org/maven2/org/jsoup/jsoup/1.13.1/jsoup-1.13.1.pom https://repo.maven.apache.org/maven2/org/jsoup/jsoup/1.13.1/jsoup-1.13.1.pom
https://repo.maven.apache.org/maven2/org/jspecify/jspecify/1.0.0/jspecify-1.0.0.pom
https://repo.maven.apache.org/maven2/org/junit/junit-bom/5.11.0-M2/junit-bom-5.11.0-M2.pom https://repo.maven.apache.org/maven2/org/junit/junit-bom/5.11.0-M2/junit-bom-5.11.0-M2.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.7.7/stax-ex-1.7.7.pom
https://repo.maven.apache.org/maven2/org/jvnet/staxex/stax-ex/1.8.1/stax-ex-1.8.1.pom https://repo.maven.apache.org/maven2/org/jvnet/staxex/stax-ex/1.8.1/stax-ex-1.8.1.pom
@@ -1383,8 +1372,10 @@ https://repo.maven.apache.org/maven2/org/mockito/mockito-core/5.12.0/mockito-cor
https://repo.maven.apache.org/maven2/org/mockito/mockito-inline/4.0.0/mockito-inline-4.0.0.pom https://repo.maven.apache.org/maven2/org/mockito/mockito-inline/4.0.0/mockito-inline-4.0.0.pom
https://repo.maven.apache.org/maven2/org/objenesis/objenesis-parent/3.2/objenesis-parent-3.2.pom https://repo.maven.apache.org/maven2/org/objenesis/objenesis-parent/3.2/objenesis-parent-3.2.pom
https://repo.maven.apache.org/maven2/org/objenesis/objenesis-parent/3.3/objenesis-parent-3.3.pom https://repo.maven.apache.org/maven2/org/objenesis/objenesis-parent/3.3/objenesis-parent-3.3.pom
https://repo.maven.apache.org/maven2/org/objenesis/objenesis-parent/3.4/objenesis-parent-3.4.pom
https://repo.maven.apache.org/maven2/org/objenesis/objenesis/3.2/objenesis-3.2.pom https://repo.maven.apache.org/maven2/org/objenesis/objenesis/3.2/objenesis-3.2.pom
https://repo.maven.apache.org/maven2/org/objenesis/objenesis/3.3/objenesis-3.3.pom https://repo.maven.apache.org/maven2/org/objenesis/objenesis/3.3/objenesis-3.3.pom
https://repo.maven.apache.org/maven2/org/objenesis/objenesis/3.4/objenesis-3.4.pom
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/5.0.3/asm-analysis-5.0.3.pom https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/5.0.3/asm-analysis-5.0.3.pom
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/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/6.0/asm-analysis-6.0.pom
+4 -2
View File
@@ -17,11 +17,12 @@
hermesEnabled ? lib.getEnvWithDefault "ORG_GRADLE_PROJECT_hermesEnabled" "true", hermesEnabled ? lib.getEnvWithDefault "ORG_GRADLE_PROJECT_hermesEnabled" "true",
buildUrl ? lib.getEnvWithDefault "ORG_GRADLE_PROJECT_buildUrl" null, buildUrl ? lib.getEnvWithDefault "ORG_GRADLE_PROJECT_buildUrl" null,
statusGoSrcOverride ? lib.getEnvWithDefault "STATUS_GO_SRC_OVERRIDE" null, statusGoSrcOverride ? lib.getEnvWithDefault "STATUS_GO_SRC_OVERRIDE" null,
reactMetroPort ? lib.getEnvWithDefault "RCT_METRO_PORT" 8081,
# If APKs should be split based on architectures # If APKs should be split based on architectures
androidAbiSplit ? lib.getEnvWithDefault "ANDROID_ABI_SPLIT" "false", androidAbiSplit ? lib.getEnvWithDefault "ANDROID_ABI_SPLIT" "true",
# Android architectures to build for # Android architectures to build for
# Used to detect end-to-end builds # Used to detect end-to-end builds
androidAbiInclude ? lib.getEnvWithDefault "ANDROID_ABI_INCLUDE" "armeabi-v7a;arm64-v8a;x86", androidAbiInclude ? lib.getEnvWithDefault "ANDROID_ABI_INCLUDE" "arm64-v8a",
}: }:
let let
@@ -158,6 +159,7 @@ in stdenv.mkDerivation rec {
--no-build-cache \ --no-build-cache \
--parallel \ --parallel \
-Dmaven.repo.local='${deps.gradle}' \ -Dmaven.repo.local='${deps.gradle}' \
-PreactNativeDevServerPort=${toString reactMetroPort} \
assemble${gradleBuildType} assemble${gradleBuildType}
''; '';
in in
+1 -1
View File
@@ -41,7 +41,7 @@
"react-native-background-timer": "^2.1.1", "react-native-background-timer": "^2.1.1",
"react-native-biometrics": "^3.0.1", "react-native-biometrics": "^3.0.1",
"react-native-blob-util": "^0.13.18", "react-native-blob-util": "^0.13.18",
"react-native-camera-kit": "14.0.0-beta13", "react-native-camera-kit": "git+https://github.com/status-im/react-native-camera-kit.git#refs/tags/v14.0.0-beta15-status-v1",
"react-native-config": "^1.5.0", "react-native-config": "^1.5.0",
"react-native-dialogs": "1.1.2", "react-native-dialogs": "1.1.2",
"react-native-draggable-flatlist": "4.0.1", "react-native-draggable-flatlist": "4.0.1",
Binary file not shown.

After

Width:  |  Height:  |  Size: 424 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 752 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

+1 -1
View File
@@ -6,7 +6,7 @@ if pgrep -f 'shadow-cljs watch mobile' > /dev/null; then
exit 1 exit 1
fi fi
if pgrep -f 'react-native start' > /dev/null; then if pgrep -f "react-native start --port=${RCT_METRO_PORT:-8081}" > /dev/null; then
echo "Error: make run-metro is already running in another terminal" >&2 echo "Error: make run-metro is already running in another terminal" >&2
echo "Please close that terminal before running this command." >&2 echo "Please close that terminal before running this command." >&2
exit 1 exit 1
+1 -1
View File
@@ -13,7 +13,7 @@ export BUILD_TYPE=debug
# Install the APK on running emulator or android device. # Install the APK on running emulator or android device.
installAndLaunchApp() { installAndLaunchApp() {
adb install -r ./result/app-debug.apk > "${ADB_INSTALL_LOG_FILE}" 2>&1 adb install -r ./result/app-arm64-v8a-debug.apk > "${ADB_INSTALL_LOG_FILE}" 2>&1
"${GIT_ROOT}/scripts/wait-for-metro-port.sh" 2>&1 "${GIT_ROOT}/scripts/wait-for-metro-port.sh" 2>&1
# connected android devices need this port to be exposed for metro # connected android devices need this port to be exposed for metro
adb reverse "tcp:${RCT_METRO_PORT}" "tcp:${RCT_METRO_PORT}" adb reverse "tcp:${RCT_METRO_PORT}" "tcp:${RCT_METRO_PORT}"
+2 -2
View File
@@ -1,8 +1,8 @@
#!/usr/bin/env bash #!/usr/bin/env bash
if pgrep -f 'react-native start' > /dev/null; then if pgrep -f "react-native start --port=${RCT_METRO_PORT:-8081}" > /dev/null; then
echo "Info: metro is already running in another terminal" echo "Info: metro is already running in another terminal"
else else
echo "Info: starting a new metro terminal" echo "Info: starting a new metro terminal"
react-native start --reset-cache react-native start --port=${RCT_METRO_PORT:-8081} --reset-cache
fi fi
+1 -1
View File
@@ -4,7 +4,7 @@ set -euo pipefail
TIMEOUT=10 # Metro should not take this long to start. TIMEOUT=10 # Metro should not take this long to start.
while [ "${TIMEOUT}" -gt 0 ]; do while [ "${TIMEOUT}" -gt 0 ]; do
if ! lsof -i:8081 &> /dev/null; then if ! lsof -i:"${RCT_METRO_PORT:-8081}" &> /dev/null; then
echo "." echo "."
sleep 1 sleep 1
((TIMEOUT--)) ((TIMEOUT--))
+4
View File
@@ -67,6 +67,8 @@
:closure-defines :closure-defines
{status-im.config/POKT_TOKEN #shadow/env "POKT_TOKEN" {status-im.config/POKT_TOKEN #shadow/env "POKT_TOKEN"
status-im.config/INFURA_TOKEN #shadow/env "INFURA_TOKEN" status-im.config/INFURA_TOKEN #shadow/env "INFURA_TOKEN"
status-im.config/STATUS_BUILD_PROXY_USER #shadow/env "STATUS_BUILD_PROXY_USER"
status-im.config/STATUS_BUILD_PROXY_PASSWORD #shadow/env "STATUS_BUILD_PROXY_PASSWORD"
status-im.config/MIXPANEL_APP_ID #shadow/env "MIXPANEL_APP_ID" status-im.config/MIXPANEL_APP_ID #shadow/env "MIXPANEL_APP_ID"
status-im.config/MIXPANEL_TOKEN #shadow/env "MIXPANEL_TOKEN" status-im.config/MIXPANEL_TOKEN #shadow/env "MIXPANEL_TOKEN"
status-im.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY" status-im.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"
@@ -103,6 +105,8 @@
{:closure-defines {:closure-defines
{status-im.config/POKT_TOKEN #shadow/env "POKT_TOKEN" {status-im.config/POKT_TOKEN #shadow/env "POKT_TOKEN"
status-im.config/INFURA_TOKEN #shadow/env "INFURA_TOKEN" status-im.config/INFURA_TOKEN #shadow/env "INFURA_TOKEN"
status-im.config/STATUS_BUILD_PROXY_USER #shadow/env "STATUS_BUILD_PROXY_USER"
status-im.config/STATUS_BUILD_PROXY_PASSWORD #shadow/env "STATUS_BUILD_PROXY_PASSWORD"
status-im.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY" status-im.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"
status-im.config/MIXPANEL_APP_ID #shadow/env "MIXPANEL_APP_ID" status-im.config/MIXPANEL_APP_ID #shadow/env "MIXPANEL_APP_ID"
status-im.config/MIXPANEL_TOKEN #shadow/env "MIXPANEL_TOKEN" status-im.config/MIXPANEL_TOKEN #shadow/env "MIXPANEL_TOKEN"
@@ -1,8 +1,8 @@
(ns legacy.status-im.data-store.communities (ns legacy.status-im.data-store.communities
(:require (:require
[clojure.set :as set] [clojure.set :as set]
[clojure.walk :as walk] [status-im.constants :as constants]
[status-im.constants :as constants])) [utils.transforms :as transforms]))
(defn <-revealed-accounts-rpc (defn <-revealed-accounts-rpc
[accounts] [accounts]
@@ -22,19 +22,26 @@
(reduce #(assoc %1 (key-fn %2) (<-request-to-join-community-rpc %2)) {} requests)) (reduce #(assoc %1 (key-fn %2) (<-request-to-join-community-rpc %2)) {} requests))
(defn <-chats-rpc (defn <-chats-rpc
[chats] "This transformation from RPC is optimized differently because there can be
(reduce-kv (fn [acc k v] thousands of members in all chats and we don't want to transform them from JS
(assoc acc to CLJS because they will only be used to list community members or community
(name k) chat members."
(-> v [chats-js]
(assoc :token-gated? (:tokenGated v) (let [chat-key-fn (fn [k]
:can-post? (:canPost v) (case k
:can-view? (:canView v) "tokenGated" :token-gated?
:hide-if-permissions-not-met? (:hideIfPermissionsNotMet v)) "canPost" :can-post?
(dissoc :canPost :tokenGated :canView :hideIfPermissionsNotMet) "can-view" :can-view?
(update :members walk/stringify-keys)))) "hideIfPermissionsNotMet" :hide-if-permissions-not-met?
{} (keyword k)))
chats)) chat-val-fn (fn [k v]
(if (= "members" k)
v
(transforms/js->clj v)))]
(transforms/<-js-map
chats-js
{:val-fn (fn [_ v]
(transforms/<-js-map v {:key-fn chat-key-fn :val-fn chat-val-fn}))})))
(defn <-categories-rpc (defn <-categories-rpc
[categ] [categ]
@@ -48,49 +55,59 @@
[token-permission] [token-permission]
(= (:type token-permission) constants/community-token-permission-become-member)) (= (:type token-permission) constants/community-token-permission-become-member))
(defn- rename-community-key
[k]
(case k
"canRequestAccess" :can-request-access?
"canManageUsers" :can-manage-users?
"canDeleteMessageForEveryone" :can-delete-message-for-everyone?
;; This flag is misleading based on its name alone
;; because it should not be used to decide if the user
;; is *allowed* to join. Allowance is based on token
;; permissions. Still, the flag can be used to know
;; whether or not the user will have to wait until an
;; admin approves a join request.
"canJoin" :can-join?
"requestedToJoinAt" :requested-to-join-at
"isMember" :is-member?
"outroMessage" :outro-message
"adminSettings" :admin-settings
"tokenPermissions" :token-permissions
"communityTokensMetadata" :tokens-metadata
"introMessage" :intro-message
"muteTill" :muted-till
"lastOpenedAt" :last-opened-at
"joinedAt" :joined-at
(keyword k)))
(defn <-rpc (defn <-rpc
[c] [c-js]
(-> c (let [community (transforms/<-js-map
(set/rename-keys c-js
{:canRequestAccess :can-request-access? {:key-fn rename-community-key
:canManageUsers :can-manage-users? :val-fn (fn [k v]
:canDeleteMessageForEveryone :can-delete-message-for-everyone? (case k
;; This flag is misleading based on its name alone "members" v
;; because it should not be used to decide if the user "chats" (<-chats-rpc v)
;; is *allowed* to join. Allowance is based on token (transforms/js->clj v)))})]
;; permissions. Still, the flag can be used to know (-> community
;; whether or not the user will have to wait until an (update :admin-settings
;; admin approves a join request. set/rename-keys
:canJoin :can-join? {:pinMessageAllMembersEnabled :pin-message-all-members-enabled?})
:requestedToJoinAt :requested-to-join-at (update :token-permissions seq)
:isMember :is-member? (update :categories <-categories-rpc)
:outroMessage :outro-message (assoc :role-permissions?
:adminSettings :admin-settings (->> community
:tokenPermissions :token-permissions :token-permissions
:communityTokensMetadata :tokens-metadata vals
:introMessage :intro-message (some role-permission?)))
:muteTill :muted-till (assoc :membership-permissions?
:lastOpenedAt :last-opened-at (->> community
:joinedAt :joined-at}) :token-permissions
(update :admin-settings vals
set/rename-keys (some membership-permission?)))
{:pinMessageAllMembersEnabled :pin-message-all-members-enabled?}) (assoc :token-images
(update :members walk/stringify-keys) (reduce (fn [acc {sym :symbol image :image}]
(update :chats <-chats-rpc) (assoc acc sym image))
(update :token-permissions seq) {}
(update :categories <-categories-rpc) (:tokens-metadata community))))))
(assoc :role-permissions?
(->> c
:tokenPermissions
vals
(some role-permission?)))
(assoc :membership-permissions?
(->> c
:tokenPermissions
vals
(some membership-permission?)))
(assoc :token-images
(reduce (fn [acc {sym :symbol image :image}]
(assoc acc sym image))
{}
(:communityTokensMetadata c)))))
+1 -6
View File
@@ -11,9 +11,6 @@
legacy.status-im.fleet.core legacy.status-im.fleet.core
legacy.status-im.group-chats.core legacy.status-im.group-chats.core
legacy.status-im.log-level.core legacy.status-im.log-level.core
legacy.status-im.mailserver.constants
[legacy.status-im.mailserver.core :as mailserver]
legacy.status-im.mobile-sync-settings.core
legacy.status-im.multiaccounts.login.core legacy.status-im.multiaccounts.login.core
legacy.status-im.multiaccounts.logout.core legacy.status-im.multiaccounts.logout.core
[legacy.status-im.multiaccounts.model :as multiaccounts.model] [legacy.status-im.multiaccounts.model :as multiaccounts.model]
@@ -105,8 +102,7 @@
(let [current-theme-type (get-in cofx [:db :profile/profile :appearance])] (let [current-theme-type (get-in cofx [:db :profile/profile :appearance])]
(when (and (multiaccounts.model/logged-in? db) (when (and (multiaccounts.model/logged-in? db)
(= current-theme-type status-im.constants/theme-type-system)) (= current-theme-type status-im.constants/theme-type-system))
{:profile.settings/switch-theme-fx {:dispatch [:theme/switch]})))
[(get-in db [:profile/profile :appearance]) (:view-id db)]})))
(defn- on-biometric-auth-fail (defn- on-biometric-auth-fail
[{:keys [code]}] [{:keys [code]}]
@@ -134,7 +130,6 @@
(rf/merge cofx (rf/merge cofx
{:db (dissoc db :app-in-background-since) {:db (dissoc db :app-in-background-since)
:effects.biometric/get-supported-type nil} :effects.biometric/get-supported-type nil}
(mailserver/process-next-messages-request)
(when-not new-account? (when-not new-account?
(universal-links/process-stored-event)) (universal-links/process-stored-event))
#(when-let [chat-id (:current-chat-id db)] #(when-let [chat-id (:current-chat-id db)]
-437
View File
@@ -1,437 +0,0 @@
(ns ^{:doc "Mailserver events and API"} legacy.status-im.mailserver.core
(:require
[clojure.string :as string]
[legacy.status-im.multiaccounts.update.core :as multiaccounts.update]
[legacy.status-im.node.core :as node]
[legacy.status-im.utils.mobile-sync :as mobile-network-utils]
[re-frame.core :as re-frame]
[status-im.common.json-rpc.events :as json-rpc]
[status-im.navigation.events :as navigation]
[taoensso.timbre :as log]
[utils.i18n :as i18n]
[utils.re-frame :as rf]))
;; How do mailserver work ?
;;
;; - We send a request to the mailserver, we are only interested in the
;; messages since `last-request` up to the last seven days
;; and the last 24 hours for topics that were just joined
;; - The mailserver doesn't directly respond to the request and
;; instead we start receiving messages in the filters for the requested
;; topics.
;; - If the mailserver was not ready when we tried for instance to request
;; the history of a topic after joining a chat, the request will be done
;; as soon as the mailserver becomes available
(defn connected?
[db id]
(= (:mailserver/current-id db) id))
(defn fetch
[db id]
(get-in db [:mailserver/mailservers (node/current-fleet-key db) id]))
(defn fetch-current
[db]
(fetch db (:mailserver/current-id db)))
(defn preferred-mailserver-id
[db]
(get-in db [:profile/profile :pinned-mailservers (node/current-fleet-key db)]))
(defn connection-error-dismissed
[db]
(get-in db [:mailserver/connection-error-dismissed]))
(defn mailserver-address->id
[db address]
(let [current-fleet (node/current-fleet-key db)]
(:id (some #(when (= address (:address %))
%)
(-> db
:mailserver/mailservers
current-fleet
vals)))))
(rf/defn disconnect-from-mailserver
{:events [::disconnect-from-mailserver]}
[{:keys [db] :as cofx}]
{:db (-> db
(assoc :mailserver/state nil)
(dissoc :mailserver/current-request :mailserver/fetching-gaps-in-progress))})
(defn fetch-use-mailservers?
[db]
(get-in db [:profile/profile :use-mailservers?]))
(defonce showing-connection-error-popup? (atom false))
(defn cancel-connection-popup!
[]
(reset! showing-connection-error-popup? false)
(re-frame/dispatch [:mailserver.ui/dismiss-connection-error true]))
(re-frame/reg-fx
::cancel-connection-popup
cancel-connection-popup!)
(rf/defn show-connection-error!
[cofx current-fleet preferred-mailserver]
(reset! showing-connection-error-popup? true)
{:ui/show-confirmation
{:title (i18n/label :t/mailserver-error-title)
:content (i18n/label :t/mailserver-error-content)
:confirm-button-text (i18n/label :t/mailserver-pick-another)
:on-cancel cancel-connection-popup!
:on-accept #(do
(reset! showing-connection-error-popup? false)
(re-frame/dispatch [:mailserver.ui/dismiss-connection-error true])
(re-frame/dispatch [:navigate-to :offline-messaging-settings]))
:extra-options [{:text (i18n/label :t/mailserver-retry)
:onPress #(do
(reset! showing-connection-error-popup? false)
(re-frame/dispatch
[:mailserver.ui/connect-confirmed
current-fleet
preferred-mailserver]))
:style "default"}]}})
(rf/defn handle-successful-request
{:events [::request-success]}
[{:keys [db] :as cofx} response-js]
{:db (dissoc db :mailserver/current-request)
:dispatch [:sanitize-messages-and-process-response response-js]})
(rf/defn handle-mailserver-not-working
[{:keys [db] :as cofx}]
(let [current-fleet (node/current-fleet-key db)
error-dismissed? (connection-error-dismissed db)
pinned-mailserver (get-in db [:profile/profile :pinned-mailservers current-fleet])]
(when (and pinned-mailserver
(not error-dismissed?)
(not @showing-connection-error-popup?))
(show-connection-error! cofx current-fleet pinned-mailserver))))
(rf/defn handle-request-error
{:events [::request-error]}
[{:keys [db] :as cofx}]
{:db (dissoc db :mailserver/current-request)})
(defn needs-to-fetch-historic-messages?
[db]
(and
(:messenger/started? db)
(mobile-network-utils/syncing-allowed? db)
(fetch-use-mailservers? db)
(not (:mailserver/current-request db))))
(rf/defn process-next-messages-request
{:events [::request-messages]}
[{:keys [db]}]
(when (needs-to-fetch-historic-messages? db)
{:db (assoc db :mailserver/current-request true)
:mailserver/request-all-historic-messages nil}))
(re-frame/reg-fx :mailserver/request-all-historic-messages
(fn []
(json-rpc/call {:method "wakuext_requestAllHistoricMessagesWithRetries"
:params [false]
:js-response true
:on-success #(do
(log/info "fetched historical messages")
(re-frame/dispatch [::request-success %]))
:on-error #(do
(log/error "failed retrieve historical messages" %)
(re-frame/dispatch [::request-error]))})))
(rf/defn handle-mailserver-changed
[{:keys [db] :as cofx} ms]
(if (seq ms)
{:db (assoc db
:mailserver/state :connecting
:mailserver/current-id (keyword ms))}
{:db (assoc db :mailserver/state nil)}))
(rf/defn handle-mailserver-available
[{:keys [db] :as cofx} ms]
{::cancel-connection-popup []
:db (assoc db
:mailserver/state :connected
:mailserver/current-id (keyword ms))})
(rf/defn connected-to-mailserver
[{:keys [db] :as cofx}]
(let [{:keys [address]} (fetch-current db)]
(rf/merge
cofx
{:mailserver/update-mailservers [[address] #(re-frame/dispatch [::request-messages])]})))
(rf/defn handle-request-success
{:events [:mailserver.callback/request-success]}
[{{:keys [chats] :as db} :db} {:keys [request-id topics]}]
(when (:mailserver/current-request db)
{:db (assoc-in db
[:mailserver/current-request :request-id]
request-id)}))
(rf/defn toggle-use-mailservers
[cofx value]
{:json-rpc/call
[{:method "wakuext_toggleUseMailservers"
:params [value]
:on-success #(log/info "successfully toggled use-mailservers" value)
:on-failure #(log/error "failed to toggle use-mailserver" value %)}]})
(rf/defn update-use-mailservers
{:events [:mailserver.ui/use-history-switch-pressed]}
[cofx use-mailservers?]
(rf/merge cofx
(multiaccounts.update/optimistic :use-mailservers? use-mailservers?)
(toggle-use-mailservers use-mailservers?)
(when use-mailservers?
(disconnect-from-mailserver))))
(rf/defn retry-next-messages-request
{:events [:mailserver.ui/retry-request-pressed]}
[{:keys [db] :as cofx}]
(rf/merge cofx
{:db (dissoc db :mailserver/request-error)}
(process-next-messages-request)))
(rf/defn show-request-error-popup
{:events [:mailserver.ui/request-error-pressed]}
[{:keys [db]}]
(let [mailserver-error (:mailserver/request-error db)]
{:effects.utils/show-confirmation
{:title (i18n/label :t/mailserver-request-error-title)
:content (i18n/label :t/mailserver-request-error-content
{:error mailserver-error})
:on-accept #(re-frame/dispatch [:mailserver.ui/retry-request-pressed])
:confirm-button-text (i18n/label :t/mailserver-request-retry)}}))
(def enode-url-regex
#"enode://[a-zA-Z0-9]+\@\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b:(\d{1,5})")
(defn- extract-url-components
[address]
(rest (re-matches #"enode://(.*)@(.*)" address)))
(defn valid-enode-url?
[address]
(re-matches enode-url-regex address))
(defn build-url
[address]
(let [[initial host] (extract-url-components address)]
(str "enode://" initial "@" host)))
(rf/defn set-input
{:events [:mailserver.ui/input-changed]}
[{:keys [db]} input-key value]
{:db (update
db
:mailserver.edit/mailserver
assoc
input-key
{:value value
:error (case input-key
:id false
:name (string/blank? value)
:url (not (valid-enode-url? value)))})})
(defn- address->mailserver
[address]
(let [[enode url :as response] (extract-url-components address)]
{:address (if (seq response)
(str "enode://" enode "@" url)
address)
:custom true}))
(defn- build
[id mailserver-name address]
(assoc (address->mailserver address)
:id id
:name mailserver-name))
(def default? (comp not :custom fetch))
(rf/defn edit
{:events [:mailserver.ui/custom-mailserver-selected]}
[{:keys [db] :as cofx} id]
(let [{:keys [id address name]} (fetch db id)
url (when address (build-url address))]
(rf/merge cofx
(set-input :id id)
(set-input :url (str url))
(set-input :name (str name))
(navigation/navigate-to :edit-mailserver nil))))
(defn mailserver->rpc
[mailserver current-fleet]
(-> mailserver
(assoc :fleet (name current-fleet))
(update :id name)))
(rf/defn upsert
{:events [:mailserver.ui/save-pressed]
:interceptors [(re-frame/inject-cofx :random-id-generator)]}
[{{:mailserver.edit/keys [mailserver] :profile/keys [profile] :as db} :db
random-id-generator :random-id-generator
:as cofx}]
(let [{:keys [name url id]} mailserver
current-fleet (node/current-fleet-key db)]
(when (and (not (string/blank? (:value name)))
(valid-enode-url? (:value url)))
(let [mailserver (build
(or (:value id)
(keyword (string/replace (random-id-generator) "-" "")))
(:value name)
(:value url))
current (connected? db (:id mailserver))]
{:db (-> db
(dissoc :mailserver.edit/mailserver)
(assoc-in [:mailserver/mailservers current-fleet (:id mailserver)]
mailserver))
:json-rpc/call
[{:method "mailservers_addMailserver"
:params [(mailserver->rpc mailserver current-fleet)]
:on-success (fn []
;; we naively logout if the user is connected to the edited mailserver
(when current
(re-frame/dispatch
[:multiaccounts.logout.ui/logout-confirmed]))
(log/debug "saved mailserver" id "successfuly"))
:on-failure #(log/error "failed to save mailserver" id %)}]
:dispatch [:navigate-back]}))))
(defn can-delete?
[db id]
(not (or (default? db id)
(connected? db id))))
(rf/defn delete
{:events [:mailserver.ui/delete-confirmed]}
[{:keys [db] :as cofx} id]
(if (can-delete? db id)
{:db (-> db
(update-in
[:mailserver/mailservers (node/current-fleet-key db)]
dissoc
id)
(dissoc :mailserver.edit/mailserver))
:json-rpc/call
[{:method "mailservers_deleteMailserver"
:params [(name id)]
:on-success #(log/debug "deleted mailserver" id)
:on-failure #(log/error "failed to delete mailserver" id %)}]
:dispatch [:navigate-back]}
{:dispatch [:navigate-back]}))
(rf/defn show-connection-confirmation
{:events [:mailserver.ui/default-mailserver-selected :mailserver.ui/connect-pressed]}
[{:keys [db]} mailserver-id]
(let [current-fleet (node/current-fleet-key db)]
{:ui/show-confirmation
{:title (i18n/label :t/close-app-title)
:content
(i18n/label :t/connect-mailserver-content
{:name (get-in db
[:mailserver/mailservers
current-fleet mailserver-id :name])})
:confirm-button-text (i18n/label :t/close-app-button)
:on-accept
#(re-frame/dispatch
[:mailserver.ui/connect-confirmed current-fleet mailserver-id])
:on-cancel nil}}))
(rf/defn show-delete-confirmation
{:events [:mailserver.ui/delete-pressed]}
[{:keys [db]} mailserver-id]
{:ui/show-confirmation
{:title (i18n/label :t/delete-mailserver-title)
:content (i18n/label :t/delete-mailserver-are-you-sure)
:confirm-button-text (i18n/label :t/delete-mailserver)
:on-accept #(re-frame/dispatch
[:mailserver.ui/delete-confirmed mailserver-id])}})
(rf/defn set-url-from-qr
{:events [:mailserver.callback/qr-code-scanned]}
[cofx url]
(assoc (set-input cofx :url url)
:dispatch
[:navigate-back]))
(rf/defn dismiss-connection-error
{:events [:mailserver.ui/dismiss-connection-error]}
[{:keys [db]} new-state]
{:db (assoc db :mailserver/connection-error-dismissed new-state)})
(rf/defn pin-mailserver
{:events [:mailserver.ui/connect-confirmed]}
[{:keys [db] :as cofx} current-fleet mailserver-id]
(let [pinned-mailservers (-> db
(get-in [:profile/profile :pinned-mailservers])
(assoc current-fleet mailserver-id))]
(rf/merge cofx
{:db (assoc db :mailserver/current-id mailserver-id)
:json-rpc/call [{:method "wakuext_setPinnedMailservers"
:params [pinned-mailservers]
:on-success #(log/info "successfully pinned mailserver")
:on-error #(log/error "failed to pin mailserver" %)}]}
(multiaccounts.update/optimistic :pinned-mailservers pinned-mailservers))))
(rf/defn unpin
{:events [:mailserver.ui/unpin-pressed]}
[{:keys [db] :as cofx}]
(let [current-fleet (node/current-fleet-key db)
pinned-mailservers (-> db
(get-in [:profile/profile :pinned-mailservers])
(dissoc current-fleet))]
(rf/merge cofx
{:json-rpc/call [{:method "wakuext_setPinnedMailservers"
:params [pinned-mailservers]
:on-success #(log/info "successfully unpinned mailserver")
:on-error #(log/error "failed to unpin mailserver" %)}]}
(multiaccounts.update/optimistic
:pinned-mailservers
pinned-mailservers)
(dismiss-connection-error false))))
(rf/defn pin
{:events [:mailserver.ui/pin-pressed]}
[{:keys [db] :as cofx}]
(let [current-fleet (node/current-fleet-key db)
mailserver-id (:mailserver/current-id db)
pinned-mailservers (get-in db [:profile/profile :pinned-mailservers])]
(rf/merge cofx
(multiaccounts.update/multiaccount-update
:pinned-mailservers
(assoc pinned-mailservers
current-fleet
mailserver-id)
{})
(dismiss-connection-error false))))
(rf/defn mailserver-ui-add-pressed
{:events [:mailserver.ui/add-pressed]}
[{:keys [db] :as cofx}]
(rf/merge cofx
{:db (dissoc db :mailserver.edit/mailserver)}
(navigation/navigate-to :edit-mailserver nil)))
(defn add-mailservers
[db mailservers]
(reduce (fn [db {:keys [fleet id name] :as mailserver}]
(let [updated-mailserver
(-> mailserver
(update :id keyword)
(assoc :name (if (seq name) name id))
(dissoc :fleet))]
(assoc-in db
[:mailserver/mailservers (keyword fleet) (keyword id)]
updated-mailserver)))
db
mailservers))
@@ -1,109 +0,0 @@
(ns legacy.status-im.mobile-sync-settings.core
(:require
[legacy.status-im.mailserver.core :as mailserver]
[legacy.status-im.multiaccounts.model :as multiaccounts.model]
[legacy.status-im.multiaccounts.update.core :as multiaccounts.update]
[legacy.status-im.utils.mobile-sync :as utils]
[re-frame.core :as re-frame]
[status-im.navigation.events :as navigation]
[taoensso.timbre :as log]
[utils.re-frame :as rf]))
(rf/defn sheet-defaults
[{:keys [db]}]
(let [remember-choice? (get-in db [:profile/profile :remember-syncing-choice?])]
{:db (assoc db
:mobile-network/remember-choice?
(or (nil? remember-choice?)
remember-choice?))}))
(re-frame/reg-event-fx :mobile-network/on-network-status-change
(fn [{:keys [db]}]
(let [previously-initialized? (get db :network-status/initialized?)
logged-in? (multiaccounts.model/logged-in? db)
fetch-historic-messages? (mailserver/needs-to-fetch-historic-messages? db)]
(if logged-in?
{:db (cond-> (-> db
(assoc :network-status/initialized? true)
(assoc :bottom-sheet/show? false))
fetch-historic-messages?
(assoc :mailserver/current-request true))
:fx [(when fetch-historic-messages?
[:mailserver/request-all-historic-messages])
[:dispatch [:hide-bottom-sheet]]
(when previously-initialized?
(let [new-identity-input (get-in db [:contacts/new-identity :input])]
[:dispatch [:contacts/set-new-identity {:input new-identity-input}]]))]}
{:db (assoc db :network-status/initialized? true)}))))
(defn apply-settings
([sync?] (apply-settings sync? :default))
([sync? remember?]
(fn [{:keys [db] :as cofx}]
(let [network (:network/type db)
remember-choice?
(if (not= :default remember?)
remember?
(:mobile-network/remember-choice? db))
cellular? (utils/cellular? network)]
(log/info "apply mobile network settings"
"sunc?" sync?
"remember?" remember?
"cellular?" cellular?)
(rf/merge
cofx
(multiaccounts.update/multiaccount-update
:syncing-on-mobile-network?
(boolean sync?)
{})
(multiaccounts.update/multiaccount-update
:remember-syncing-choice?
(boolean remember-choice?)
{})
(when (and cellular? sync?)
(mailserver/process-next-messages-request)))))))
(rf/defn mobile-network-continue-syncing
{:events [:mobile-network/continue-syncing]}
[cofx]
((apply-settings true) cofx))
(rf/defn mobile-network-stop-syncing
{:events [:mobile-network/stop-syncing]}
[cofx]
((apply-settings false) cofx))
(rf/defn mobile-network-set-syncing
{:events [:mobile-network/set-syncing]}
[{:keys [db] :as cofx} syncing?]
(let [{:keys [remember-syncing-choice?]} (:profile/profile db)]
((apply-settings syncing? remember-syncing-choice?) cofx)))
(rf/defn mobile-network-ask-on-mobile-network?
{:events [:mobile-network/ask-on-mobile-network?]}
[{:keys [db] :as cofx} ask?]
(let [{:keys [syncing-on-mobile-network?]} (:profile/profile db)]
((apply-settings syncing-on-mobile-network? (not ask?)) cofx)))
(rf/defn mobile-network-restore-defaults
{:events [:mobile-network/restore-defaults]}
[cofx]
((apply-settings false false) cofx))
(rf/defn mobile-network-remember-choice?
{:events [:mobile-network/remember-choice?]}
[{:keys [db]} remember-choice?]
{:db (assoc db :mobile-network/remember-choice? remember-choice?)})
(rf/defn mobile-network-navigate-to-settings
{:events [:mobile-network/navigate-to-settings]}
[cofx]
(rf/merge
cofx
(navigation/hide-bottom-sheet)
(navigation/navigate-to :mobile-network-settings nil)))
(rf/defn mobile-network-show-offline-sheet
{:events [:mobile-network/show-offline-sheet]}
[cofx]
(navigation/hide-bottom-sheet cofx))
@@ -14,10 +14,12 @@
(rf/defn initialize-app-db (rf/defn initialize-app-db
[{{:keys [keycard initials-avatar-font-file biometrics] [{{:keys [keycard initials-avatar-font-file biometrics]
:network/keys [type]} :network/keys [type status expensive?]}
:db}] :db}]
{:db (assoc db/app-db {:db (assoc db/app-db
:network/type type :network/type type
:network/status status
:network/expensive? expensive?
:initials-avatar-font-file initials-avatar-font-file :initials-avatar-font-file initials-avatar-font-file
:keycard (dissoc keycard :secrets :pin :application-info) :keycard (dissoc keycard :secrets :pin :application-info)
:biometrics biometrics :biometrics biometrics
@@ -5,6 +5,7 @@
[legacy.status-im.ui.components.list.views :as list] [legacy.status-im.ui.components.list.views :as list]
[quo.core :as quo] [quo.core :as quo]
[re-frame.core :as re-frame] [re-frame.core :as re-frame]
[status-im.feature-flags :as ff]
[utils.i18n :as i18n] [utils.i18n :as i18n]
[utils.re-frame :as rf]) [utils.re-frame :as rf])
(:require-macros [legacy.status-im.utils.views :as views])) (:require-macros [legacy.status-im.utils.views :as views]))
@@ -20,8 +21,6 @@
light-client-enabled? light-client-enabled?
store-confirmations-enabled? store-confirmations-enabled?
current-fleet current-fleet
test-networks-enabled?
is-goerli-enabled?
peer-syncing-enabled?]}] peer-syncing-enabled?]}]
(keep (keep
identity identity
@@ -61,14 +60,14 @@
:on-press :on-press
#(re-frame/dispatch [:open-modal :peers-stats]) #(re-frame/dispatch [:open-modal :peers-stats])
:chevron true} :chevron true}
{:size :small (when (ff/enabled? ::ff/settings.telemetry)
:title "Telemetry" {:size :small
:accessibility-label :telemetry-enabled :title "Telemetry"
:container-margin-bottom 8 :accessibility-label :telemetry-enabled
:on-press :container-margin-bottom 8
#(re-frame/dispatch [:profile.settings/toggle-telemetry]) :on-press #(re-frame/dispatch [:profile.settings/toggle-telemetry])
:accessory :switch :accessory :switch
:active telemetry-enabled?} :active telemetry-enabled?})
{:size :small {:size :small
:title (i18n/label :t/light-client-enabled) :title (i18n/label :t/light-client-enabled)
:accessibility-label :light-client-enabled :accessibility-label :light-client-enabled
@@ -87,22 +86,6 @@
[:wakuv2.ui/toggle-store-confirmations (not store-confirmations-enabled?)]) [:wakuv2.ui/toggle-store-confirmations (not store-confirmations-enabled?)])
:accessory :switch :accessory :switch
:active store-confirmations-enabled?} :active store-confirmations-enabled?}
{:size :small
:title "Testnet mode"
:accessibility-label :test-networks-enabled
:container-margin-bottom 8
:on-press
#(re-frame/dispatch [:profile.settings/toggle-test-networks])
:accessory :switch
:active test-networks-enabled?}
{:size :small
:title "Enable Goerli as test network"
:accessibility-label :enable-sepolia-as-test-network
:container-margin-bottom 8
:on-press
#(re-frame/dispatch [:profile.settings/toggle-goerli-test-network])
:accessory :switch
:active is-goerli-enabled?}
{:size :small {:size :small
:title "Peer syncing" :title "Peer syncing"
:accessibility-label :peer-syncing :accessibility-label :peer-syncing
@@ -124,9 +107,7 @@
(views/defview advanced-settings (views/defview advanced-settings
[] []
(views/letsubs [test-networks-enabled? [:profile/test-networks-enabled?] (views/letsubs [light-client-enabled? [:profile/light-client-enabled?]
is-goerli-enabled? [:profile/is-goerli-enabled?]
light-client-enabled? [:profile/light-client-enabled?]
store-confirmations-enabled? [:profile/store-confirmations-enabled?] store-confirmations-enabled? [:profile/store-confirmations-enabled?]
telemetry-enabled? [:profile/telemetry-enabled?] telemetry-enabled? [:profile/telemetry-enabled?]
current-log-level [:log-level/current-log-level] current-log-level [:log-level/current-log-level]
@@ -147,8 +128,6 @@
:store-confirmations-enabled? store-confirmations-enabled? :store-confirmations-enabled? store-confirmations-enabled?
:current-fleet current-fleet :current-fleet current-fleet
:dev-mode? false :dev-mode? false
:test-networks-enabled? test-networks-enabled?
:is-goerli-enabled? is-goerli-enabled?
:peer-syncing-enabled? peer-syncing-enabled?}) :peer-syncing-enabled? peer-syncing-enabled?})
:key-fn (fn [_ i] (str i)) :key-fn (fn [_ i] (str i))
:render-fn render-item}]])) :render-fn render-item}]]))
@@ -127,7 +127,7 @@
(when (and can-manage-users? (= constants/community-on-request-access (:access permissions))) (when (and can-manage-users? (= constants/community-on-request-access (:access permissions)))
[requests-to-join community-id]) [requests-to-join community-id])
[rn/flat-list [rn/flat-list
{:data (keys sorted-members) {:data sorted-members
:render-data {:community-id community-id :render-data {:community-id community-id
:my-public-key my-public-key :my-public-key my-public-key
:can-kick-users? (and can-manage-users? :can-kick-users? (and can-manage-users?
@@ -1,51 +0,0 @@
(ns legacy.status-im.ui.screens.mobile-network-settings.sheets
(:require-macros [legacy.status-im.utils.views :as views])
(:require [legacy.status-im.ui.components.list.item :as list.item]
[legacy.status-im.ui.components.react :as react]
[legacy.status-im.ui.screens.mobile-network-settings.sheets-styles :as styles]
[re-frame.core :as re-frame]
[utils.i18n :as i18n]))
(defn title
[label]
[react/view {:style styles/title}
[react/text
{:style styles/title-text}
(i18n/label label)]])
(defn details
[label]
[react/view
{:style styles/details}
[react/text
{:style styles/details-text}
(i18n/label label)]])
(defn separator
[]
[react/view {:style styles/separator}])
(defn go-to-settings
[]
[react/view
{:style styles/go-to-settings-container}
[react/text
{:style styles/go-to-settings
:on-press #(re-frame/dispatch [:mobile-network/navigate-to-settings])}
(i18n/label :t/mobile-network-go-to-settings)]])
(views/defview offline-sheet
[]
[react/view {:flex 1}
[react/view {:align-items :center}
[title :t/mobile-network-sheet-offline]
[details :t/mobile-network-sheet-offline-details]]
[list.item/list-item
{:theme :accent
:title (i18n/label :t/mobile-network-start-syncing)
:subtitle (i18n/label :t/mobile-network-continue-syncing-details)
:subtitle-max-lines 2
:icon :main-icons/network
:on-press #(re-frame/dispatch [:mobile-network/continue-syncing])}]
[separator]
[go-to-settings]])
@@ -1,73 +0,0 @@
(ns legacy.status-im.ui.screens.mobile-network-settings.sheets-styles
(:require
[legacy.status-im.ui.components.colors :as colors]))
(def title
{:height 21
:margin-top 8})
(def title-text
{:typography :title-bold})
(def details
{:width 311
:margin-left 32
:margin-right 32
:margin-top 6
:margin-bottom 10})
(def details-text
{:color colors/gray
:text-align :center})
(def separator
{:background-color colors/gray-lighter
:margin-left 72
:align-self :stretch
:height 1
:margin-top 8})
(def checkbox-line-container
{:margin-left 71
:margin-top 13
:height 29
:flex-direction :row
:justify-content :center})
(def checkbox
{:padding 0
:justify-content :center
:align-items :center
:width 18
:height 18
:border-radius 2
:margin-top 6})
(def checkbox-icon
{:tint-color colors/white})
(def checkbox-text-container
{:justify-content :center
:flex 1
:margin-left 13})
(def settings-container
{:margin-left 69
:height 44
:margin-top 6
:align-items :flex-start})
(def settings-text
{:color colors/gray})
(def settings-link
{:color colors/blue})
(def go-to-settings-container
{:height 52
:margin-left 72
:justify-content :center
:align-self :stretch})
(def go-to-settings
{:color colors/blue})
@@ -1,32 +0,0 @@
(ns legacy.status-im.ui.screens.mobile-network-settings.style
(:require
[legacy.status-im.ui.components.colors :as colors]))
(def container
{:flex 1})
(def switch-container
{:height 52})
(def details
{:margin-right 16
:margin-left 16
:margin-top 8
:margin-bottom 16})
(def use-mobile-data-text
{:color colors/gray})
(defn settings-separator
[]
{:align-self :stretch
:height 1
:background-color colors/gray-lighter})
(def defaults-container
{:height 52
:justify-content :center
:padding-left 16})
(def defaults
{:color colors/blue})
@@ -1,57 +0,0 @@
(ns legacy.status-im.ui.screens.mobile-network-settings.view
(:require-macros [legacy.status-im.utils.views :as views])
(:require
legacy.status-im.mobile-sync-settings.core
[legacy.status-im.ui.components.react :as react]
[legacy.status-im.ui.screens.mobile-network-settings.sheets :as sheets]
[legacy.status-im.ui.screens.mobile-network-settings.style :as styles]
[legacy.status-im.ui.screens.profile.components.views :as profile.components]
[re-frame.core :as re-frame]
[utils.i18n :as i18n]))
(defn hide-sheet-and-dispatch
[event]
(re-frame/dispatch [:bottom-sheet/hide-old])
(re-frame/dispatch event))
(defn settings-separator
[]
[react/view
{:style (styles/settings-separator)}])
;; TODO(Ferossgp): To refactor, uses outdated components
(views/defview mobile-network-settings
[]
(views/letsubs
[{:keys [syncing-on-mobile-network?
remember-syncing-choice?]}
[:profile/profile]]
[:<>
[react/view
{:style styles/switch-container
:accessibility-label "mobile-network-use-mobile"}
[profile.components/settings-switch-item
{:label-kw :t/mobile-network-use-mobile
:value syncing-on-mobile-network?
:action-fn #(hide-sheet-and-dispatch [:mobile-network/set-syncing %])}]]
[react/view {:style styles/details}
[react/text {:style styles/use-mobile-data-text}
(i18n/label :t/mobile-network-use-mobile-data)]]
[react/view
{:style styles/switch-container
:accessibility-label "mobile-network-ask-me"}
[profile.components/settings-switch-item
{:label-kw :t/mobile-network-ask-me
:value (not remember-syncing-choice?)
:action-fn #(hide-sheet-and-dispatch [:mobile-network/ask-on-mobile-network? %])}]]
[settings-separator]
[react/view
{:style styles/defaults-container}
[react/text
{:style styles/defaults
:accessibility-label "restore-defaults"
:on-press #(hide-sheet-and-dispatch [:mobile-network/restore-defaults])}
(i18n/label :t/restore-defaults)]]]))
(def offline-sheet
{:content sheets/offline-sheet})
@@ -13,7 +13,6 @@
[legacy.status-im.ui.screens.glossary.view :as glossary] [legacy.status-im.ui.screens.glossary.view :as glossary]
[legacy.status-im.ui.screens.help-center.views :as help-center] [legacy.status-im.ui.screens.help-center.views :as help-center]
[legacy.status-im.ui.screens.log-level-settings.views :as log-level-settings] [legacy.status-im.ui.screens.log-level-settings.views :as log-level-settings]
[legacy.status-im.ui.screens.mobile-network-settings.view :as mobile-network-settings]
[legacy.status-im.ui.screens.notifications-settings.views :as notifications-settings] [legacy.status-im.ui.screens.notifications-settings.views :as notifications-settings]
[legacy.status-im.ui.screens.offline-messaging-settings.edit-mailserver.views :as edit-mailserver] [legacy.status-im.ui.screens.offline-messaging-settings.edit-mailserver.views :as edit-mailserver]
[legacy.status-im.ui.screens.offline-messaging-settings.views :as offline-messaging-settings] [legacy.status-im.ui.screens.offline-messaging-settings.views :as offline-messaging-settings]
@@ -145,10 +144,6 @@
:options {:topBar (topbar-options :t/fleet-settings) :options {:topBar (topbar-options :t/fleet-settings)
:insets {:top? true}} :insets {:top? true}}
:component fleet-settings/fleet-settings} :component fleet-settings/fleet-settings}
{:name :mobile-network-settings
:options {:topBar (topbar-options :t/mobile-network-settings)
:insets {:top? true}}
:component mobile-network-settings/mobile-network-settings}
{:name :backup-settings {:name :backup-settings
:options {:topBar (topbar-options :t/backup-settings) :options {:topBar (topbar-options :t/backup-settings)
:insets {:top? true}} :insets {:top? true}}
@@ -13,8 +13,7 @@
(views/defview sync-settings (views/defview sync-settings
[] []
(views/letsubs [{:keys [syncing-on-mobile-network? (views/letsubs [{:keys [backup-enabled?
backup-enabled?
default-sync-period default-sync-period
use-mailservers?]} use-mailservers?]}
[:profile/profile] [:profile/profile]
@@ -27,16 +26,6 @@
:on-press #(rf/dispatch [:navigate-back])}] :on-press #(rf/dispatch [:navigate-back])}]
[react/scroll-view [react/scroll-view
[components/list-header (i18n/label :t/data-syncing)] [components/list-header (i18n/label :t/data-syncing)]
[list.item/list-item
{:size :small
:title (i18n/label :t/mobile-network-settings)
:accessibility-label :notifications-button
:on-press #(re-frame/dispatch [:navigate-to :mobile-network-settings])
:chevron true
:accessory :text
:accessory-text (if syncing-on-mobile-network?
(i18n/label :t/mobile-network-use-mobile)
(i18n/label :t/mobile-network-use-wifi))}]
[list.item/list-item [list.item/list-item
{:size :small {:size :small
:title (i18n/label :t/backup-settings) :title (i18n/label :t/backup-settings)
+8 -1
View File
@@ -332,7 +332,9 @@
(defn set-blank-preview-flag (defn set-blank-preview-flag
[flag] [flag]
(log/debug "[native-module] set-blank-preview-flag") (log/debug "[native-module] set-blank-preview-flag")
(.setBlankPreviewFlag ^js (encryption) flag)) ;; Sometimes the app crashes during logout because `flag` is nil.
(when-not (nil? flag)
(.setBlankPreviewFlag ^js (encryption) flag)))
(defn get-device-model-info (defn get-device-model-info
[] []
@@ -385,6 +387,11 @@
(log/debug "[native-module] encode-transfer") (log/debug "[native-module] encode-transfer")
(.encodeTransfer ^js (encryption) to-norm amount-hex)) (.encodeTransfer ^js (encryption) to-norm amount-hex))
(defn encode-function-call
[method params]
(log/debug "[native-module] encode-function-call")
(.encodeFunctionCall ^js (encryption) method (types/clj->json params)))
(defn decode-parameters (defn decode-parameters
[bytes-string types] [bytes-string types]
(log/debug "[native-module] decode-parameters") (log/debug "[native-module] decode-parameters")
@@ -60,7 +60,7 @@
(defn icon-color (defn icon-color
[{:keys [theme blur? type]}] [{:keys [theme blur? type]}]
(let [theme-with-blur (if blur? :blue theme) (let [theme-with-blur (if blur? :blur theme)
matcher [theme-with-blur type]] matcher [theme-with-blur type]]
(case matcher (case matcher
([:dark :main] [:light :main]) (colors/theme-colors colors/neutral-50 colors/neutral-40 theme) ([:dark :main] [:light :main]) (colors/theme-colors colors/neutral-50 colors/neutral-40 theme)
@@ -65,9 +65,8 @@
:style (style/container loading? theme size)} :style (style/container loading? theme size)}
[loading-view theme]] [loading-view theme]]
[linear-gradient/linear-gradient [linear-gradient/linear-gradient
(assoc {:style (style/container loading? theme size)} {:style (style/container loading? theme size)
:colors :colors (linear-gradient-props theme customization-color)}
(linear-gradient-props theme customization-color))
[rn/pressable [rn/pressable
{:accessibility-label :internal-link-card {:accessibility-label :internal-link-card
:on-press on-press} :on-press on-press}
@@ -11,5 +11,5 @@
[:networks [:* [:map [:source :schema.common/image-source]]]] [:networks [:* [:map [:source :schema.common/image-source]]]]
[:on-press {:optional true} [:maybe fn?]] [:on-press {:optional true} [:maybe fn?]]
[:customization-color {:optional true} [:maybe :schema.common/customization-color]] [:customization-color {:optional true} [:maybe :schema.common/customization-color]]
[:state {:optional true} [:maybe [:enum :default :active :selected]]]]] [:state {:optional true} [:maybe [:enum :default :active :selected :disabled]]]]]
:any]) :any])
@@ -18,6 +18,7 @@
:padding-vertical 8 :padding-vertical 8
:border-radius 12 :border-radius 12
:height 56 :height 56
:opacity (when (= state :disabled) 0.3)
:background-color (background-color state customization-color theme)}) :background-color (background-color state customization-color theme)})
(defn check-color (defn check-color
@@ -62,6 +62,7 @@
:on-press-in on-press-in :on-press-in on-press-in
:on-press-out on-press-out :on-press-out on-press-out
:on-press on-press :on-press on-press
:disabled (= state :disabled)
:accessibility-label :token-network} :accessibility-label :token-network}
[info props] [info props]
[values props]])) [values props]]))
@@ -32,8 +32,7 @@
(def system-message-base-wrapper (def system-message-base-wrapper
{:flex-direction :row {:flex-direction :row
:flex 1 :flex 1})
:align-items :center})
(def system-message-base-content-wrapper (def system-message-base-content-wrapper
{:align-self :center {:align-self :center
@@ -127,6 +127,14 @@
(when incoming? [split-text "sent you a contact request" theme true]) (when incoming? [split-text "sent you a contact request" theme true])
[sm-timestamp timestamp theme]]])) [sm-timestamp timestamp theme]]]))
(defn system-message-group
[{:keys [customization-color child]}]
[system-message-base
{:icon {:icon :i/add-user
:color (or customization-color :primary)
:opacity 5}}
[rn/view child]])
(defn system-message-pinned (defn system-message-pinned
[{:keys [pinned-by child customization-color timestamp]}] [{:keys [pinned-by child customization-color timestamp]}]
(let [theme (quo.theme/use-theme)] (let [theme (quo.theme/use-theme)]
@@ -183,6 +191,7 @@
:contact-request [system-message-contact-request data] :contact-request [system-message-contact-request data]
:added [system-message-added data] :added [system-message-added data]
:removed [system-message-removed data] :removed [system-message-removed data]
:group [system-message-group data]
nil)])) nil)]))
(defn system-message (defn system-message
@@ -4,7 +4,7 @@
(defn main (defn main
[{:keys [type customization-color]} theme] [{:keys [type customization-color]} theme]
{:justify-content :center {:justify-content :flex-start
:align-items :center :align-items :center
:height 32 :height 32
:padding-left 4 :padding-left 4
@@ -16,6 +16,7 @@
(defn label (defn label
[type theme] [type theme]
{:color (colors/theme-colors colors/neutral-100 colors/white theme) {:color (colors/theme-colors colors/neutral-100 colors/white theme)
:flex-shrink 1
:margin-left (if (= type :address) 6 4)}) :margin-left (if (= type :address) 6 4)})
(def collectible-image (def collectible-image
@@ -58,16 +58,19 @@
- :emoji - string - emoji used for displaying account avatar - :emoji - string - emoji used for displaying account avatar
- :image-source - resource - image to display on :network, :collectible and :user - :image-source - resource - image to display on :network, :collectible and :user
- :theme - :light / :dark" - :theme - :light / :dark"
[{:keys [label customization-color type] [{:keys [label customization-color type container-style]
:as props :as props
:or {customization-color colors/neutral-80-opa-5}}] :or {customization-color colors/neutral-80-opa-5}}]
(let [theme (quo.theme/use-theme)] (let [theme (quo.theme/use-theme)]
[rn/view [rn/view
{:accessibility-label :container {:accessibility-label :container
:style (style/main (assoc props :customization-color customization-color) theme)} :style (merge (style/main (assoc props :customization-color customization-color)
theme)
container-style)}
[left-view props] [left-view props]
[text/text [text/text
{:style (style/label type theme) {:style (style/label type theme)
:weight :semi-bold :weight :semi-bold
:size :heading-1} :number-of-lines 1
:size :heading-1}
label]])) label]]))
@@ -21,3 +21,8 @@
(if blur? (if blur?
(colors/theme-colors colors/neutral-80-opa-70 colors/white-opa-70 theme) (colors/theme-colors colors/neutral-80-opa-70 colors/white-opa-70 theme)
(colors/theme-colors colors/neutral-50 colors/neutral-40 theme))) (colors/theme-colors colors/neutral-50 colors/neutral-40 theme)))
(def text
{:flex 1
;; NOTE: assures the ellipses are not cut off when text is too long
:padding-right 2})
@@ -59,7 +59,9 @@
[rn/view {:style (merge style/container container-style)} [rn/view {:style (merge style/container container-style)}
[text/text [text/text
{:size :heading-1 {:size :heading-1
:number-of-lines 1
:weight :semi-bold :weight :semi-bold
:style style/text
:accessibility-label accessibility-label} :accessibility-label accessibility-label}
title] title]
(case right (case right
+23 -11
View File
@@ -5,7 +5,7 @@
[react-native.platform :as platform])) [react-native.platform :as platform]))
(def account-colors (def account-colors
[:blue :yellow :purple :turquoise :magenta :sky :orange :army :flamingo :camel :copper]) [:blue :yellow :purple :turquoise :magenta :sky :orange :army :pink :camel :copper])
(defn alpha (defn alpha
[value opacity] [value opacity]
@@ -44,6 +44,13 @@
(alpha light-color light-opacity) (alpha light-color light-opacity)
(alpha dark-color dark-opacity)))))) (alpha dark-color dark-opacity))))))
(defn valid-color?
[color]
(or (keyword? color)
(and (string? color)
(or (string/starts-with? color "#")
(string/starts-with? color "rgb")))))
;;;;Neutral ;;;;Neutral
@@ -239,7 +246,7 @@
60 "#CC6438"} 60 "#CC6438"}
:army {50 "#216266" :army {50 "#216266"
60 "#1A4E52"} 60 "#1A4E52"}
:flamingo {50 "#F66F8F" :pink {50 "#F66F8F"
60 "#C55972"} 60 "#C55972"}
:purple {50 "#7140FD" :purple {50 "#7140FD"
60 "#5A33CA"} 60 "#5A33CA"}
@@ -316,13 +323,14 @@
[s] [s]
(and (string? s) (string/starts-with? s "#"))) (and (string? s) (string/starts-with? s "#")))
(def fallback-color (customization :blue))
(defn- get-from-colors-map (defn- get-from-colors-map
[color suffix] [color suffix]
(let [color-without-suffix (get colors-map color) (let [color-without-suffix (get colors-map color fallback-color)]
resolved-color? (hex-string? color-without-suffix)] (if (hex-string? color-without-suffix)
(if resolved-color?
color-without-suffix color-without-suffix
(get-in colors-map [color suffix])))) (get color-without-suffix suffix))))
(defn- resolve-color* (defn- resolve-color*
([color theme] ([color theme]
@@ -356,11 +364,15 @@
([color suffix] ([color suffix]
(custom-color color suffix nil)) (custom-color color suffix nil))
([color suffix opacity] ([color suffix opacity]
(let [hex? (not (keyword? color)) (let [resolved-color (cond
resolved-color (cond hex? color (not (keyword? color))
(hex-string? (get colors-map color)) (get colors-map color) color
:else (get-in colors-map
[color suffix]))] (hex-string? (get colors-map color))
(get colors-map color fallback-color)
:else
(get-in colors-map [color suffix] (get fallback-color suffix)))]
(if opacity (if opacity
(alpha resolved-color (/ opacity 100)) (alpha resolved-color (/ opacity 100))
resolved-color)))))) resolved-color))))))
+29 -3
View File
@@ -4,11 +4,37 @@
[oops.core :as oops] [oops.core :as oops]
[react-native.core :as rn])) [react-native.core :as rn]))
(defn- add-keyboard-listener
[listener callback]
(oops/ocall rn/keyboard "addListener" listener callback))
(defn use-keyboard (defn use-keyboard
[] []
(let [kb (.useKeyboard hooks)] (let [[keyboard-height set-keyboard-height] (rn/use-state 0)
{:keyboard-shown (.-keyboardShown ^js kb) [did-show? set-did-show] (rn/use-state false)
:keyboard-height (.-keyboardHeight ^js kb)})) [will-show? set-will-show] (rn/use-state false)]
(rn/use-mount
(fn []
(let [will-show-listener (add-keyboard-listener "keyboardWillShow" #(set-will-show true))
did-show-listener (add-keyboard-listener "keyboardDidShow"
(fn [e]
(set-did-show true)
(set-keyboard-height
(oops/oget e "endCoordinates.height"))))
will-hide-listener (add-keyboard-listener "keyboardWillHide" #(set-will-show false))
did-hide-listener (add-keyboard-listener "keyboardDidHide"
(fn [e]
(set-did-show false)
(when e
(oops/oget e "endCoordinates.height"))))]
(fn []
(oops/ocall will-show-listener "remove")
(oops/ocall did-show-listener "remove")
(oops/ocall will-hide-listener "remove")
(oops/ocall did-hide-listener "remove")))))
{:keyboard-shown did-show?
:keyboard-will-show? will-show?
:keyboard-height keyboard-height}))
(defn use-back-handler (defn use-back-handler
[handler] [handler]
+35 -2
View File
@@ -1,6 +1,39 @@
(ns react-native.linear-gradient (ns react-native.linear-gradient
(:require (:require
["react-native-linear-gradient" :default LinearGradient] ["react-native-linear-gradient" :default LinearGradient]
[reagent.core :as reagent])) [quo.foundations.colors :as colors]
[react-native.core :as rn]
[reagent.core :as reagent]
[taoensso.timbre :as log]))
(def linear-gradient (reagent/adapt-react-class LinearGradient)) (def ^:private linear-gradient* (reagent/adapt-react-class LinearGradient))
(defn- split-valid-colors
[acc idx color]
(let [color? (colors/valid-color? color)]
(cond-> acc
:always (update :safe-colors conj (if color? color "transparent"))
(not color?) (update :wrong-colors conj [idx color]))))
(defn- wrong-colors-str
[colors]
(reduce-kv (fn [s idx color]
(str s "Index: " idx ", color: " (prn-str color)))
"Invalid color values in vector passed to Linear Gradient:\n"
colors))
(defn linear-gradient
[props & children]
(when ^boolean js/goog.DEBUG
(assert (vector? (:colors props))))
(let [{:keys [wrong-colors safe-colors]} (rn/use-memo
(fn []
(reduce-kv split-valid-colors
{:safe-colors []
:wrong-colors {}}
(:colors props)))
[(:colors props)])]
(when (seq wrong-colors)
(log/error (wrong-colors-str wrong-colors)))
(into [linear-gradient* (assoc props :colors safe-colors)]
children)))
+8
View File
@@ -0,0 +1,8 @@
(ns react-native.net-info
(:require
["@react-native-community/netinfo" :default net-info]))
(defn add-net-info-listener
[callback]
(when net-info
(.addEventListener ^js net-info callback)))
@@ -0,0 +1,24 @@
(ns status-im.common.data-confirmation-sheet.style
(:require [quo.foundations.colors :as colors]))
(def heading
{:padding-left 20
:padding-bottom 8})
(def message
{:padding-horizontal 20
:padding-top 4})
(def warning
{:margin-horizontal 20
:margin-top 10})
(def drawer-container
{:padding-horizontal 13
:padding-top 16})
(def settings-subtext
{:color colors/white-opa-70
:align-self :center
:margin-bottom 12})
@@ -0,0 +1,73 @@
(ns status-im.common.data-confirmation-sheet.view
(:require
[quo.core :as quo]
[react-native.core :as rn]
[status-im.common.data-confirmation-sheet.style :as style]
[utils.i18n :as i18n]
[utils.navigation :as navigation]
[utils.re-frame :as rf]))
(defn on-choice-callback
[syncing-on-mobile-network?]
(rf/dispatch [:network/set-syncing-on-mobile-network syncing-on-mobile-network?])
(navigation/hide-bottom-sheet))
(def on-wifi-only (partial on-choice-callback false))
(def on-mobile-and-wifi (partial on-choice-callback true))
(defn view
[]
(let [settings-drawer? (= (rf/sub [:view-id]) :screen/settings.syncing)
syncing-on-mobile-network? (rf/sub [:profile/syncing-on-mobile-network?])]
(rn/use-mount navigation/dismiss-keyboard)
[:<>
[quo/text
{:weight :semi-bold
:size :heading-2
:accessibility-label :data-confirmation-sheet-heading
:style style/heading}
(i18n/label (if settings-drawer? :t/sync-and-backup :t/which-connection-to-use))]
[quo/text
{:weight :regular
:size :paragraph-1
:accessibility-label :data-confirmation-sheet-message
:style style/message}
(i18n/label :t/syncing-connection-message)]
[quo/information-box
{:type :default
:icon :i/info
:blur? true
:style style/warning}
(i18n/label :t/syncing-wifi-connection-warning)]
(if settings-drawer?
[rn/view {:style style/drawer-container}
[quo/drawer-action
{:title (i18n/label :t/mobile-data-and-wifi)
:state (when syncing-on-mobile-network? :selected)
:blur? true
:accessibility-label :mobile-data-and-wifi-action
:icon :i/connection
:on-press on-mobile-and-wifi}]
[quo/drawer-action
{:title (i18n/label :t/wifi-only)
:state (when-not syncing-on-mobile-network? :selected)
:blur? true
:accessibility-label :wifi-only-action
:icon :i/placeholder
:on-press on-wifi-only}]]
[quo/bottom-actions
{:actions :two-actions
:blur? true
:container-style {:margin-top 12}
:button-one-label (i18n/label :t/wifi-only)
:button-one-props {:type :grey
:on-press on-wifi-only}
:button-two-label (i18n/label :t/mobile-and-wifi)
:button-two-props {:on-press on-mobile-and-wifi}}])
(if settings-drawer?
[quo/divider-line {:container-style {:padding-vertical 8}}]
[quo/text
{:weight :regular
:size :paragraph-2
:style style/settings-subtext}
(i18n/label :t/you-can-change-later-in-settings)])]))
@@ -3,21 +3,23 @@
[react-native.safe-area :as safe-area])) [react-native.safe-area :as safe-area]))
(defn content-container (defn content-container
[blur? keyboard-shown?] [blur? keyboard-shown? {:keys [padding-vertical padding-horizontal]}]
(let [margin-bottom (if keyboard-shown? 0 (safe-area/get-bottom))] (let [margin-bottom (if keyboard-shown? 0 (safe-area/get-bottom))]
(cond-> {:margin-top :auto (cond-> {:margin-top :auto
:overflow :hidden :overflow :hidden
:margin-bottom margin-bottom :margin-bottom margin-bottom
:padding-vertical 12 :padding-vertical (or padding-vertical 12)
:padding-horizontal 20} :padding-horizontal (or padding-horizontal 20)}
blur? (dissoc :padding-vertical :padding-horizontal)))) blur? (dissoc :padding-vertical :padding-horizontal))))
(defn blur-inner-container (defn blur-inner-container
[theme shell-overlay?] [{:keys [theme shell-overlay? padding-vertical padding-horizontal background-color]}]
{:background-color (colors/theme-colors colors/white-70-blur {:background-color (or background-color
(if shell-overlay? (colors/theme-colors
colors/neutral-80-opa-80-blur colors/white-70-blur
colors/neutral-95-opa-70-blur) (if shell-overlay?
theme) colors/neutral-80-opa-80-blur
:padding-vertical 12 colors/neutral-95-opa-70-blur)
:padding-horizontal 20}) theme))
:padding-vertical (or padding-vertical 12)
:padding-horizontal (or padding-horizontal 20)})
@@ -6,20 +6,25 @@
[status-im.common.floating-button-page.floating-container.style :as style])) [status-im.common.floating-button-page.floating-container.style :as style]))
(defn- blur-container (defn- blur-container
[child shell-overlay?] [shell-overlay? blur-options child]
(let [theme (quo.theme/use-theme)] (let [theme (quo.theme/use-theme)]
[quo/blur [quo/blur
{:blur-amount 20 (or blur-options
:blur-type :transparent {:blur-amount 20
:overlay-color :transparent} :blur-type :transparent
[rn/view {:style (style/blur-inner-container theme shell-overlay?)} :overlay-color :transparent})
[rn/view
{:style (style/blur-inner-container (assoc
blur-options
:theme theme
:shell-overlay? shell-overlay?))}
child]])) child]]))
(defn view (defn view
[{:keys [on-layout keyboard-shown? blur? shell-overlay?]} child] [{:keys [on-layout keyboard-shown? blur? shell-overlay? blur-options]} child]
[rn/view [rn/view
{:style (style/content-container blur? keyboard-shown?) {:style (style/content-container blur? keyboard-shown? blur-options)
:on-layout on-layout} :on-layout on-layout}
(if blur? (if blur?
[blur-container child shell-overlay?] [blur-container shell-overlay? blur-options child]
child)]) child)])
@@ -13,3 +13,13 @@
:bottom 0 :bottom 0
:left 0 :left 0
:right 0}) :right 0})
(defn content-keyboard-avoiding-view
[{:keys [top bottom]}]
{:position :absolute
:top top
:left 0
:right 0
:bottom bottom})
(def scroll-view-container {:flex 1})
@@ -30,13 +30,15 @@
(reset! ratom height)))) (reset! ratom height))))
(defn- init-keyboard-listeners (defn- init-keyboard-listeners
[{:keys [on-did-show scroll-view-ref]}] [{:keys [on-did-show on-will-show scroll-view-ref]}]
(let [keyboard-will-show? (reagent/atom false) (let [keyboard-will-show? (reagent/atom false)
keyboard-did-show? (reagent/atom false) keyboard-did-show? (reagent/atom false)
add-listener (fn [listener callback] add-listener (fn [listener callback]
(oops/ocall rn/keyboard "addListener" listener callback)) (oops/ocall rn/keyboard "addListener" listener callback))
will-show-listener (add-listener "keyboardWillShow" will-show-listener (add-listener "keyboardWillShow"
#(reset! keyboard-will-show? true)) (fn [e]
(reset! keyboard-will-show? true)
(when on-will-show (on-will-show e))))
did-show-listener (add-listener "keyboardDidShow" did-show-listener (add-listener "keyboardDidShow"
(fn [e] (fn [e]
(reset! keyboard-did-show? true) (reset! keyboard-did-show? true)
@@ -58,7 +60,8 @@
(defn view (defn view
[{:keys [header footer customization-color footer-container-padding header-container-style [{:keys [header footer customization-color footer-container-padding header-container-style
content-container-style gradient-cover? keyboard-should-persist-taps shell-overlay?] content-container-style gradient-cover? keyboard-should-persist-taps shell-overlay?
blur-options content-avoid-keyboard?]
:or {footer-container-padding (safe-area/get-top)}} :or {footer-container-padding (safe-area/get-top)}}
& children] & children]
(reagent/with-let [scroll-view-ref (atom nil) (reagent/with-let [scroll-view-ref (atom nil)
@@ -69,29 +72,34 @@
content-container-height (reagent/atom 0) content-container-height (reagent/atom 0)
content-scroll-y (reagent/atom 0) content-scroll-y (reagent/atom 0)
keyboard-height (reagent/atom 0) keyboard-height (reagent/atom 0)
reset-keyboard-height #(reset! keyboard-height (oops/oget
%
"endCoordinates.height"))
{:keys [keyboard-will-show? {:keys [keyboard-will-show?
keyboard-did-show? keyboard-did-show?
remove-listeners]} (init-keyboard-listeners remove-listeners]} (init-keyboard-listeners
{:scroll-view-ref scroll-view-ref (cond-> {:scroll-view-ref scroll-view-ref}
:on-did-show platform/ios?
(fn [e] (assoc :on-will-show reset-keyboard-height)
(reset! keyboard-height (not platform/ios?)
(oops/oget e "endCoordinates.height")))}) (assoc :on-did-show reset-keyboard-height)))
set-header-height (set-height-on-layout header-height) set-header-height (set-height-on-layout header-height)
set-content-container-height (set-height-on-layout content-container-height) set-content-container-height (set-height-on-layout content-container-height)
set-footer-container-height (set-height-on-layout footer-container-height) set-footer-container-height (set-height-on-layout footer-container-height)
set-content-y-scroll (fn [event] set-content-y-scroll (fn [event]
(reset! content-scroll-y (reset! content-scroll-y
(oops/oget event "nativeEvent.contentOffset.y")))] (oops/oget event "nativeEvent.contentOffset.y")))
bottom-safe-area (safe-area/get-bottom)]
(let [keyboard-shown? (if platform/ios? @keyboard-will-show? @keyboard-did-show?) (let [keyboard-shown? (if platform/ios? @keyboard-will-show? @keyboard-did-show?)
footer-container-padding (+ footer-container-padding (rf/sub [:alert-banners/top-margin])) footer-container-padding (+ footer-container-padding (rf/sub [:alert-banners/top-margin]))
show-background? (show-background {:window-height window-height show-background? (show-background
:footer-container-height @footer-container-height {:window-height window-height
:keyboard-height @keyboard-height :footer-container-height @footer-container-height
:content-scroll-y @content-scroll-y :keyboard-height @keyboard-height
:content-container-height @content-container-height :content-scroll-y @content-scroll-y
:header-height @header-height :content-container-height @content-container-height
:keyboard-shown? keyboard-shown?})] :header-height @header-height
:keyboard-shown? keyboard-shown?})]
[:<> [:<>
(when gradient-cover? (when gradient-cover?
[quo/gradient-cover {:customization-color customization-color}]) [quo/gradient-cover {:customization-color customization-color}])
@@ -100,20 +108,28 @@
{:on-layout set-header-height {:on-layout set-header-height
:style header-container-style} :style header-container-style}
header] header]
[gesture/scroll-view [(if content-avoid-keyboard? rn/keyboard-avoiding-view rn/view)
{:ref set-scroll-ref {:style
:on-scroll set-content-y-scroll (if content-avoid-keyboard?
:scroll-event-throttle 64 (style/content-keyboard-avoiding-view
:content-container-style {:flex-grow 1 {:top @header-height
:padding-bottom (when @keyboard-did-show? :bottom (if keyboard-shown?
@footer-container-height)} @footer-container-height
:always-bounce-vertical @keyboard-did-show? (+ bottom-safe-area @footer-container-height))})
:shows-vertical-scroll-indicator false style/scroll-view-container)}
:keyboard-should-persist-taps keyboard-should-persist-taps} [gesture/scroll-view
(into [rn/view {:ref set-scroll-ref
{:style content-container-style :on-scroll set-content-y-scroll
:on-layout set-content-container-height}] :scroll-event-throttle 64
children)] :content-container-style {:flex-grow 1}
:always-bounce-vertical @keyboard-did-show?
:automatically-adjust-keyboard-insets true
:shows-vertical-scroll-indicator false
:keyboard-should-persist-taps keyboard-should-persist-taps}
(into [rn/view
{:style content-container-style
:on-layout set-content-container-height}]
children)]]
[rn/keyboard-avoiding-view [rn/keyboard-avoiding-view
{:style style/keyboard-avoiding-view {:style style/keyboard-avoiding-view
:keyboard-vertical-offset (if platform/ios? footer-container-padding 0) :keyboard-vertical-offset (if platform/ios? footer-container-padding 0)
@@ -121,8 +137,9 @@
[floating-container/view [floating-container/view
{:on-layout set-footer-container-height {:on-layout set-footer-container-height
:keyboard-shown? keyboard-shown? :keyboard-shown? keyboard-shown?
:blur? show-background? :blur-options blur-options
:shell-overlay? shell-overlay?} :shell-overlay? shell-overlay?
:blur? show-background?}
footer]]]]) footer]]]])
(finally (finally
(remove-listeners)))) (remove-listeners))))
+1 -1
View File
@@ -55,7 +55,7 @@
{:dispatch (if user-in-sign-in-intro-screen? {:dispatch (if user-in-sign-in-intro-screen?
[:navigate-to-within-stack [:navigate-to-within-stack
[:screen/onboarding.syncing-progress-intro :screen/onboarding.sign-in-intro]] [:screen/onboarding.syncing-progress-intro :screen/onboarding.sign-in-intro]]
[:navigate-to :screen/onboarding.syncing-progress])} [:open-modal :screen/onboarding.syncing-progress])}
(and completed-pairing? sender?) (and completed-pairing? sender?)
{:dispatch [:syncing/clear-states]} {:dispatch [:syncing/clear-states]}
@@ -1,14 +1,14 @@
(ns status-im.common.raw-data-block.view (ns status-im.common.raw-data-block.view
(:require [quo.core :as quo] (:require [quo.core :as quo]
[react-native.core :as rn] [react-native.gesture :as gesture]
[status-im.common.raw-data-block.style :as style])) [status-im.common.raw-data-block.style :as style]))
(defn view (defn view
[data] [data]
[rn/scroll-view [gesture/scroll-view
{:style style/container {:style style/container}
:content-container-style style/content}
[quo/text [quo/text
{:size :paragraph-2 {:size :paragraph-2
:style style/content
:weight :code} :weight :code}
data]]) data]])
+3 -1
View File
@@ -27,7 +27,9 @@
:welcome-illustration (js/require "../resources/images/ui2/welcome_illustration.png") :welcome-illustration (js/require "../resources/images/ui2/welcome_illustration.png")
:notifications (js/require "../resources/images/ui2/notifications.png") :notifications (js/require "../resources/images/ui2/notifications.png")
:nfc-prompt (js/require "../resources/images/ui2/nfc-prompt.png") :nfc-prompt (js/require "../resources/images/ui2/nfc-prompt.png")
:nfc-success (js/require "../resources/images/ui2/nfc-success.png")}) :nfc-success (js/require "../resources/images/ui2/nfc-success.png")
:syncing-devices (js/require "../resources/images/ui2/syncing_devices.png")
:syncing-wrong (js/require "../resources/images/ui2/syncing_wrong.png")})
(def ui-themed (def ui-themed
{:angry-man {:angry-man
+9 -10
View File
@@ -1,7 +1,6 @@
(ns status-im.common.signals.events (ns status-im.common.signals.events
(:require (:require
[legacy.status-im.chat.models.message :as models.message] [legacy.status-im.chat.models.message :as models.message]
[legacy.status-im.mailserver.core :as mailserver]
[legacy.status-im.visibility-status-updates.core :as visibility-status-updates] [legacy.status-im.visibility-status-updates.core :as visibility-status-updates]
[oops.core :as oops] [oops.core :as oops]
[status-im.common.pairing.events :as pairing] [status-im.common.pairing.events :as pairing]
@@ -38,6 +37,15 @@
"wallet" "wallet"
{:fx [[:dispatch [:wallet/signal-received event-js]]]} {:fx [[:dispatch [:wallet/signal-received event-js]]]}
"wallet.sign.transactions"
{:fx [[:dispatch
[:standard-auth/authorize-with-keycard
{:on-complete #(rf/dispatch [:keycard/sign-hash %
(first (transforms/js->clj event-js))])}]]]}
"wallet.suggested.routes"
{:fx [[:dispatch [:wallet/handle-suggested-routes (transforms/js->clj event-js)]]]}
"envelope.sent" "envelope.sent"
(messages.transport/update-envelopes-status (messages.transport/update-envelopes-status
cofx cofx
@@ -57,15 +65,6 @@
"messages.new" "messages.new"
(messages.transport/sanitize-messages-and-process-response cofx event-js true) (messages.transport/sanitize-messages-and-process-response cofx event-js true)
"mailserver.changed"
(mailserver/handle-mailserver-changed cofx (oops/oget event-js :id))
"mailserver.available"
(mailserver/handle-mailserver-available cofx (oops/oget event-js :id))
"mailserver.not.working"
(mailserver/handle-mailserver-not-working cofx)
"discovery.summary" "discovery.summary"
(summary cofx (transforms/js->clj event-js)) (summary cofx (transforms/js->clj event-js))
@@ -3,21 +3,35 @@
[schema.core :as schema] [schema.core :as schema]
[status-im.common.standard-authentication.enter-password.view :as enter-password] [status-im.common.standard-authentication.enter-password.view :as enter-password]
[status-im.common.standard-authentication.events-schema :as events-schema] [status-im.common.standard-authentication.events-schema :as events-schema]
[status-im.contexts.keycard.pin.view :as keycard.pin]
[taoensso.timbre :as log] [taoensso.timbre :as log]
[utils.address]
[utils.i18n :as i18n] [utils.i18n :as i18n]
[utils.re-frame :as rf] [utils.re-frame :as rf]
[utils.security.core :as security])) [utils.security.core :as security]))
(rf/reg-fx :effects.keycard/call-on-auth-success
(fn [on-auth-success]
(when on-auth-success (on-auth-success ""))))
(defn authorize (defn authorize
[{:keys [db]} [args]] [{:keys [db]} [{:keys [on-auth-success keycard-supported?] :as args}]]
(let [key-uid (get-in db [:profile/profile :key-uid]) (let [key-uid (get-in db [:profile/profile :key-uid])
keycard? (get-in db [:profile/profile :keycard-pairing])] keycard? (get-in db [:profile/profile :keycard-pairing])]
{:fx [[:effects.biometric/check-if-available {:fx
{:key-uid key-uid [(if keycard?
:on-success #(rf/dispatch [:standard-auth/authorize-with-biometric args]) (if keycard-supported?
:on-fail (if keycard? [:effects.keycard/call-on-auth-success on-auth-success]
#(rf/dispatch [:standard-auth/authorize-with-keycard args]) [:effects.utils/show-popup
#(rf/dispatch [:standard-auth/authorize-with-password args]))}]]})) {:title "This feature is not supported yet "
:content
"Keycard support is limited to logging in
and signing the sending transaction.
Use Status Desktop to access all functions."}])
[:effects.biometric/check-if-available
{:key-uid key-uid
:on-success #(rf/dispatch [:standard-auth/authorize-with-biometric args])
:on-fail #(rf/dispatch [:standard-auth/authorize-with-password args])}])]}))
(schema/=> authorize events-schema/?authorize) (schema/=> authorize events-schema/?authorize)
(rf/reg-event-fx :standard-auth/authorize authorize) (rf/reg-event-fx :standard-auth/authorize authorize)
@@ -94,6 +108,16 @@
:button-icon-left auth-button-icon-left :button-icon-left auth-button-icon-left
:button-label auth-button-label}]))) :button-label auth-button-label}])))
(defn authorize-with-keycard
[_ [{:keys [on-complete]}]]
{:fx [[:dispatch
[:show-bottom-sheet
{:hide-on-background-press? false
:on-close #(rf/dispatch [:standard-auth/reset-login-password])
:content (fn []
[keycard.pin/auth {:on-complete on-complete}])}]]]})
(rf/reg-event-fx :standard-auth/authorize-with-keycard authorize-with-keycard)
(defn authorize-with-password (defn authorize-with-password
[_ [{:keys [on-close theme blur?] :as args}]] [_ [{:keys [on-close theme blur?] :as args}]]
{:fx [[:dispatch [:standard-auth/reset-login-password]] {:fx [[:dispatch [:standard-auth/reset-login-password]]
@@ -110,7 +134,9 @@
(rf/reg-event-fx (rf/reg-event-fx
:standard-auth/reset-login-password :standard-auth/reset-login-password
(fn [{:keys [db]}] (fn [{:keys [db]}]
{:db (update db :profile/login dissoc :password :error)})) {:db (-> db
(update :profile/login dissoc :password :error)
(update :keycard dissoc :pin))}))
(rf/reg-fx (rf/reg-fx
:standard-auth/on-close :standard-auth/on-close
@@ -8,7 +8,7 @@
(defn view (defn view
[{:keys [track-text customization-color auth-button-label on-auth-success on-auth-fail [{:keys [track-text customization-color auth-button-label on-auth-success on-auth-fail
auth-button-icon-left size blur? container-style disabled? dependencies] auth-button-icon-left size blur? container-style disabled? dependencies keycard-supported?]
:or {container-style {:flex 1}}}] :or {container-style {:flex 1}}}]
(let [theme (quo.theme/use-theme) (let [theme (quo.theme/use-theme)
auth-method (rf/sub [:auth-method]) auth-method (rf/sub [:auth-method])
@@ -21,6 +21,7 @@
:auth-button-icon-left auth-button-icon-left :auth-button-icon-left auth-button-icon-left
:theme theme :theme theme
:blur? blur? :blur? blur?
:keycard-supported? keycard-supported?
:biometric-auth? biometric-auth? :biometric-auth? biometric-auth?
:on-auth-success on-auth-success :on-auth-success on-auth-success
:on-auth-fail on-auth-fail :on-auth-fail on-auth-fail
+8
View File
@@ -0,0 +1,8 @@
(ns status-im.common.theme.effects
(:require
[status-im.common.theme.core :as theme]
[utils.re-frame :as rf]))
(rf/reg-fx :theme/legacy-theme-fx
(fn [theme]
(theme/set-legacy-theme theme)))
+15 -3
View File
@@ -1,7 +1,8 @@
(ns status-im.common.theme.events (ns status-im.common.theme.events
(:require (:require
[re-frame.core :as re-frame] [re-frame.core :as re-frame]
[status-im.common.theme.core :as theme])) [status-im.common.theme.core :as theme]
[status-im.common.theme.utils :as utils]))
(re-frame/reg-fx (re-frame/reg-fx
:theme/init-theme :theme/init-theme
@@ -10,5 +11,16 @@
(re-frame/reg-event-fx (re-frame/reg-event-fx
:theme/switch :theme/switch
(fn [{db :db} [theme]] (fn [{db :db} [{:keys [theme view-id theme-type]}]]
{:db (assoc db :theme theme)})) "Switches the theme and triggers related effects.
Parameters:
- theme: Optional theme keyword to apply. If not provided, defaults to the theme determined by theme-type.
- theme-type: Optional theme type to determine the theme. If not provided, defaults to the theme type from the user's profile.
- view-id: Optional view ID for updating status color. If not provided, uses the current view ID from the database."
(let [theme-type (or theme-type (get-in db [:profile/profile :appearance]))
theme (or theme (utils/theme-type->theme-value theme-type))]
{:db (assoc db :theme theme)
:fx [[:theme/legacy-theme-fx theme]
[:dispatch
[:reload-status-nav-color
(or view-id (:view-id db))]]]})))
+17
View File
@@ -0,0 +1,17 @@
(ns status-im.common.theme.utils
(:require
[status-im.common.theme.core :as theme]
[status-im.constants :as constants]))
(defn theme-type->theme-value
"Converts theme type identifier to a theme keyword.
Returns `:light` or `:dark` based on `theme-type`:
- `theme-type-light` (1): Light theme.
- `theme-type-dark` (2): Dark theme.
- `theme-type-system` (0): Uses system preference."
[theme-type]
(condp = theme-type
constants/theme-type-dark :dark
constants/theme-type-light :light
constants/theme-type-system (if (theme/device-theme-dark?) :dark :light)
:dark))
+6
View File
@@ -12,6 +12,8 @@
(goog-define INFURA_TOKEN "") (goog-define INFURA_TOKEN "")
(goog-define POKT_TOKEN "3ef2018191814b7e1009b8d9") (goog-define POKT_TOKEN "3ef2018191814b7e1009b8d9")
(goog-define STATUS_BUILD_PROXY_USER "")
(goog-define STATUS_BUILD_PROXY_PASSWORD "")
(goog-define OPENSEA_API_KEY "") (goog-define OPENSEA_API_KEY "")
(goog-define RARIBLE_MAINNET_API_KEY "") (goog-define RARIBLE_MAINNET_API_KEY "")
(goog-define RARIBLE_TESTNET_API_KEY "") (goog-define RARIBLE_TESTNET_API_KEY "")
@@ -45,6 +47,7 @@
(def mixpanel-token MIXPANEL_TOKEN) (def mixpanel-token MIXPANEL_TOKEN)
(def opensea-api-key OPENSEA_API_KEY) (def opensea-api-key OPENSEA_API_KEY)
(def status-proxy-enabled? true)
(def bootnodes-settings-enabled? (enabled? (get-config :BOOTNODES_SETTINGS_ENABLED "1"))) (def bootnodes-settings-enabled? (enabled? (get-config :BOOTNODES_SETTINGS_ENABLED "1")))
(def mailserver-confirmations-enabled? (enabled? (get-config :MAILSERVER_CONFIRMATIONS_ENABLED))) (def mailserver-confirmations-enabled? (enabled? (get-config :MAILSERVER_CONFIRMATIONS_ENABLED)))
(def pairing-popup-disabled? (enabled? (get-config :PAIRING_POPUP_DISABLED "0"))) (def pairing-popup-disabled? (enabled? (get-config :PAIRING_POPUP_DISABLED "0")))
@@ -125,6 +128,9 @@
(def fetch-messages-enabled? (enabled? (get-config :FETCH_MESSAGES_ENABLED "1"))) (def fetch-messages-enabled? (enabled? (get-config :FETCH_MESSAGES_ENABLED "1")))
(def test-networks-enabled? (enabled? (get-config :TEST_NETWORKS_ENABLED "0"))) (def test-networks-enabled? (enabled? (get-config :TEST_NETWORKS_ENABLED "0")))
(def mobile-data-syncing-toggle-enabled?
(enabled? (get-config :MOBILE_DATA_SYNCING_TOGGLE_ENABLE "1")))
;; Alert banners are disabled for debug builds because alert banners overlay ;; Alert banners are disabled for debug builds because alert banners overlay
;; interfere with react-native debug tools, such as inspector and Perf monitor ;; interfere with react-native debug tools, such as inspector and Perf monitor
(def enable-alert-banner? (enabled? (get-config :ENABLE_ALERT_BANNER "0"))) (def enable-alert-banner? (enabled? (get-config :ENABLE_ALERT_BANNER "0")))
+11
View File
@@ -291,6 +291,7 @@
(def ^:const wallet-connect-session-delete-event "session_delete") (def ^:const wallet-connect-session-delete-event "session_delete")
(def ^:const wallet-connect-user-rejected-error-key "USER_REJECTED") (def ^:const wallet-connect-user-rejected-error-key "USER_REJECTED")
(def ^:const wallet-connect-user-disconnected-reason-key "USER_DISCONNECTED") (def ^:const wallet-connect-user-disconnected-reason-key "USER_DISCONNECTED")
(def ^:const wallet-connect-user-rejected-chains-error-key "USER_REJECTED_CHAINS")
(def ^:const transaction-pending-type-wallet-connect-transfer "WalletConnectTransfer") (def ^:const transaction-pending-type-wallet-connect-transfer "WalletConnectTransfer")
@@ -553,11 +554,21 @@
(def ^:const send-type-erc-721-transfer 6) (def ^:const send-type-erc-721-transfer 6)
(def ^:const send-type-erc-1155-transfer 7) (def ^:const send-type-erc-1155-transfer 7)
(def ^:const multi-transaction-type-send 0)
(def ^:const multi-transaction-type-approve 1)
(def ^:const multi-transaction-type-bridge 2)
(def ^:const multi-transaction-type-swap 3)
(def ^:const multi-transaction-type-unknown 255)
(def ^:const contract-function-signature-erc20-approve "approve(address,uint256)")
(def ^:const bridge-name-transfer "Transfer") (def ^:const bridge-name-transfer "Transfer")
(def ^:const bridge-name-erc-721-transfer "ERC721Transfer") (def ^:const bridge-name-erc-721-transfer "ERC721Transfer")
(def ^:const bridge-name-erc-1155-transfer "ERC1155Transfer") (def ^:const bridge-name-erc-1155-transfer "ERC1155Transfer")
(def ^:const bridge-name-hop "Hop") (def ^:const bridge-name-hop "Hop")
(def ^:const bridge-assets #{"ETH" "USDT" "USDC" "DAI"})
(def ^:const wallet-contract-type-uknown 0) (def ^:const wallet-contract-type-uknown 0)
(def ^:const wallet-contract-type-erc-20 1) (def ^:const wallet-contract-type-erc-20 1)
(def ^:const wallet-contract-type-erc-721 2) (def ^:const wallet-contract-type-erc-721 2)
@@ -46,6 +46,10 @@
(when (show-confirmation-modal? db) (when (show-confirmation-modal? db)
{:fx [[:dispatch {:fx [[:dispatch
[:show-bottom-sheet [:show-bottom-sheet
{:content (fn [] [modal-view]) {:content (fn [] [modal-view])
:shell? true}]]]}))) ;; When in the profiles screen do biometric auth after the metrics sheet is dismissed
;; https://github.com/status-im/status-mobile/issues/20932
:on-close (when (= (:view-id db) :screen/profile.profiles)
#(rf/dispatch [:profile.login/login-with-biometric-if-available
(get-in db [:profile/login :key-uid])]))
:shell? true}]]]})))
@@ -3,37 +3,61 @@
[legacy.status-im.utils.build :as build] [legacy.status-im.utils.build :as build]
[react-native.platform :as platform])) [react-native.platform :as platform]))
(defn user-journey-event (defn key-value-event
[action] [event-name val-key value]
{:metric {:metric
{:eventName "user-journey" {:eventName event-name
:platform platform/os :platform platform/os
:appVersion build/app-short-version :appVersion build/app-short-version
:eventValue {:action action}}}) :eventValue {val-key value}}})
(defn user-journey-event
[action]
(key-value-event "user-journey" :action action))
(defn navigation-event
[view-id]
(key-value-event "navigation" :viewId view-id))
(def ^:const app-started-event "app-started") (def ^:const app-started-event "app-started")
(def ^:const navigate-to-create-profile-event "navigate-to-create-profile")
(def ^:const communities-tab-clicked "communities-tab-clicked") (def ^:const view-ids-to-track
(def ^:const wallet-tab-clicked "wallet-tab-clicked") #{;; Tabs
(def ^:const chats-tab-clicked "chats-tab-clicked") :communities-stack
:chats-stack
:wallet-stack
;; Onboarding
:screen/onboarding.intro
:screen/onboarding.new-to-status
:screen/onboarding.sync-or-recover-profile
:screen/onboarding.enter-seed-phrase
:screen/onboarding.create-profile
:screen/onboarding.create-profile-password
:screen/onboarding.enable-biometrics
:screen/onboarding.generating-keys
:screen/onboarding.enable-notifications
:screen/onboarding.sign-in-intro
:screen/onboarding.sign-in
:screen/onboarding.syncing-progress
:screen/onboarding.syncing-progress-intro
:screen/onboarding.syncing-results
:screen/onboarding.welcome})
(defn track-view-id-event (defn track-view-id-event
[view-id] [view-id]
(case view-id (when (contains? view-ids-to-track view-id)
:communities-stack (user-journey-event communities-tab-clicked) (navigation-event (name view-id))))
:chats-stack (user-journey-event chats-tab-clicked)
:wallet-stack (user-journey-event wallet-tab-clicked)
nil))
(defn tracked-event (defn tracked-event
[[event-name second-parameter]] [[event-name second-parameter]]
(case event-name (case event-name
:onboarding/navigate-to-create-profile
(user-journey-event navigate-to-create-profile-event)
:profile/get-profiles-overview-success :profile/get-profiles-overview-success
(user-journey-event app-started-event) (user-journey-event app-started-event)
:centralized-metrics/toggle-centralized-metrics
(key-value-event "events.metrics-enabled" :enabled second-parameter)
:set-view-id :set-view-id
(track-view-id-event second-parameter) (track-view-id-event second-parameter)
@@ -5,31 +5,75 @@
[react-native.platform :as platform] [react-native.platform :as platform]
[status-im.contexts.centralized-metrics.tracking :as tracking])) [status-im.contexts.centralized-metrics.tracking :as tracking]))
(def platform-os platform/os)
(def app-version build/app-short-version)
(deftest key-value-event-test
(testing "creates correct key-value event"
(let [event-name "test-event"
val-key :test-key
value "test-value"
expected {:metric
{:eventName event-name
:platform platform-os
:appVersion app-version
:eventValue {val-key value}}}]
(is (= expected (tracking/key-value-event event-name val-key value))))))
(deftest user-journey-event-test (deftest user-journey-event-test
(testing "creates correct metric event" (testing "creates correct user journey event"
(let [action "some-action" (let [action "test-action"
expected {:metric {:eventName "user-journey" expected {:metric
:platform platform/os {:eventName "user-journey"
:appVersion build/app-short-version :platform platform-os
:eventValue {:action action}}}] :appVersion app-version
:eventValue {:action action}}}]
(is (= expected (tracking/user-journey-event action)))))) (is (= expected (tracking/user-journey-event action))))))
(deftest navigation-event-test
(testing "creates correct navigation event"
(let [view-id :test-view-id
expected {:metric
{:eventName "navigation"
:platform platform-os
:appVersion app-version
:eventValue {:viewId view-id}}}]
(is (= expected (tracking/navigation-event view-id))))))
(deftest track-view-id-event-test (deftest track-view-id-event-test
(testing "returns correct event for view-id" (testing "returns correct navigation event for view-id"
(is (= (tracking/user-journey-event tracking/communities-tab-clicked) (is (= {:metric
{:eventName "navigation"
:platform platform-os
:appVersion app-version
:eventValue {:viewId "communities-stack"}}}
(tracking/track-view-id-event :communities-stack))) (tracking/track-view-id-event :communities-stack)))
(is (= (tracking/user-journey-event tracking/chats-tab-clicked) (is (= {:metric
(tracking/track-view-id-event :chats-stack))) {:eventName "navigation"
(is (= (tracking/user-journey-event tracking/wallet-tab-clicked) :platform platform-os
(tracking/track-view-id-event :wallet-stack))) :appVersion app-version
:eventValue {:viewId "onboarding.create-profile"}}}
(tracking/track-view-id-event :screen/onboarding.create-profile)))
(is (nil? (tracking/track-view-id-event :unknown-stack))))) (is (nil? (tracking/track-view-id-event :unknown-stack)))))
(deftest tracked-event-test (deftest tracked-event-test
(testing "returns correct event for given inputs" (testing "returns correct event for given inputs"
(is (= (tracking/user-journey-event tracking/navigate-to-create-profile-event) (is (= {:metric
(tracking/tracked-event [:onboarding/navigate-to-create-profile]))) {:eventName "user-journey"
(is (= (tracking/user-journey-event tracking/app-started-event) :platform platform-os
:appVersion app-version
:eventValue {:action tracking/app-started-event}}}
(tracking/tracked-event [:profile/get-profiles-overview-success]))) (tracking/tracked-event [:profile/get-profiles-overview-success])))
(is (= (tracking/track-view-id-event :wallet-stack) (is (= {:metric
{:eventName "events.metrics-enabled"
:platform platform-os
:appVersion app-version
:eventValue {:enabled true}}}
(tracking/tracked-event [:centralized-metrics/toggle-centralized-metrics true])))
(is (= {:metric
{:eventName "navigation"
:platform platform-os
:appVersion app-version
:eventValue {:viewId "wallet-stack"}}}
(tracking/tracked-event [:set-view-id :wallet-stack]))) (tracking/tracked-event [:set-view-id :wallet-stack])))
(is (nil? (tracking/tracked-event [:unknown-event]))))) (is (nil? (tracking/tracked-event [:unknown-event])))))
@@ -33,3 +33,7 @@
(def drawer-message-container (def drawer-message-container
{:padding-top 4 {:padding-top 4
:padding-bottom 4}) :padding-bottom 4})
(def group-member-mention
{:flex-direction :row
:align-items :center})
@@ -126,14 +126,60 @@
:photo-path photo-path :photo-path photo-path
:incoming? (not= public-key from)}])) :incoming? (not= public-key from)}]))
(defn group-member
[literal]
(let [[primary-name _] (rf/sub [:contacts/contact-two-names-by-identity literal])
photo-path (rf/sub [:chats/photo-path literal])]
[rn/view {:style style/group-member-mention}
[quo/user-avatar
{:full-name primary-name
:profile-picture photo-path
:status-indicator? false
:size :xxxs
:ring? false}]
[quo/text
{:weight :semi-bold
:style {:margin-left 4}}
primary-name]]))
(defn resolve-group-system-message
[{:keys [children]}]
(reduce (fn [acc {:keys [type literal]}]
(if (= type "mention")
(conj acc [group-member literal])
(conj acc
[rn/view
[quo/text literal]])))
[:<>]
children))
(defn render-parsed-text
[content]
(reduce (fn [acc e]
(conj acc (resolve-group-system-message e)))
[quo/text]
(:parsed-text content)))
(defn group-system-message
[{:keys [chat-id timestamp-str content]} type]
(let [{:keys [customization-color]} (rf/sub [:contacts/contact-by-address chat-id])]
[quo/system-message
{:type type
:timestamp timestamp-str
:customization-color customization-color
:child (render-parsed-text content)}]))
(defn system-message-content (defn system-message-content
[{:keys [content-type quoted-message] :as message-data}] [{:keys [content-type quoted-message] :as message-data}]
(if quoted-message (if quoted-message
[pin/pinned-message message-data] [pin/pinned-message message-data]
(condp = content-type (condp = content-type
constants/content-type-system-text constants/content-type-system-text
[system.text/text-content message-data] [group-system-message message-data :group]
constants/content-type-system-pinned-message constants/content-type-system-pinned-message
[system.text/text-content message-data] [system.text/text-content message-data]
@@ -1,7 +1,5 @@
(ns status-im.contexts.chat.messenger.messages.link-preview.events (ns status-im.contexts.chat.messenger.messages.link-preview.events
(:require [camel-snake-kebab.core :as csk] (:require [camel-snake-kebab.core :as csk]
[status-im.common.json-rpc.events :as json-rpc]
[taoensso.timbre :as log]
[utils.collection] [utils.collection]
[utils.re-frame :as rf])) [utils.re-frame :as rf]))
@@ -35,17 +33,6 @@
{:fx [[:dispatch {:fx [[:dispatch
[:profile.settings/profile-update :link-preview-request-enabled (boolean enabled?)]]]})) [:profile.settings/profile-update :link-preview-request-enabled (boolean enabled?)]]]}))
(rf/reg-event-fx :chat.ui/link-preview-whitelist-received
(fn [{:keys [db]} [whitelist]]
{:db (assoc db :link-previews-whitelist whitelist)}))
(rf/reg-fx :chat.ui/request-link-preview-whitelist
(fn []
(json-rpc/call {:method "wakuext_getLinkPreviewWhitelist"
:params []
:on-success [:chat.ui/link-preview-whitelist-received]
:on-error #(log/error "Failed to get link preview whitelist")})))
(rf/reg-event-fx :chat.ui/enable-link-previews (rf/reg-event-fx :chat.ui/enable-link-previews
(fn [{{:profile/keys [profile]} :db} [site enabled?]] (fn [{{:profile/keys [profile]} :db} [site enabled?]]
(let [enabled-sites (if enabled? (let [enabled-sites (if enabled?
@@ -103,11 +103,11 @@
(models.contact/process-js-contacts cofx response-js) (models.contact/process-js-contacts cofx response-js)
(seq communities) (seq communities)
(let [communities-clj (types/js->clj communities)] (do
(js-delete response-js "communities") (js-delete response-js "communities")
(rf/merge cofx (rf/merge cofx
(process-next response-js sync-handler) (process-next response-js sync-handler)
(communities/handle-communities communities-clj))) (communities/handle-communities communities)))
(seq bookmarks) (seq bookmarks)
(let [bookmarks-clj (types/js->clj bookmarks)] (let [bookmarks-clj (types/js->clj bookmarks)]
@@ -26,7 +26,7 @@
"0xD" {:address "0xD" "0xD" {:address "0xD"
:operable? false :operable? false
:position 3 :position 3
:color :flamingo :color :pink
:emoji "🦩"}}) :emoji "🦩"}})
(def permissioned-accounts (def permissioned-accounts
@@ -22,7 +22,7 @@
airdrop-account (rf/sub [:communities/airdrop-account id]) airdrop-account (rf/sub [:communities/airdrop-account id])
revealed-accounts (rf/sub [:communities/accounts-to-reveal id]) revealed-accounts (rf/sub [:communities/accounts-to-reveal id])
revealed-accounts-count (count revealed-accounts) revealed-accounts-count (count revealed-accounts)
wallet-accounts-count (count (rf/sub [:wallet/operable-accounts-without-watched-accounts])) wallet-accounts-count (count (rf/sub [:wallet/operable-accounts]))
addresses-shared-text (if (= revealed-accounts-count wallet-accounts-count) addresses-shared-text (if (= revealed-accounts-count wallet-accounts-count)
(i18n/label :t/all-addresses) (i18n/label :t/all-addresses)
(i18n/label-pluralize (i18n/label-pluralize
@@ -57,19 +57,24 @@
:index index}) :index index})
(defn- members (defn- members
[items theme] [community-id chat-id theme]
[rn/section-list (let [online-members (rf/sub [:communities/chat-members-sorted community-id chat-id :online])
{:key-fn :public-key offline-members (rf/sub [:communities/chat-members-sorted community-id chat-id :offline])]
:content-container-style {:padding-bottom 20} [rn/section-list
:get-item-layout get-item-layout {:key-fn :public-key
:content-inset-adjustment-behavior :never :content-container-style {:padding-bottom 20}
:sections items :get-item-layout get-item-layout
:sticky-section-headers-enabled false :content-inset-adjustment-behavior :never
:render-section-header-fn contact-list/contacts-section-header :sections [{:title (i18n/label :t/online)
:render-section-footer-fn footer :data online-members}
:render-data {:theme theme} {:title (i18n/label :t/offline)
:render-fn contact-item :data offline-members}]
:scroll-event-throttle 32}]) :sticky-section-headers-enabled false
:render-section-header-fn contact-list/contacts-section-header
:render-section-footer-fn footer
:render-data {:theme theme}
:render-fn contact-item
:scroll-event-throttle 32}]))
(defn view (defn view
[] []
@@ -78,8 +83,6 @@
{:keys [description chat-name emoji muted chat-type color] {:keys [description chat-name emoji muted chat-type color]
:as chat} (rf/sub [:chats/chat-by-id chat-id]) :as chat} (rf/sub [:chats/chat-by-id chat-id])
pins-count (rf/sub [:chats/pin-messages-count chat-id]) pins-count (rf/sub [:chats/pin-messages-count chat-id])
items (rf/sub [:communities/sorted-community-members-section-list
community-id chat-id])
theme (quo.theme/use-theme)] theme (quo.theme/use-theme)]
(rn/use-mount (fn [] (rn/use-mount (fn []
(rf/dispatch [:pin-message/load-pin-messages chat-id]))) (rf/dispatch [:pin-message/load-pin-messages chat-id])))
@@ -133,4 +136,4 @@
(if muted (if muted
(home.actions/unmute-chat-action chat-id) (home.actions/unmute-chat-action chat-id)
(home.actions/mute-chat-action chat-id chat-type muted)))}]}]]] (home.actions/mute-chat-action chat-id chat-type muted)))}]}]]]
[members items theme]])) [members community-id chat-id theme]]))
@@ -54,7 +54,7 @@
:as item}] :as item}]
(let [user-selected? (rf/sub [:is-contact-selected? public-key]) (let [user-selected? (rf/sub [:is-contact-selected? public-key])
{:keys [id]} (rf/sub [:get-screen-params]) {:keys [id]} (rf/sub [:get-screen-params])
community-members-keys (set (keys (rf/sub [:communities/community-members id]))) community-members-keys (set (rf/sub [:communities/community-members id]))
community-member? (boolean (community-members-keys public-key)) community-member? (boolean (community-members-keys public-key))
on-toggle (fn [] on-toggle (fn []
(when-not community-member? (when-not community-member?
+26 -31
View File
@@ -2,7 +2,6 @@
(:require (:require
[clojure.string :as string] [clojure.string :as string]
[legacy.status-im.data-store.communities :as data-store.communities] [legacy.status-im.data-store.communities :as data-store.communities]
[legacy.status-im.mailserver.core :as mailserver]
[schema.core :as schema] [schema.core :as schema]
[status-im.constants :as constants] [status-im.constants :as constants]
[status-im.contexts.chat.messenger.messages.link-preview.events :as link-preview.events] [status-im.contexts.chat.messenger.messages.link-preview.events :as link-preview.events]
@@ -39,17 +38,6 @@
(rf/reg-event-fx :communities/handle-community handle-community) (rf/reg-event-fx :communities/handle-community handle-community)
(schema/=> handle-community
[:=>
[:catn
[:cofx :schema.re-frame/cofx]
[:args
[:schema [:catn [:community-js map?]]]]]
[:maybe
[:map
[:db [:map [:communities map?]]]
[:fx vector?]]]])
(rf/defn handle-removed-chats (rf/defn handle-removed-chats
[{:keys [db]} chat-ids] [{:keys [db]} chat-ids]
{:db (reduce (fn [db chat-id] {:db (reduce (fn [db chat-id]
@@ -84,10 +72,9 @@
(rf/defn handle-communities (rf/defn handle-communities
{:events [:community/fetch-success]} {:events [:community/fetch-success]}
[{:keys [db]} communities] [{:keys [db]} communities-js]
{:fx {:fx (map (fn [c] [:dispatch [:communities/handle-community c]])
(->> communities communities-js)})
(map #(vector :dispatch [:communities/handle-community %])))})
(rf/reg-event-fx :communities/request-to-join-result (rf/reg-event-fx :communities/request-to-join-result
(fn [{:keys [db]} [community-id request-id response-js]] (fn [{:keys [db]} [community-id request-id response-js]]
@@ -136,21 +123,30 @@
{} {}
categories))})) categories))}))
(rf/reg-event-fx :community/fetch-low-priority
(fn []
{:fx [[:json-rpc/call
[{:method "wakuext_checkAndDeletePendingRequestToJoinCommunity"
:params []
:js-response true
:on-success [:sanitize-messages-and-process-response]
:on-error #(log/info "failed to fetch communities" %)}
{:method "wakuext_collapsedCommunityCategories"
:params []
:on-success [:communities/fetched-collapsed-categories-success]
:on-error #(log/error "failed to fetch collapsed community categories" %)}]]]}))
(rf/reg-event-fx :community/fetch (rf/reg-event-fx :community/fetch
(fn [_] (fn [_]
{:json-rpc/call [{:method "wakuext_serializedCommunities" {:fx [[:json-rpc/call
:params [] [{:method "wakuext_serializedCommunities"
:on-success #(rf/dispatch [:community/fetch-success %]) :params []
:on-error #(log/error "failed to fetch communities" %)} :on-success [:community/fetch-success]
{:method "wakuext_checkAndDeletePendingRequestToJoinCommunity" :js-response true
:params [] :on-error #(log/error "failed to fetch communities" %)}]]
:js-response true ;; Dispatch a little after 1000ms because other higher-priority events
:on-success #(rf/dispatch [:sanitize-messages-and-process-response %]) ;; after login are being processed at the 1000ms mark.
:on-error #(log/info "failed to fetch communities" %)} [:dispatch-later [{:ms 1200 :dispatch [:community/fetch-low-priority]}]]]}))
{:method "wakuext_collapsedCommunityCategories"
:params []
:on-success #(rf/dispatch [:communities/fetched-collapsed-categories-success %])
:on-error #(log/error "failed to fetch collapsed community categories" %)}]}))
(defn update-previous-permission-addresses (defn update-previous-permission-addresses
[{:keys [db]} [community-id]] [{:keys [db]} [community-id]]
@@ -291,8 +287,7 @@
(when-let [community (first communities)] (when-let [community (first communities)]
{:db (-> db {:db (-> db
(assoc-in [:communities (:id community) :spectated] true)) (assoc-in [:communities (:id community) :spectated] true))
:fx [[:dispatch [:communities/handle-community community]] :fx [[:dispatch [:communities/handle-community community]]]}))
[:dispatch [::mailserver/request-messages]]]}))
(rf/reg-event-fx :chat.ui/spectate-community-success spectate-community-success) (rf/reg-event-fx :chat.ui/spectate-community-success spectate-community-success)
@@ -1,6 +1,5 @@
(ns status-im.contexts.communities.events-test (ns status-im.contexts.communities.events-test
(:require [cljs.test :refer [deftest is testing]] (:require [cljs.test :refer [deftest is testing]]
[legacy.status-im.mailserver.core :as mailserver]
matcher-combinators.test matcher-combinators.test
[status-im.contexts.chat.messenger.messages.link-preview.events :as link-preview.events] [status-im.contexts.chat.messenger.messages.link-preview.events :as link-preview.events]
[status-im.contexts.communities.events :as events])) [status-im.contexts.communities.events :as events]))
@@ -112,7 +111,7 @@
(testing "dispatch fxs for first community" (testing "dispatch fxs for first community"
(is (match? (is (match?
{:fx [[:dispatch [:communities/handle-community {:id community-id}]] {:fx [[:dispatch [:communities/handle-community {:id community-id}]]
[:dispatch [::mailserver/request-messages]]]} ]}
(events/spectate-community-success {} [{:communities [{:id community-id}]}]))))) (events/spectate-community-success {} [{:communities [{:id community-id}]}])))))
(testing "given empty community" (testing "given empty community"
(testing "do nothing" (testing "do nothing"
@@ -151,7 +150,7 @@
(-> effects :json-rpc/call first (select-keys [:method :params])))))))) (-> effects :json-rpc/call first (select-keys [:method :params]))))))))
(deftest handle-community-test (deftest handle-community-test
(let [community {:id community-id :clock 2}] (let [community #js {:id community-id :clock 2}]
(testing "given a unjoined community" (testing "given a unjoined community"
(let [effects (events/handle-community {} [community])] (let [effects (events/handle-community {} [community])]
(is (match? community-id (is (match? community-id
@@ -163,7 +162,7 @@
(filter some? (:fx effects)))))) (filter some? (:fx effects))))))
(testing "given a joined community" (testing "given a joined community"
(let [community (assoc community :joined true) (let [community #js {:id community-id :clock 2 :joined true}
effects (events/handle-community {} [community])] effects (events/handle-community {} [community])]
(is (match? (is (match?
[[:dispatch [[:dispatch
@@ -172,16 +171,19 @@
(filter some? (:fx effects)))))) (filter some? (:fx effects))))))
(testing "given a community with token-permissions-check" (testing "given a community with token-permissions-check"
(let [community (assoc community :token-permissions-check :fake-token-permissions-check) (let [community #js
{:id community-id :clock 2 :token-permissions-check :fake-token-permissions-check}
effects (events/handle-community {} [community])] effects (events/handle-community {} [community])]
(is (match? (is (match?
[[:dispatch [[:dispatch
[:communities/check-permissions-to-join-community-with-all-addresses community-id]]] [:communities/check-permissions-to-join-community-with-all-addresses community-id]]]
(filter some? (:fx effects)))))) (filter some? (:fx effects))))))
(testing "given a community with lower clock" (testing "given a community with lower clock"
(let [effects (events/handle-community {:db {:communities {community-id {:clock 3}}}} [community])] (let [effects (events/handle-community {:db {:communities {community-id {:clock 3}}}} [community])]
(is (nil? effects)))) (is (nil? effects))))
(testing "given a community without clock" (testing "given a community without clock"
(let [community (dissoc community :clock) (let [community #js {:id community-id}
effects (events/handle-community {} [community])] effects (events/handle-community {} [community])]
(is (nil? effects)))))) (is (nil? effects))))))
@@ -75,46 +75,51 @@
:banner (resources/get-image :discover) :banner (resources/get-image :discover)
:accessibility-label :communities-home-discover-card}}) :accessibility-label :communities-home-discover-card}})
(defn on-tab-change
[tab]
(rf/dispatch [:communities/select-tab tab]))
(defn view (defn view
[] []
(let [flat-list-ref (atom nil) (let [flat-list-ref (rn/use-ref-atom nil)
set-flat-list-ref #(reset! flat-list-ref %)] set-flat-list-ref (rn/use-callback #(reset! flat-list-ref %))
(fn [] theme (quo.theme/use-theme)
(let [theme (quo.theme/use-theme) customization-color (rf/sub [:profile/customization-color])
customization-color (rf/sub [:profile/customization-color]) selected-tab (or (rf/sub [:communities/selected-tab]) :joined)
selected-tab (or (rf/sub [:communities/selected-tab]) :joined) {:keys [joined pending opened]} (rf/sub [:communities/grouped-by-status])
{:keys [joined pending opened]} (rf/sub [:communities/grouped-by-status]) selected-items (case selected-tab
selected-items (case selected-tab :joined joined
:joined joined :pending pending
:pending pending :opened opened)
:opened opened) scroll-shared-value (reanimated/use-shared-value 0)
scroll-shared-value (reanimated/use-shared-value 0)] on-scroll (rn/use-callback
[:<> (fn [event]
(if (empty? selected-items) (common.banner/set-scroll-shared-value
[common.empty-state/view {:scroll-input (oops/oget event
{:selected-tab selected-tab "nativeEvent.contentOffset.y")
:tab->content (empty-state-content theme)}] :shared-value scroll-shared-value})))]
[reanimated/flat-list [:<>
{:ref set-flat-list-ref (if (empty? selected-items)
:key-fn :id [common.empty-state/view
:content-inset-adjustment-behavior :never {:selected-tab selected-tab
:header [common.header-spacing/view] :tab->content (empty-state-content theme)}]
:render-fn item-render [reanimated/flat-list
:style {:margin-top -1} {:ref set-flat-list-ref
:data selected-items :key-fn :id
:scroll-event-throttle 8 :content-inset-adjustment-behavior :never
:content-container-style {:padding-bottom :header [common.header-spacing/view]
jump-to.constants/floating-shell-button-height} :render-fn item-render
:on-scroll #(common.banner/set-scroll-shared-value :style {:margin-top -1}
{:scroll-input (oops/oget :data selected-items
% :scroll-event-throttle 8
"nativeEvent.contentOffset.y") :content-container-style {:padding-bottom
:shared-value scroll-shared-value})}]) jump-to.constants/floating-shell-button-height}
[:f> common.banner/animated-banner :on-scroll on-scroll}])
{:content banner-data [common.banner/animated-banner
:customization-color customization-color {:content banner-data
:scroll-ref flat-list-ref :customization-color customization-color
:tabs tabs-data :scroll-ref flat-list-ref
:selected-tab selected-tab :tabs tabs-data
:on-tab-change (fn [tab] (rf/dispatch [:communities/select-tab tab])) :selected-tab selected-tab
:scroll-shared-value scroll-shared-value}]])))) :on-tab-change on-tab-change
:scroll-shared-value scroll-shared-value}]]))
@@ -109,3 +109,22 @@
[pairings] [pairings]
(keycard/set-pairings pairings)) (keycard/set-pairings pairings))
(rf/reg-fx :effects.keycard/set-pairing-to-keycard set-pairing-to-keycard) (rf/reg-fx :effects.keycard/set-pairing-to-keycard set-pairing-to-keycard)
(defn sign
[{:keys [on-success on-failure] :as args}]
(log/debug "[keycard] sign")
(keycard/sign
(assoc
args
:on-success
(fn [response]
(log/debug "[keycard response succ] sign")
(when on-success
(on-success (transforms/js->clj response))))
:on-failure
(fn [response]
(log/warn "[keycard response fail] sign"
(error-object->map response))
(when on-failure
(on-failure (error-object->map response)))))))
(rf/reg-fx :effects.keycard/sign sign)
@@ -3,6 +3,8 @@
status-im.contexts.keycard.login.events status-im.contexts.keycard.login.events
status-im.contexts.keycard.pin.events status-im.contexts.keycard.pin.events
status-im.contexts.keycard.sheet.events status-im.contexts.keycard.sheet.events
status-im.contexts.keycard.sign.events
[status-im.contexts.keycard.utils :as keycard.utils]
[taoensso.timbre :as log])) [taoensso.timbre :as log]))
(rf/reg-event-fx :keycard/on-check-nfc-enabled-success (rf/reg-event-fx :keycard/on-check-nfc-enabled-success
@@ -55,3 +57,19 @@
(fn [{:keys [db]} [{:keys [on-cancel-event-vector]}]] (fn [{:keys [db]} [{:keys [on-cancel-event-vector]}]]
(log/debug "[keycard] nfc started success") (log/debug "[keycard] nfc started success")
{:db (assoc-in db [:keycard :on-nfc-cancelled-event-vector] on-cancel-event-vector)})) {:db (assoc-in db [:keycard :on-nfc-cancelled-event-vector] on-cancel-event-vector)}))
(rf/reg-event-fx :keycard/on-action-with-pin-error
(fn [{:keys [db]} [error]]
(log/debug "[keycard] get keys error: " error)
(let [tag-was-lost? (keycard.utils/tag-lost? (:error error))
pin-retries-count (keycard.utils/pin-retries (:error error))]
(if tag-was-lost?
{:db (assoc-in db [:keycard :pin :status] nil)}
(if (nil? pin-retries-count)
{:effects.utils/show-popup {:title "wrong-keycard"}}
{:db (-> db
(assoc-in [:keycard :application-info :pin-retry-counter] pin-retries-count)
(update-in [:keycard :pin] assoc :status :error))
:fx [[:dispatch [:keycard/hide-connection-sheet]]
(when (zero? pin-retries-count)
[:effects.utils/show-popup {:title "frozen-keycard"}])]})))))
@@ -3,22 +3,6 @@
[taoensso.timbre :as log] [taoensso.timbre :as log]
[utils.re-frame :as rf])) [utils.re-frame :as rf]))
(rf/reg-event-fx :keycard.login/on-get-keys-error
(fn [{:keys [db]} [error]]
(log/debug "[keycard] get keys error: " error)
(let [tag-was-lost? (keycard.utils/tag-lost? (:error error))
pin-retries-count (keycard.utils/pin-retries (:error error))]
(if tag-was-lost?
{:db (assoc-in db [:keycard :pin :status] nil)}
(if (nil? pin-retries-count)
{:effects.utils/show-popup {:title "wrong-keycard"}}
{:db (-> db
(assoc-in [:keycard :application-info :pin-retry-counter] pin-retries-count)
(update-in [:keycard :pin] assoc :status :error))
:fx [[:dispatch [:keycard/hide-connection-sheet]]
(when (zero? pin-retries-count)
[:effects.utils/show-popup {:title "frozen-keycard"}])]})))))
(rf/reg-event-fx :keycard.login/on-get-keys-success (rf/reg-event-fx :keycard.login/on-get-keys-success
(fn [{:keys [db]} [data]] (fn [{:keys [db]} [data]]
(let [{:keys [key-uid encryption-public-key (let [{:keys [key-uid encryption-public-key
@@ -56,28 +40,25 @@
:key-uid key-uid}]]})))) :key-uid key-uid}]]}))))
(rf/reg-event-fx :keycard.login/on-get-application-info-success (rf/reg-event-fx :keycard.login/on-get-application-info-success
(fn [{:keys [db]} [application-info]] (fn [{:keys [db]} [application-info {:keys [key-uid on-read-fx]}]]
(let [profile (get-in db [:profile/profiles-overview (get-in db [:profile/login :key-uid])]) (let [error (keycard.utils/validate-application-info key-uid application-info)]
pin (get-in db [:keycard :pin :text])
error (keycard.utils/validate-application-info profile application-info)]
(if error (if error
{:effects.utils/show-popup {:title (str error)}} {:effects.utils/show-popup {:title (str error)}}
{:db (-> db {:db (-> db
(assoc-in [:keycard :application-info] application-info) (assoc-in [:keycard :application-info] application-info)
(assoc-in [:keycard :pin :status] :verifying)) (assoc-in [:keycard :pin :status] :verifying))
:effects.keycard/get-keys {:pin pin :fx on-read-fx}))))
:on-success #(rf/dispatch [:keycard.login/on-get-keys-success %])
:on-failure #(rf/dispatch [:keycard.login/on-get-keys-error %])}}))))
(rf/reg-event-fx :keycard.login/cancel-reading-card (rf/reg-event-fx :keycard.login/cancel-reading-card
(fn [{:keys [db]}] (fn [{:keys [db]}]
{:db (assoc-in db [:keycard :on-card-connected-event-vector] nil)})) {:db (assoc-in db [:keycard :on-card-connected-event-vector] nil)}))
(rf/reg-event-fx :keycard/read-card-and-login (rf/reg-event-fx :keycard/read-card
(fn [{:keys [db]}] (fn [{:keys [db]} [args]]
(let [connected? (get-in db [:keycard :card-connected?]) (let [connected? (get-in db [:keycard :card-connected?])
event-vector [:keycard/get-application-info event-vector [:keycard/get-application-info
{:on-success #(rf/dispatch [:keycard.login/on-get-application-info-success %])}]] {:on-success #(rf/dispatch [:keycard.login/on-get-application-info-success %
args])}]]
(log/debug "[keycard] proceed-to-login") (log/debug "[keycard] proceed-to-login")
{:db (assoc-in db [:keycard :on-card-connected-event-vector] event-vector) {:db (assoc-in db [:keycard :on-card-connected-event-vector] event-vector)
:fx [[:dispatch :fx [[:dispatch
@@ -9,13 +9,17 @@
(assoc-in [:keycard :pin :text] (.slice pin 0 -1)) (assoc-in [:keycard :pin :text] (.slice pin 0 -1))
(assoc-in [:keycard :pin :status] nil))})))) (assoc-in [:keycard :pin :status] nil))}))))
(rf/reg-fx :effects.keycard.pin/dispatch-on-complete
(fn [[on-complete new-pin]]
(on-complete new-pin)))
(rf/reg-event-fx :keycard.pin/number-pressed (rf/reg-event-fx :keycard.pin/number-pressed
(fn [{:keys [db]} [number max-numbers on-complete-event]] (fn [{:keys [db]} [number max-numbers on-complete]]
(let [pin (get-in db [:keycard :pin :text]) (let [pin (get-in db [:keycard :pin :text])
new-pin (str pin number)] new-pin (str pin number)]
(when (<= (count new-pin) max-numbers) (when (<= (count new-pin) max-numbers)
{:db (-> db {:db (-> db
(assoc-in [:keycard :pin :text] new-pin) (assoc-in [:keycard :pin :text] new-pin)
(assoc-in [:keycard :pin :status] nil)) (assoc-in [:keycard :pin :status] nil))
:fx [(when (= (dec max-numbers) (count pin)) :fx [(when (and on-complete (= (dec max-numbers) (count pin)))
[:dispatch [on-complete-event]])]})))) [:effects.keycard.pin/dispatch-on-complete [on-complete new-pin]])]}))))
+2 -2
View File
@@ -6,7 +6,7 @@
[utils.re-frame :as rf])) [utils.re-frame :as rf]))
(defn auth (defn auth
[callback-event-key] [{:keys [on-complete]}]
(let [{:keys [text status]} (rf/sub [:keycard/pin]) (let [{:keys [text status]} (rf/sub [:keycard/pin])
pin-retry-counter (rf/sub [:keycard/pin-retry-counter]) pin-retry-counter (rf/sub [:keycard/pin-retry-counter])
error? (= status :error)] error? (= status :error)]
@@ -23,4 +23,4 @@
{:delete-key? true {:delete-key? true
:on-delete #(rf/dispatch [:keycard.pin/delete-pressed]) :on-delete #(rf/dispatch [:keycard.pin/delete-pressed])
:on-press #(rf/dispatch [:keycard.pin/number-pressed % constants/pincode-length :on-press #(rf/dispatch [:keycard.pin/number-pressed % constants/pincode-length
callback-event-key])}]])) on-complete])}]]))

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