Compare commits

...
Author SHA1 Message Date
Siddarth Kumar 3c2bc328e8 chore: patch RN to use my fork of hermes 2024-01-25 15:58:52 +05:30
mmilad75 ed7463132a The collectibles are not supported on Optimism and Arbitrum #18507 (#18562)
* add chain id to the request

* add tests

* fix lint issues

* remove OPENSEA_API_KEY

* move subscription to a helper method for chain-ids
2024-01-24 19:17:08 +03:30
Brian Sztamfater d20f10cf8b fix: fix slide button padding on transaction confirmation page (#18585)
Signed-off-by: Brian Sztamfater <brian@status.im>
2024-01-24 10:40:53 -03:00
Brian Sztamfater ebbae051bd fix: fix button color on input amount screen (#18572)
Signed-off-by: Brian Sztamfater <brian@status.im>
2024-01-24 10:27:00 -03:00
mmilad75 521f39b6fb No ability to enter/paste assets exceeds the users's balance #18526 (#18599)
* change functionality

* fix handle-swap

* fix lint issues

* update tests

* change error to error?

* change reset-input-error

* update tests

* fix lint issues
2024-01-24 16:37:47 +03:30
Siddarth Kumar ee1f93defb fix: xcbeautify usage without omitting crucial logs (#18605)
## Summary

I introduced `xcbeautify` inside `make run-ios` command which would sometimes skip spitting crucial logs to the terminal.
In cases where the `react-native-cli` would prompt me of a port being used by another metro server, those prompts would also never reach me since they were piped into `xcbeautify` essentially giving me the impression that `make run-ios` is still doing something when it was actually hung.

This is how `react-native-community/cli` looks for `xcbeautify` ->
https://github.com/react-native-community/cli/blob/main/packages/cli-platform-apple/src/commands/buildCommand/buildProject.ts#L139

This commit fixes the problem by exporting an env variable making `react-native-cli` aware that we have `xcbeautify` installed and this way we now get the full log output we were used to.
2024-01-24 15:28:42 +05:30
John Ngei 3665fe26da fixed: mute-icon when channel is muted 2024-01-24 00:25:16 +01:00
John Ngei 3ec7209fcc Update default wallet name
* updated default wallet name to 'Account 1'

https://github.com/status-im/status-go/compare/ea3e59ff...64c8ce2e

* updated status go
2024-01-23 23:44:47 +01:00
Paul FitzgeraldandAjay Sivan 195826a7f4 chore(quo): add component list item - network list to design system (#18547)
---------

Co-authored-by: Ajay Sivan <ajayesivan@gmail.com>
2024-01-23 11:41:20 -08:00
Ibrahem KhalilandYevheniia Berdnyk 5bb4f3632a [17514] Use OS emojis in emoji picker (#18397)
---------

Co-authored-by: Yevheniia Berdnyk <ie.berdnyk@gmail.com>
2024-01-23 14:41:43 +02:00
Mohamed Javid 4fe62553ca Wallet - Refresh tokens and prices (#18456)
This commit adds

- RPC call for start wallet which will signal the client to refresh data (tokens, prices, ...etc) every 10 minutes
- Refreshes tokens and prices every 10 minutes on receiving the "wallet-tick-reload" signal

---------

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2024-01-23 17:59:29 +05:30
BalogunofAfrica cb586c8676 fix: make identifier carousel swipe-able (#18515) 2024-01-23 12:25:03 +01:00
Ibrahem Khalil fd50e4281c Add scroll view to profile tab (#18448) 2024-01-23 12:52:34 +02:00
Ulises Manuel dcbb080217 [#18458] Token input fixes (#18520)
* Add custom keyboard to token-input preview
* Fix token input flickering
2024-01-22 20:01:00 -06:00
Parvesh Monu 97d1b3faa1 fix cannot add existing ENS owned by user (#18567) 2024-01-23 04:42:56 +05:30
Nikolay 9c322397a2 chore(wallet): remove account confirmation UI (#18518) 2024-01-22 10:00:07 -08:00
Mohsen ca2b1d5c8e fix: remove quo preview from nightly builds (#18556) 2024-01-22 19:08:34 +03:30
Jamie Caprani 9a4bc7e250 feat(wallet): connect backend to transaction progress page (#18506) 2024-01-22 14:40:13 +00:00
Paul Fitzgerald c6dbfb6244 chore: add background color gradient to share qr code component (#18503) 2024-01-22 06:08:43 -08:00
Omar Basem 826ab6625e Wallet: token input conversion (#18539)
Wallet: token input conversion
2024-01-20 10:23:19 +04:00
Ulises Manuel a9ec2ca7ba Add support to display token images in token gated communities (#18174) 2024-01-19 20:51:50 -06:00
Parvesh Monu 1e11edc442 Remove last reagent atom from messages/view file (#18551) 2024-01-19 21:41:02 +05:30
codemaster bf8461f007 fix: wrong navigation bar color in transparent screens (#18451) 2024-01-19 07:19:58 -08:00
Mohamed Javid 5926426672 [Fix] Currency symbol on recovered profile (#18433)
This commit fixes the currency symbol not shown on the recovered profile.

--

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2024-01-19 20:03:28 +05:30
yqrashawn e871357b67 refactor: move perm/airdrop addrs into community (#18571)
Signed-off-by: yqrashawn <namy.19@gmail.com>
2024-01-19 20:44:17 +08:00
Omar Basem 9f5e53cc63 wallet: fix address inconsistencies (#18558)
wallet: fix address inconsistencies
2024-01-19 15:45:17 +04:00
yqrashawn 61c0650cec fix: do not show community view until it's loaded (#18570) 2024-01-19 16:36:14 +08:00
Omar Basem 7cc570b6d0 wallet: fix route test net (#18553)
wallet: fix route test net
2024-01-19 07:47:37 +04:00
Brian Sztamfater e609e2ff6a fix: crash when selecting a collectible (#18541)
Signed-off-by: Brian Sztamfater <brian@status.im>
2024-01-18 16:05:09 -03:00
Alexander f8cdb3bd7b Style fix (#18191) 2024-01-18 16:23:42 +01:00
yqrashawn fe9a4eac59 feat: re-fetch community info in community overview and channel (#18465)
Signed-off-by: yqrashawn <namy.19@gmail.com>
2024-01-18 22:05:31 +08:00
frank d934dc26ef Remove the invocation of wakuext_chatMentionReplaceWithPublicKey (#18533) 2024-01-18 21:33:37 +08:00
Mohamed Javid ed3cb42572 Wallet - Add token filter and prices fallback for fiat amount calculation (#18398)
This commit:

- Adds a filter to remove tokens with no name or symbol to prevent displaying tokens with no data
- Adds a fallback value (zero) for token fiat value calculation and to prevent crash on token price calculation

---------

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2024-01-18 15:16:00 +05:30
John Ngei 8a4302c85a fixed: incorrect space between name and message card in selected message item 2024-01-18 00:59:18 +01:00
Ajay Sivan c888c512a2 Communities: Share airdrop address (#18505) 2024-01-17 10:23:20 -08:00
Lungu Cristian 72bf8a8702 fix: composer size when re-entering with unfinished multiline message (#18089)
fix: composer space when expanding after re-entering

fix: composer bottom shadow and maximized state atom

fix: removing composer bottom gradient style changes
2024-01-17 13:24:13 +02:00
mmilad75 49e9b4212b Wallet - Account switcher - add Share Account functionality #18376 (#18444)
* add share account functionality

* add share qr code address functionality

* rename file

* finalize code

* move logic to events and effects

* fix lint issues

* resolve comments

* change translation
2024-01-17 14:12:35 +03:30
Omar Basem 19aa78cc81 Wallet: loading networks (#18491)
Wallet: loading networks
2024-01-17 13:57:02 +04:00
John Ngei 02b8d2140a fixed: spacing between the header and illustration on biometrics page 2024-01-16 22:02:20 +01:00
Siddarth Kumar 72d8c4446f chore: tiny Makefile fixes (#18521)
Here we remove `yarn install` from `make component-test` and  `make component-test-watch` commands.
We also fix an extra `@` present ahead of `@scripts/check-metro-shadow-process.sh` inside `component-test-watch` command.
2024-01-16 23:30:42 +05:30
Siddarth Kumar 09bf6673cf chore: upgrade kotlinPluginVersion to 1.9.0 (#18487)
### Summary

We need to bump `kotlin` Plugin version to `1.9.0` because the `nixpkgs` upgrade will set default `gradle` version to `8.4`.
`gradle` version `8.4` comes with a base `kotlin` version of `1.9.0` which becomes incompatible with our existing version of `1.7`

Otherwise we get errors like this :

```
e: /Users/siddarthkumar/code/experiments/status-mobile/node_modules/@react-native/
gradle-plugin/src/main/kotlin/com/facebook/react/utils/TaskUtils.kt: (25, 7): Class
'kotlin.collections.CollectionsKt__CollectionsKt' was compiled with an incompatible version of Kotlin.
The binary version of its metadata is 1.9.0, expected version is 1.7.1.
The class is loaded from /nix/store/3a228ppiiljfvsrxyq15h25chmiwsmbh-gradle-8.4/lib/gradle/lib/
kotlin-stdlib-1.9.10.jar!/kotlin/collections/CollectionsKt__CollectionsKt.class
.
.
.
```

needed for https://github.com/status-im/status-mobile/pull/18321

In this commit we set `kotlinPluginVersion` to `1.9.0` and update `gradle` dependencies.

#### Platforms
- Android
2024-01-16 21:18:15 +05:30
Brian Sztamfater 455a739318 feat: enable sending erc20 tokens (#18481)
Signed-off-by: Brian Sztamfater <brian@status.im>
2024-01-16 12:02:31 -03:00
Brian Sztamfater ac07109e86 feat: prepare events for sending collectible (#18473)
Signed-off-by: Brian Sztamfater <brian@status.im>
2024-01-16 11:48:46 -03:00
Parvesh Monu 248996ce6f Organize composer worklets (#18528) 2024-01-16 19:01:07 +05:30
yqrashawn a2bf23cc12 fix: handle deep link too early when onboarding (#18363) 2024-01-16 16:08:07 +08:00
Ulises Manuel 0fd7a4b581 Fix summary-tag style (#18474) 2024-01-15 20:42:05 -06:00
Jamie CapraniandPaul Fitzgerald 8d3883c709 feat(communities) enable user to share community channel (#18516)
Co-authored-by: Paul Fitzgerald <paulfitz99@gmail.com>
2024-01-15 12:16:42 -08:00
Omar Basem 8a16017859 Wallet: send token from drawer (#18429)
* feat: send token drawer
2024-01-15 20:57:55 +04:00
Omar Basem fa9b6edd30 Wallet: select-send-address event (#18501)
* Wallet: select-send-address event
2024-01-15 20:21:38 +04:00
Jamie CapraniandPaul Fitzgerald 3e787ff112 feat(shell): add share qr wallet accounts feature(#18511)
Co-authored-by: Paul Fitzgerald <paulfitz99@gmail.com>
2024-01-15 06:39:48 -08:00
Siddarth Kumar 92dcd1140b refactor native modules into separate modules (#18385)
The native module : `react-native-status` has always been 1 big fat file per platform which contained all of the native modules.

In case of Android it was `StatusModule.java`
This commit modularises it & attempts to thin out this 1 big file into these categories:
- `AccountManager.java`
- `EncryptionUtils.java`
- `DatabaseManager.java`
- `UIHelper.java`
- `LogManager.java`
- `NetworkManager.java`
- `Utils.java`

In case of iOS it was `RCTStatus.m`
This commit modularises it & attempts to thin out this 1 big file into these categories:
- `AccountManager.m`
- `EncryptionUtils.m`
- `DatabaseManager.m`
- `UIHelper.m`
- `LogManager.m`
- `NetworkManager.m`
- `Utils.m`

In this commit we also remove a lot of unused native code which has no reference on cljs side.
2024-01-15 18:57:35 +05:30
Anton Iakimov 36168256bf ci: don't fail on Diawi upload failure 2024-01-15 11:43:19 +01:00
John Ngei 6aa981d4a7 fixed dark border around the community logo on community page
This PR removes the dark border around the community logo on communities page 
reproducible only when the user has not yet joined the community
2024-01-12 18:37:23 +01:00
Ulises Manuel e3ab270933 #[16978] Select collectible to send (#18404)
* Show collectibles to send and add filter capabilities

Additionally,
* Replace the sub `:wallet/collectibles-per-account` by `:wallet/current-viewing-account-collectibles` since 
    it was only used for the current viewing account and simplified the code.
* Refactor the select-asset view.
* Generalize collectibles-tab view
* Add translations for "not found" state
2024-01-12 11:14:39 -06:00
flexsurfer 4165565956 fix subs leak (#18480) 2024-01-12 16:12:10 +01:00
Siddarth Kumar 57ee5cb654 fix: resolve to metro version which fixes crashes (#18475)
### Summary

Metro server often crashes with 
```
status-mobile/node_modules/nullthrows/nullthrows.js:9
  throw error;
  ^

Error: Got unexpected null
```

This commit resolves metro to a commit where this specific issue was fixed.
related PR in metro repo : https://github.com/facebook/metro/pull/1083
2024-01-12 20:32:31 +05:30
Ulises Manuel 5cc027a1f5 [#18461] Update guideline about apply-animations-to-style (#18462) 2024-01-11 19:17:07 -06:00
Icaro Motta a14e228e3a Fix: add back missing clj-kondo config files (#18472)
Fix our issues with auto-generated clj-kondo config files.

- To be extra precise, we now exclude ".clj-kondo/*" from being processed by
  clojure-lsp clean-ns.
- Formatted the .zprintrc file.

Fixes https://github.com/status-im/status-mobile/issues/17947
2024-01-11 20:19:55 -03:00
Icaro Motta 7e2c7abf30 Fix: incorrect props passed to RN's style prop (#18435)
Fix 3 errors in the onboarding screen about unsupported props passed to the style prop.

1x ERROR  Warning: Failed prop type: Invalid props.style key resizeMethod supplied to Image.
2x ERROR  Warning: Failed prop type: Invalid props.style key size supplied to Text.

Related guideline:
https://github.com/status-im/status-mobile/blob/563f1c588d1cdac31629da009a1c894133038d2d/doc/new-guidelines.md#dont-define-properties-in-styles-ns
2024-01-11 20:10:04 -03:00
Omar Basem ec2b95c370 Fix: Asset decimals on select asset screen (#18427)
* fix: assets decimals
2024-01-11 20:44:20 +04:00
Parvesh Monu 623d4a1476 fix improper use of current-chat-id and rename subs (#18389) 2024-01-11 17:20:37 +05:30
Roman Volosovskyi 09408e7811 Reanimate RPC stats screen 2024-01-11 11:04:07 +01:00
Siddarth Kumar 4eff9cc39c fix: don't show trace message when default is set (#18464)
`getEnvWithDefault.nix` prints a trace message in console when a default value is not set. 

In this commit we add a check to see if default value matches the value of that env var.
Otherwise we get log messages like these when running `make run-ios`

```
trace: getEnvWithDefault IOS_STATUS_GO_TARGETS 
(default: ios/arm64;iossimulator/amd64): ios/arm64;iossimulator/amd64
trace: getEnvWithDefault IOS_STATUS_GO_TARGETS 
(default: ios/arm64;iossimulator/amd64): ios/arm64;iossimulator/amd64
```

We also fix a tiny mistake in `make run-ios` status-go target by updating the delimiter to be a semi-colon instead of a comma.
2024-01-11 14:57:28 +05:30
Ulises Manuel 0f43daa836 [#18362] Add support for Reanimated inline styles in Reagent (#18381)
* Modify reanimated/view to support vectors contained in styles
* Add code examples of animated inline styles

Additionally,
*  Fix warning about reactive deref not supported in lazy-seqs
2024-01-10 20:09:32 -06:00
Siddarth Kumar fdfc06d6dd fix: random local make-run ios failures (#18446)
In this commit we build iOS `status-go` for both targets `amd64` and for `arm64` otherwise we get random failures when running `make run-ios`.
Maybe this was an impact of Xcode Upgrade Or RN Upgrade or MacOS Upgrade, it is not clear at the moment.
This will increase the time it took for iOS to be built locally, but it is better to be slow rather than have random build failures.
2024-01-10 22:25:08 +05:30
Brian Sztamfater 162c6dbf89 fix: route not found when attempting to transfer assets to additional eth account (#18325)
Signed-off-by: Brian Sztamfater <brian@status.im>
2024-01-10 12:49:45 -03:00
mmilad75andJamie Caprani da03989c88 Implement about tab on collectible page (#18269)
* add basics

* finalize component

* fix lint issues

* move color to props

* move variants to props

* change file structure

* working

* finalize loader

* fix lint issues

* fix style issues

* add tabs structure

* add basics

* draft codes

* draft

* make codes work after rebase

* fix lint issues

* remove Permissions tab

* revert codes

* finalize code

* fix lint issues

* revert podfile.lock

* create new reg-sub for traits and chain-id

* add real title and description for about tab

* resolve comments

* fix overview tab

* add tests

* resolve comments

---------

Co-authored-by: Jamie Caprani <jamiecaprani@gmail.com>
2024-01-10 18:47:07 +03:30
Yevheniia Berdnyk 433be1daef e2e: fixes 10.01 2024-01-10 16:10:31 +02:00
Mohamed Javid 5a707c0dca Wallet - Initialize event, refactor networks data and bug fix (#18374)
This commit:

- Introduces new event ":wallet/initialize" to group events that need to be called on login
- Refactors wallet networks to use the nested structure in re-frame
- Fixes a bug when updating the testnet network preferences of an account the production network preferences update

---------

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2024-01-10 18:47:24 +05:30
jakub eb53bbe4ec ci: fix handling of Android builds on Apple ARM64
Now that this PR has been merged:

* https://github.com/status-im/status-mobile/pull/16237

We need to handle ARM using an override.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2024-01-10 13:05:40 +01:00
jakub 257b0684ef nix: fix regex in clean.sh script
Repo used to be called `status-react`.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2024-01-10 13:05:39 +01:00
Parvesh Monu 425ef64901 Refactor compose (#18339)
- Removed show-floating-scroll-down-button? reagent atom
- Created event for scroll-to-bottom-fn
- Renamed chat.ui/close-chat
2024-01-10 13:53:35 +05:30
Omar Basem 0e4c1b3c17 refactor: kotlinify log (#18337)
refactor: kotlinify log
2024-01-10 09:05:35 +04:00
Ajay Sivan 1eb9e87383 Move selected addresses for permissions to app db (#18430) 2024-01-09 19:45:17 -08:00
yqrashawn 61b0a2ecac fix: profile screen initial avatar alignment (#18426)
https://github.com/status-im/status-go/compare/debfe1ca...debfe1ca

Signed-off-by: yqrashawn <namy.19@gmail.com>
2024-01-10 10:34:54 +08:00
frank 78576f4aeb fix: mark all notifications as read not work (#18107) 2024-01-10 10:04:49 +08:00
Ibrahem Khalil 9ff70ed990 Add internal-link component for #17116 (#18109) 2024-01-09 14:31:00 +02:00
Ibrahem Khalil 6d5ef17a31 Drop clj-kondo dir from linting (#18328) 2024-01-09 14:19:30 +02:00
Omar Basem 504d92fd57 Wallet: suggested routes list (#18388)
* wallet: suggested routes list
2024-01-09 15:12:11 +04:00
Omar Basem 3ff6013127 kotlinify thread pool (#18366)
chore: Kotlinify thread pool
2024-01-09 14:35:39 +04:00
Lungu Cristian fb13c3016d Biometrics in new settings (#18258)
* feat: added biometrics setting to new-settings

* fix: fix renaming issues from status-im2

* ref: addressed @cammellos' review comments

* fix: open password settings in a modal

* ref: addressed review comments

* fix: disabling biometric clears auth-method from keychain

* chore: quo/overlay seqs the childrend so need to add keys

* fix: don't pass the password unmasked between events to avoid leaks
2024-01-09 10:25:40 +02:00
Yevheniia Berdnyk 4c4ba97308 e2e: added check for deleted 1-1 chat history 2024-01-08 21:49:20 +02:00
Siddarth Kumar f992f4addd fix: boost checksum issue due to jfrog (#18434)
I tried doing a clean pod install and was faced with this : 

```
Installing Yoga (1.14.0)
Installing boost (1.76.0)

[!] Error installing boost
Verification checksum was incorrect, expected 
f0397ba6e982c4450f27bf32a2a83292aba035b827a5623a14636ea583318c41, got 
5e89103d9b70bba5c91a794126b169cb67654be2051f90cf7c22ba6893ede0ff
```

related issue in react-native repo : https://github.com/facebook/react-native/issues/42180 

In this commit we patch the pod specs provided by react native to rely on `sourceforge` instead `jfrog` to get boost.
2024-01-08 23:55:36 +05:30
Mohsen b4d27d287a feat: implement edit profile and change name (#18270) 2024-01-08 18:27:07 +03:00
Parvesh Monu fb58d7205e Add dispatch-and-chill to navigation events (#18372) 2024-01-08 19:59:01 +05:30
Parvesh Monu 0208224741 fix delayed display of top bar in chat after sending messages (#18300) 2024-01-08 18:12:07 +05:30
Shivek Khurana b3a2f397f9 🔗 Enable explorer links in wallet->about (#18406) 2024-01-08 12:00:41 +00:00
jakub 5915dd42bd ci: upgrade CI hosts to Xcode 15.1
https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes
https://developer.apple.com/documentation/xcode-release-notes/xcode-15_0_1-release-notes
https://developer.apple.com/documentation/xcode-release-notes/xcode-15_1-release-notes

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2024-01-07 22:24:35 +01:00
Mohamed Javid a00e44d056 Show aggregated tokens and balance in Wallet home (#18275)
This commit adds the feature to show aggregated tokens and balances in the Wallet home.

---------

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2024-01-06 00:36:54 +05:30
Icaro Motta b4640dabb9 Run integration tests separately from unit tests (#18304)
- make test still exists, so if you have been using it, as well as make
  test-watch, they should all work exactly the same.
- [Changed] As part of the check stage, Jenkins will run Lint and Unit Tests
  in parallel. Integration Tests run later because running them at the same
  time as Unit Tests caused errors.
- [Added] "make unit-test" and "make unit-test-watch" run unit tests only.
  Watching all unit tests is faster now because we ignore integration tests and
  we only compile shadow-cljs :mock target once. We are at approximately 10-15s
  to re-run all unit tests after saving a watched file, depending on your
  hardware. If you change mocks.js_dependencies.cljs, you must re-run the make
  target.
- [Added] "make integration-test" and "make integration-test-watch" run
  integration tests only. These are much slower than the unit tests.

Fixes https://github.com/status-im/status-mobile/issues/18112
2024-01-05 15:47:03 -03:00
Jamie Caprani 9c62e63035 chore: organise chats context (#18373) 2024-01-05 09:39:01 -08:00
Brian Sztamfater fc72ba6a1e fix: fix height on account card component (#18329)
Signed-off-by: Brian Sztamfater <brian@status.im>
2024-01-05 14:11:11 -03:00
BalogunofAfrica 1919094b46 fix: community buttons (#18392) 2024-01-05 17:17:51 +01:00
Brian Sztamfater e7b92dcf25 fix: increase numbered keyboard touchable area (#18330)
Signed-off-by: Brian Sztamfater <brian@status.im>
2024-01-05 12:55:23 -03:00
Brian Sztamfater 4b3bc73239 fix: always navigate back to shell stack when closing watch account screen (#18324)
Signed-off-by: Brian Sztamfater <brian@status.im>
2024-01-05 12:38:58 -03:00
Jamie Caprani 947a1ef29c feat(wallet): add ability to send a token (#18242) 2024-01-05 07:04:39 -08:00
Ajay Sivan 4edb14bb5f Communities: Share Selective Account (#18382) 2024-01-05 05:34:43 -08:00
Omar Basem c6a7808049 Wallet: Utility Tests (#18371)
* Wallet: utility tests
2024-01-05 16:29:26 +04:00
yqrashawn be2d0feda3 fix: generate_profile_url crash when login (#18364)
* fix: generate_profile_url.cljs$core$IFn$_invoke$arity$2 crash when login

'status_im.common.universal_links.generate_profile_url.cljs$core$IFn$_invoke$arity$2' is undefined

update the function to a fixed arity function

* fix: schema/=> macro for :function schema

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

---------

Signed-off-by: yqrashawn <namy.19@gmail.com>
2024-01-05 20:08:13 +08:00
Ajay Sivan c91b4339dc Use text-combinations/page-top component in request to join sheet. (#18384) 2024-01-05 02:09:58 -08:00
Yevheniia Berdnyk 5a832871fe e2e: added checks for non-token gated community channels 2024-01-05 00:34:56 +02:00
Brian Sztamfater 205962f582 fix: error is shown when asset is selected on select assets screen (#18326)
Signed-off-by: Brian Sztamfater <brian@status.im>
2024-01-04 11:58:35 -03:00
Siddarth Kumar d64508a74a chore: convert RNSelectableTextInput to Kotlin (#18320)
### Summary

This commit adds `Kotlin` plugin to native module `react-native-status` and converts these files to `Kotlin` :
- `modules/react-native-status/android/src/main/java/im/status/ethereum/module/RNSelectableTextInputViewManager.java`
- `modules/react-native-status/android/src/main/java/im/status/ethereum/module/RNSelectableTextInputModule.java`

### Platforms
- Android
2024-01-04 17:09:24 +05:30
Yevheniia Berdnyk 85c928f862 e2e: enabled tests for pinning messages 2024-01-04 11:22:58 +02:00
Ulises Manuel 4ff5e4da8b [#17938] Collectibles per account (#18277)
* Update wallet events and subs to handle collectibles per account

Additionally,
 - Move collectibles related events to a new events namespace (`status-im.contexts.wallet.events.collectibles`).
 - Update tests to consider collectibles per account.

* Update collectibles tab to handle a current viewing account
2024-01-03 18:41:12 -06:00
Parvesh Monu fc591f303c fix unable to open add-new-contact screen if hardware button is pressed while qr scanner is open (#18296) 2024-01-03 18:24:58 +05:30
Omar Basem f2c69ab9a8 Wallet: crypto max decimals (#18267)
* wallet: crypto max decimals
2024-01-03 15:48:04 +04:00
Omar Basem 006b637b1b Quo: quiz item (#18306)
* Quo: quiz item
2024-01-03 15:36:17 +04:00
Jamie Caprani f016a9c33c chore: clean up contexts folder to only include larger feature sets (#18286) 2024-01-03 02:25:49 -08:00
Omar Basem 1ce76a4af6 Wallet: network preferences text description (#18319)
Wallet: network preferences text description
2024-01-02 13:45:21 +04:00
Alexander 4a9ca80bc2 Share screen design review (#18148)
* Share screen design review

* Small update

* Update

* Style fix
2024-01-02 10:23:38 +01:00
Ibrahem Khalil e392608697 Fix no message preview on long press on the reaction (#18292) 2023-12-30 11:25:01 +02:00
Siddarth Kumar d495bb6b57 Kotlinify StatusOkHttpClientFactory.java (#18318)
This commit converts  
`android/app/src/main/java/im/status/ethereum/StatusOkHttpClientFactory.java` to
`android/app/src/main/java/im/status/ethereum/StatusOkHttpClientFactory.kt`
2023-12-29 16:57:27 +05:30
Parvesh Monu 7af62c04eb Keep chat screen loaded (#17839) 2023-12-29 14:55:12 +05:30
Tetiana Churikova 169a092e7f e2e: wait for Join button to be available (#18316) 2023-12-28 16:31:54 +01:00
Siddarth Kumar 7a4d79179d chore: add Kotlin support (#18293)
This commit is a pre-requisite to upgrading `react-native` to `0.73.x`, now that react-native has completely moved their android code over from `Java` to `Kotlin` , it is also necessary for us to begin doing the same.

This commit converts just 2 files which are important at the moment.
- `android/app/src/main/java/im/status/ethereum/MainActivity.java`
- `android/app/src/main/java/im/status/ethereum/MainApplication.java`

I will can convert the remaining files in follow ups.
2023-12-28 20:20:25 +05:30
Ulises Manuel 107d1a80c9 Fix token images not being displayed (#18288)
Signed-off-by: Brian Sztamfater <brian@status.im>
2023-12-27 12:43:47 -03:00
Omar Basem 01e8c7e480 Wallet: about tab fixes (#18298)
* wallet: about tab fixes
2023-12-27 19:14:09 +04:00
Siddarth Kumar 0a1152bcc6 chore: bump react-native-webview to 13.6.3 (#18295)
We need to upgrade `react-native-webview` as a pre-requisite for upgrading `react-native` to `0.73.x`
else we face this issue while building iOS : https://github.com/react-native-webview/react-native-webview/issues/3233
2023-12-27 09:13:29 +05:30
Yevheniia Berdnyk 734abc221c e2e: tests fixes 2023-12-27 00:50:01 +02:00
Ajay Sivan bec51b7d0e Add :wallet/accounts-with-customization-color subscription (#18302) 2023-12-26 08:12:20 -08:00
Icaro Motta 0b4a1545ae Fix component tests, upgrade Jest & friends, and a few other goodies (#18276)
Fix all component tests after the latest RN upgrade.

Fixes https://github.com/status-im/status-mobile/issues/18157
Closes https://github.com/status-im/status-mobile/pull/18235

Dependency changes

- Upgraded Jest: from 26.6.3 to latest 29.7.0.
- Upgraded @testing-library/jest-native: from 5.3.0 to latest 5.4.3
- Upgraded @testing-library/react-native: from 11.5.4 to 12.4.2
- Removed explicit dependency on jest-circus, this is now the default test
  runner.
- Removed explicit dependency on jest-environment-node. This is handled by the
  package manager.
- Added jest-silent-reporter at version 0.5.0.

### Why component tests were failing?

Many tests were failing because we were using RN Testing Library (RNTL) in an
unreliable fashion. With the recent library upgrades, the unreliability was
excerbated. Other times, the tests were incorrectly arranging data.

### with-redefs does not work with async code

Generally speaking, with-redefs should not be used with async code, assume the
worst. The scope of the macro will cease to exist by the time the async code
runs. In many tests we were using with-redefs, then calling render, but for some
components that use use-effect, JS timers, animations, etc it's unreliable and
were the reason for failures.

It's easy to reproduce too:

```clojure
(defn foo []
  :foo)

(foo)
;; => :foo

(with-redefs [foo (constantly :bar)]
  (foo))
;; => :bar

(js/setTimeout
 (fn []
   (tap> [:calling-foo (foo)]))
 100)
;; Taps [:calling-foo :foo]
;; As you would expect, when running without with-redefs, it prints :foo.

;; So far so good, but whatch what happens with async code:

(with-redefs [foo (constantly :bar)]
  (js/setTimeout
   (fn []
     (tap> [:calling-foo (foo)]))
   100))
;; Taps [:calling-foo :foo]
;; ====> PROBLEM: Taps :foo, not :bar as one might expect
```

### Not waiting on wait-for

When test-helpers.component/wait-for is used, subsequent assertions/etc should
be done after the promise returned by wait-for is resolved. But remember to not
perform side-effects inside the wait-for callback (check out the docs
https://callstack.github.io/react-native-testing-library/docs/api#waitfor).
Most, if not all of our usages of wait-for were not waiting.

#### Improvement 1 - Silence Jest on demand

If you need to re-run component tests frequently, you may want to reduce the
output verbosity. By passing JEST_USE_SILENT_REPORTER=true to make
component-test or make component-test-watch you will see a lot less noise and be
able to focus on what really matters to you.

#### Improvement 2 - Selectively focus/disable tests

Because of our need to first compile CLJS to JS before running tests via Jest,
we couldn't easily skip or focus on specific tests. From this commit onwards, we
should never again have to change the list of requires in files core_spec.cljs.
Commenting out required namespaces gives a bad DX because it causes constant
rebasing issues.

#### Improvement 3 - Translations now work as in prod code (but only English)

Translations performed by *-by-translation-text can be done now without any
workaround under the hood. The query functions are now linted just like
i18n/label, which means static translation keywords must be qualified with :t/,
which is good for consistency.
2023-12-26 11:58:23 -03:00
Siddarth Kumar 46c5f42fad chore: add form-data package for DIWAI uploads (#18299) 2023-12-26 16:08:46 +05:30
Yevheniia Berdnyk 5d21b1f5ae e2e: fix for getting public key 2023-12-24 01:47:16 +02:00
Siddarth Kumar 49c6a44824 chore: update status-go version (#18253) 2023-12-23 10:08:49 +05:30
flexsurfer 31acb8e9c4 improve profile screen performance (#18281) 2023-12-22 16:59:12 +01:00
Jamie CapraniandPaul Fitzgerald eda8c0ccb0 fix(quo): truncation on wallet account card long name (#18259)
---------

Co-authored-by: Paul Fitzgerald <paulfitz99@gmail.com>
2023-12-22 15:48:57 +00:00
codemaster 7915ba85ab fix: theming toast component (#17918) 2023-12-23 01:29:50 +10:00
Yevheniia Berdnyk 1bd6898e1c apk name updated in e2e nightly jenkins file 2023-12-22 16:18:00 +02:00
Siddarth Kumar 10b97843ce feat: add xcbeautify to iOS shell (#18273)
I can't remember the number of times I have had to ask developers to run `make run-ios | xcbeautify` when debugging iOS build failures and they do not have `xcbeautify` installed on their environment.

`xcbeautify` helps make `xcodebuild` output more readable and to identify problems quickly.

This commit adds `xcbeautify` to iOS shell and to  `make run-ios` so that we get readable output by default.
2023-12-22 19:45:59 +05:30
Omar Basem 5eb0baa64d Wallet: best route UI (#18266)
* Wallet: best route UI
2023-12-22 09:40:43 +04:00
yqrashawn a4dc268bc3 feat: spectate community before join (#18070) 2023-12-22 10:21:10 +08:00
Ulises Manuel 5fa9c0cab6 [#17964] emoji screen performance (#18213)
* Fix `->` style in emoji-picker.data

* Make `temp-empty-symbol` component code safer to avoid app crashing

* fix `->` style in `emoji-picker.utils`

* Pass sheet-animating? ratom to bottom-sheet's content component

* Improve emoji picker performance
2023-12-21 15:44:33 -06:00
Omar Basem 4f9544d20c Wallet: receive screen (#18167)
* wallet: receive screen
2023-12-21 22:07:27 +04:00
flexsurfer ad8d537b9c move status-im from utils (#18249) 2023-12-21 18:16:59 +01:00
Yevheniia Berdnyk 5ec5838657 e2e: added validation of encoded data in community and profile urls 2023-12-21 19:00:29 +02:00
Jamie Caprani 4c3d1667ca chore: add outline for transacation-progress page (#18217) 2023-12-21 15:37:18 +00:00
Anton Iakimov 2d22ed810c ci: fix android-e2e nightly builds (#18261) 2023-12-21 14:36:16 +01:00
e59e34d0da Communities: Present the list of airdrop addresses (#18189)
Co-authored-by: Flavio Fraschetti <frasqueti@gmail.com>
Co-authored-by: Ajay Sivan <ajayesivan@gmail.com>
2023-12-21 01:27:59 -08:00
Mohamed Javid 60dfd6ce78 Added assets skeleton in wallet home and account screen (#18197)
This commit:

- Updates the "skeleton-list" component to support the "assets" type
- Adds the assets skeleton to the assets tab in the wallet home and account screen

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2023-12-21 13:28:52 +05:30
Ajay Sivan 4ca533a534 Move disabled component tests outside of require block to fix lint messup (#18265) 2023-12-20 22:18:59 -08:00
Tetiana Churikova ec41b30794 e2e: updated profile view (#18203) 2023-12-20 21:29:08 +01:00
Ulises Manuel 7cf31651b3 [#18083] Implement Page top component (#18163)
* Add container style and fix `:auto-complete` parameter in address-input

* Add container style to recovery-phrase input

* Add container style and accessibility-label to search-input

* Add page-top component and tests

* Add page top preview
2023-12-20 13:17:39 -06:00
Ajay Sivan 04184b41e5 Wallet/Account Permissions Quo Component (#18224) 2023-12-20 07:54:13 -08:00
Lungu Cristian d0e624afd7 Biometrics button on login screen (#18106)
* feat: login with biometry when switching accounts

* feat: biometry button on login screen

* fix: addressed review comments

* fix: biometry button background

* ref: moved biometrics constants to main constants file

* fix: hide biometric button when not enabled

* feat: standard_auth blur prop

* fix: leftover rename
2023-12-20 17:15:51 +02:00
Volodymyr Kozieiev bf55a2a974 Activity tab on collectible page (#18220) 2023-12-20 14:53:29 +00:00
Omar Basem 8225d91ee0 Wallet: home top insets
Wallet: home top insets
2023-12-20 18:23:27 +04:00
Mohsen f631e1fe9d [#17393] feat: add new setting ui (#18118) 2023-12-20 17:03:49 +03:00
Andrea Maria Piana 32cfd214ca Add fetch messages behind a toggle & some advanced settings
This PR does a few things:

1) Add fetch messages implementation on any kind of chat. It's behind a
   toggle (on by default) as design is still unsure whether we want it,
   but it's very useful for debugging.
2) Allow setting light client from mobile

It also partially remove node config management from the clojure part,
as it's better if that's not explicitly managed by clients.
Some parts are still relying on it but they are not functional
(keycard), while others are still using it and will need to be updated
eventually (syncing), in order to get rid completely of node config.

Sets fleet to shards.test

https://github.com/status-im/status-go/compare/90c31afe...1adcf02f
2023-12-20 13:04:29 +00:00
flexsurfer 800ca19c08 move keycard native module, removed outdated code (#18252) 2023-12-20 13:53:53 +01:00
mmilad75andJamie Caprani b70493691c Implement Link Card component (#18080)
* add basics

* finalize component

* add test structure

* add tests

* fix lint issues

* move color to props

* move variants to props

* change file structure

* working

* finalize loader

* fix tests

* fix lint issues

* fix style issues

* fix typos

* resolve comments

---------

Co-authored-by: Jamie Caprani <jamiecaprani@gmail.com>
2023-12-20 14:07:04 +03:30
Ajay Sivan a40862c5a9 Disable component tests that use wait-for helper function (#18243) 2023-12-20 02:26:57 -08:00
Parvesh Monu 17c442a373 Add placeholder illustration in jump-to screen (#18229) 2023-12-20 14:56:33 +05:30
Parvesh Monu c74461db3a remove unused react-native-intersection-observer library (#18230) 2023-12-20 14:21:07 +05:30
yqrashawnandYevheniia Berdnyk 4bc5efb855 fix: universal link regex (#18020)
Co-authored-by: Yevheniia Berdnyk <ie.berdnyk@gmail.com>
2023-12-20 11:25:09 +08:00
Yevheniia Berdnyk 711e64bc75 e2e: android14 2023-12-20 01:51:58 +02:00
flexsurfer 602b27105b FINAL BOSS! rename status-im2 to status-im (#18241) 2023-12-19 20:59:07 +01:00
flexsurfer f89fd8ca54 move status-im under legacy (#18237) 2023-12-19 18:41:30 +01:00
flexsurfer 842203a4d0 move community code to status-im2 (#18218) 2023-12-19 15:59:50 +01:00
Siddarth KumarandAnton Iakimov 36c2f4706f Fix crash on x86_64 emulators (#17773)
In this commit we bump jenkins lib tag to enable building e2e with 64bit 

Co-authored-by: Anton Iakimov <yakimant@gmail.com>
2023-12-19 20:11:25 +05:30
Brian Sztamfater a4f99de8d5 feat: implement getSuggestedRoutes in the wallet Send Flow (#18104)
Signed-off-by: Brian Sztamfater <brian@status.im>
2023-12-19 02:59:58 -08:00
Parvesh Monu d40f70dca4 Optimize chat screen navigation view (#18055) 2023-12-19 16:01:13 +05:30
Alexander 1df96ae3e0 Invite friends (#17570) (#18124)
* Invite friends (#17570)

* Small update

* Update

* Fix
2023-12-19 10:36:49 +01:00
Siddarth Kumar 771fb111e6 make purge script more robust for Darwin (#18192)
The existing purge script for Darwin would fail and stop at many stages.

This commit makes the script more robust to certain failures that were observed and documented in https://github.com/status-im/status-mobile/issues/16404
2023-12-19 08:46:19 +05:30
Mohamed Javid da61233302 Wallet - Watched Account UI Updates (#18190)
This commit:

- Updates the account switcher in the "page-nav" component to use "account-avatar" instead of "dropdown"
- Updates the account avatar (on the top right corner of the account screen) to display the watched account variant correctly
- Updates the accounts list in the account switcher to display the correct background for the watched account with the eye icon

---------

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2023-12-18 23:31:36 +05:30
Jamie Caprani 8a869be01c chore(wallet): add images to select address page (#18119) 2023-12-18 03:55:42 -08:00
Siddarth Kumar 8d0bb7ba9e fix: modify permissions of all files to read (#18214)
`react-native-reanimated` generates write protected files during build time which are problematic because we copy over `node_modules` from `nix` store and when replacing them with new node modules we are manually asked to confirm this overwrite.

This used to happen before with `.cxx` files but now it also happens with `.so` files. 

This commit fixes those permissions.

partially fixes #18211
2023-12-18 14:38:34 +05:30
Siddarth Kumar d9a242fcab set make run-metro target to clojure (#18215)
The metro terminal no longer needs to have `android` target anymore.
I had to do this in https://github.com/status-im/status-mobile/pull/17241 

This commit sets the target of metro terminal back to `clojure`.

I tested building `android` and `iOS` on my MacOS and on my linux machines and found no side effect.
Now metro terminal is fast again.
2023-12-18 14:03:24 +05:30
Parvesh Monu 8ba9f45e44 Upgrade react-native-reanimated to 3.6.1 (#18216) 2023-12-18 09:44:53 +05:30
frank e06d8cb106 fix: App gets stuck on syncing process screen when scanning QR code v… (#18140)
* fix: App gets stuck on syncing process screen when scanning QR code via recovered profile with different passwords

* update comment
2023-12-16 10:25:39 +08:00
Ibrahem Khalil f8e935c58d Close chat when closing group chat details (#18149) 2023-12-15 20:28:30 +02:00
Ajay Sivan 5507ae4fa2 Community: Request to join - Show addresses shared (#18180) 2023-12-15 09:13:32 -08:00
Volodymyr Kozieiev 2a5c102b1c Add collectible menu (#18185) 2023-12-15 15:37:08 +00:00
Parvesh Monu 9e27a36f5e Fix empty chat in opened on pressing hashtag in a community channel (#18111) 2023-12-15 18:14:08 +05:30
Ibrahem Khalil 07d8bf0d19 Share community via URL with any privileges (#18131) 2023-12-15 14:29:13 +02:00
Ajay Sivan 31dea1ca13 Quo Wallet/Required-Tokens Component (#18164) 2023-12-14 23:54:42 -08:00
Omar Basem 6f3bf98e83 Wallet: share address (#18121)
* wallet: share address
2023-12-15 08:11:06 +04:00
Mohamed Javid ed53fecf47 Added support for different currencies in wallet accounts price calculation (#18078)
This commit:

- adds support for different currencies in token price calculation in the new wallet UI.
- fixes the token units and prices displayed in the individual account screen

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2023-12-15 01:08:16 +05:30
flexsurfer 16a52b38e8 move input events (#18183) 2023-12-14 16:24:36 +01:00
Ajay Sivan c1a17d9d53 Show component name in quo preview header (#18175) 2023-12-14 04:43:06 -08:00
Lungu Cristian e790f7177d Chat fixes based on design feedback (#18059)
* fix: chat header position when only a few messages

* fix: system_message add contact icon margin

* fix: fixed last grouped message vertical padding

* fix: show message user info on long press of grouped message

* feat: added mute button to chat's channel-actions

* fix: no custom color in message list background

* fix: composer placeholder color (light theme)

* draft: fix android initial chat position

* fix: scrolling chat to top changed content size

* fix: chat message list header animation and behavior

* fix: android initial chat state

* fix: adjusted the chat avatar animation position

* fix: chat content change with keyboard visible

* ref: small refactor and added some notes

* fix: removed broken require

* fix: mute label for channel chat

* fix: merge conflict fixes
2023-12-14 13:03:21 +02:00
Mohamed Javid b668e4dea4 [Feature] Wallet - Account Switcher for send flow (#18100)
This commit:

- adds another variant ("Select account" bottom sheet) of the account switcher for wallet - send flow
- adds watch-only? key in the account to prevent repetitive account type checks across the codebase

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2023-12-13 22:49:54 +05:30
Parvesh Monu 879a82c35f Add comment related to refactoring (#18171) 2023-12-13 22:05:00 +05:30
flexsurfer 0eb424bb74 Feature/clean metro logs remove old wallet UI (#18165) 2023-12-13 16:11:30 +01:00
andrey cc4a732f60 temporary disable quo spec 2023-12-13 13:27:58 +01:00
Mohsen 835e97d672 [#17518] fix: try again when sync has error outside the onboarding flow (#17890) 2023-12-13 14:40:33 +03:00
andrey 406904025d remove extra sub 2023-12-13 12:15:57 +01:00
Alexander cb3a19f98f #17945 Scanned address persists in ETH address textbox after reopening 'Add address to watch' screen (#17957) 2023-12-13 10:03:42 +01:00
Omar Basem 424a7b17b0 Wallet: Token item fixes (#18136)
* Wallet: token item fixes
2023-12-13 11:29:57 +04:00
Yevheniia Berdnyk 3ddb76faed e2e: fixes 2023-12-13 02:28:24 +02:00
Jamie Caprani 457c42c5f0 chore(wallet): add flow for selecting own accounts in send flows (#18071) 2023-12-12 05:38:21 -08:00
Nikolay 7564113cb5 feat(wallet) - implement network configuration on an account (#17862) 2023-12-12 05:22:51 -08:00
BalogunofAfrica f1bcc6259a feat: finish enable notifications (#18084) 2023-12-12 13:46:01 +01:00
Parvesh Monu 0dd63490f8 Remove toggle for disabling shell navigation 2023-12-12 17:55:29 +05:30
Ajay Sivan e5179d308b Add Test Networks Enabled option in settings (#17879) 2023-12-12 00:36:43 -08:00
codemaster fc8590a05f fix: no avatar for the first message in 1-1 chat (#18099) 2023-12-11 12:13:16 -08:00
andrey e31db856df ops 2023-12-11 20:47:57 +01:00
flexsurfer 5570181896 move reactions events (#18150) 2023-12-11 17:50:52 +01:00
Siddarth Kumar 761a7df06f upgrade react-native to 0.72.5 (#17241)
This commit does many things :
- Upgrade `react-native ` to `0.72.5`
- Upgrade `react-native-reanimated` to  `3.5.4`
- Upgrade `react-native-navigation` to `7.37.0`
- `ndkVersion` has been bumped to `25.2.9519653`
- `cmakeVersion` has been bumped to `3.22.1`
- `kotlinVersion` has been bumped to `1.7.22`
- `AGP` has been bumped to `7.4.2`
- `Gradle` has been upgraded to `8.0.1`
- Android `CompileSDK` and `TargetSDK` have been bumped to 33
- `@react-native-async-storage/async-storage` has been upgraded to `1.19.3`
- `@walletconnect/client` has been nuked
- some of the old `react-native-reanimated` code has been nuked
- `react-native-keychain` fork has been replaced with `8.1.2`

- On Android we are currently relying on `Hermes` Engine.
- On iOS we are currently relying on `JSC`
- We are not enabling new architecture for now (I have plans for that in the future) ref: https://github.com/status-im/status-mobile/issues/18138

IOS only PR : https://github.com/status-im/status-mobile/pull/16721
Android only PR : https://github.com/status-im/status-mobile/pull/17062

- `make run-metro` now has a target of `android` which was `clojure` earlier, this will increase the time it takes to start metro terminal but this is needed otherwise you will get a nasty error while developing for android locally.
2023-12-11 21:22:23 +05:30
BalogunofAfrica f155d95d92 fix: 1:1 chat concerns (#17795) 2023-12-11 14:42:41 +01:00
yqrashawn 72f518d70b feat: add encoded data for profile sharing url (#18019) 2023-12-11 20:35:39 +08:00
frank 9c6584f91b ignore /.clj-kondo/rewrite-clj/rewrite-clj/config.edn which is generated by lint-fix (#18141) 2023-12-11 20:01:09 +08:00
Ajay Sivan 3cd230fed0 Addresses to share cards (#18123) 2023-12-11 00:53:14 -08:00
Ibrahem Khalil 1eb7504c12 Community requests to join when admin is offline (#17941) 2023-12-09 15:28:33 +02:00
Ulises Manuel 0ba057ae9d [#17965] Create token component (#18018)
* Create token component

* Replace token images by new token component

The new component is being used in the following components:
 - token-input
 - network-amount
 - token-tag
 - summary-tag
 - context-tag
 - token-value
 - token-network
 - preview-list

* Rename token image file: eth-token -> eth

* Remove resources/get-token function
2023-12-08 14:13:11 -06:00
Ulises Manuel 8b919f4058 [#17896] Raw balances using big number (#17920)
* Add `utils.money/add` version able to work with `nil`s

* Store token raw-balance as big-number

* Improve account balance calculations using `utils.money` existing functions

* Update `:wallet/tokens-filtered` sub

* Make `prettify-balance` able to work with bignumbers
2023-12-08 13:40:26 -06:00
flexsurfer f79860fb97 move blob to rn, remove unused code, move images events to status-im2 (#18117) 2023-12-08 17:27:21 +01:00
Parvesh Monu 7a6f05a440 fix sometimes add contact screen is closed by itself after scanning QR code (#18101) 2023-12-08 18:53:56 +05:30
Ulises Manuel de4e233884 [#17974] text combinations - username component (#17987)
* Move docstring to be available while using `colors/resolve-color`
* Add text combinations - username component and tests
* Add username related svg icons
2023-12-07 17:44:24 -06:00
Jamie Caprani 55a99da2f5 feat: enable biometrics for standard-auth (#17992) 2023-12-07 08:44:16 -08:00
Yevheniia Berdnyk 6093d56c90 e2e: increased wait time for PN and CR 2023-12-07 18:04:45 +02:00
Parvesh Monu 9cf4556b9d fix app is not opened on the last viewed chat after reopening (#18090) 2023-12-07 17:44:13 +05:30
flexsurfer 536ebf56cb remove obsolete code (#18094) 2023-12-07 11:40:23 +01:00
Siddarth Kumar 3ad345519b nix: bump clang to 15 & patch Glog for CC,CXX flag (#18108)
After upgrading MacOS to Sonoma and Xcode to 15, pod install stage would fail with clang errors.
Turns out that react-native's configure glog script sets 2 additional flags, CC and CXX which conflicts with flags already set in nix iOS shell.

In this commit we :

- bump clang from 10.0.0 to 15.0.7
- patch glog configure script to avoid setting those flags

This fixes the iOS builds.
2023-12-07 15:36:08 +05:30
Omar Basem dc587e493f Wallet: generate new keypair UI (#18045)
* feat: new keypair flow ui
2023-12-07 09:43:36 +04:00
Omar Basem f692ae2222 Wallet: ENS (#18000)
* wallet: ens
2023-12-07 08:00:56 +04:00
frank aa89ebdb93 fix: Marking AC notification as read does not affect correspondent message in chat (#18058) 2023-12-07 10:16:25 +08:00
Brian Sztamfater 198a4d74a5 feat: transaction confirmation page ui (#17812)
Signed-off-by: Brian Sztamfater <brian@status.im>
2023-12-06 20:16:08 -03:00
Yevheniia Berdnyk 3b5fe36717 e2e: added test for edit/delete message when offline 2023-12-06 23:19:17 +02:00
Icaro Motta 03444ae4ff Request to join screen - show modal title and community context tag (#18077) 2023-12-06 18:10:47 -03:00
Icaro Motta 390bbdb6ec Add missing clj-kondo linter for nubank/matcher-combinators (#18091) 2023-12-06 13:39:47 -03:00
Flavio Fraschetti 2bc7b62324 Communities - Display community rules at request to join (#18082)
This update introduces a feature that displays community rules to users as they join.
2023-12-06 13:21:17 -03:00
Yevheniia Berdnyk 4376ee8908 e2e: disabled checks because of issues with restored contacts and channel links 2023-12-06 16:57:31 +02:00
Roman Volosovskyi 195f0cfa40 Mark mnemonic as shown on revealing it to the user 2023-12-06 13:51:38 +01:00
Omar Basem ab61d8d5c0 Wallet: Set color and emoji (#17906)
* wallet: set color and emoji
2023-12-06 16:02:53 +04:00
mmilad75 aaf0b8e423 Implement transaction progress component (#17933)
* copy codes

* refactor preview

* refactor deprecated codes in view

* change condition structure in view-internal

* comment unused codes

* refactor title

* fix title style

* fix icon style

* fix context tag

* fix icon and row

* refactor icon-internal

* rename network-state and network-type

* fix progress-container style

* fix progress-box-container style

* fix progress container naming and style

* change progress-bar component

* fix progress box component

* convert to functional component and bring back the animation

* fix progress box for arbitrum-optimism network

* fix text-steps

* fix status-row

* refactor code style

* refactor get-network-text

* resolve comment

* add translations

* remove btn-title prop

* fix dark mode border color

* fix dark mode icon color

* move interval to preview

* add tests ns

* add tests

* fix lint issues

* fix rendering issue

* fix lint issue

* add arbitrum and optimism as separate networks

* create const for progress percentage

* fix progress bar component and preview

* refactor text-steps

* refactor names

* fix lint issues

* rename arbitrum-progress-percentage and optimism-progress-percentage

* update tests

* convert hard-coded color to customization-color

* fix progress_bar tests

* separate state for each network

* add progress percentage for each network and refactor params of functions

* separate epoch number for  each network

* update tests

* fix lint issues

* refactor codes

* fix lint issues

* resolve comments

* add confirmation progress

* use confirmation-progress component in transaction-progress

* fix preview

* add tests

* fix lint issue

* resolve comment

* refactor networks

* change sending state style

* update tests

* fix lint issues

* remove unused code

* add helper for calculate counter step

* add assoc-props to view-networks

* change text-internal props order

* fix colors/resolve-color usage

* refactor view codes

* add get-networks to preview

* add max-value to progress bar style

* remove threading macros in the previews

* remove inline functional components in the previews

* remove optimism-arbitrum checks in the view

* fix lint issues

* add max-progress and min-progress to confirmation-progress

* refactor text-steps

* fix counter structure in transaction-progress

* fix counter structure in confirmation-progress

* fix resolve-color usage

* fix lint issue

* fix tests

* resolve comments

* fix color issue

* fix margins

* fix lint issue
2023-12-06 14:09:52 +03:30
BalogunofAfrica 7e14846f0b fix: use custom color for confirm select (#18068) 2023-12-06 05:10:08 +01:00
frank 5ebd133c63 group ens names with chain-id (#18001) 2023-12-06 10:04:39 +08:00
Icaro Motta 563f1c588d Improve test failure readability (#18049)
Problem: failed equality checks as in "(is (= expected actual))" will give a
single, long line of output that for anything but the simplest data structures
is unreadable by humans, and the output doesn't give a useful diff.

Solution: use library https://github.com/nubank/matcher-combinators and its test
directive "match?" which will pinpoint where two data structures differ. Then,
instead of "(is (= ...", use "(is (match? expected actual)". It works
beautifully.

The library offers other nice matchers, but the majority of the time match? is
sufficient.

Can we use another test runner like Kaocha? kaocha-cljs2
(https://github.com/lambdaisland/kaocha-cljs2) would be able to print better
test errors out of the box, among other features, but I have no clue if it would
work well or at all in our stack (in theory yes, but it's a larger piece of
work).
2023-12-05 17:20:54 -03:00
Yevheniia Berdnyk 6b612588c4 e2e: skipped checks with bugs 2023-12-05 20:54:09 +02:00
Parvesh Monu 6ef113e821 fix messages are marked as read automatically in 1-1/group chats after opening a link (#18066) 2023-12-05 22:27:03 +05:30
Jamie Caprani c25f44c2a0 chore: make new wallet UI default, move set currency to legacy settings, remove add eth network on wallet init (#18027) 2023-12-05 06:35:27 -08:00
frank d039864dca fix: Duplicate 'Contact Added' Notifications When Pair-Device User Accepts Request (#17975)
https://github.com/status-im/status-go/compare/4cc53630...d7e7792b
2023-12-05 19:12:31 +08:00
Alexander a4f1f23d3c Style fixes for pinned messages (#18061)
* Style fixes for pinned messages

* Small code style update
2023-12-05 11:31:45 +01:00
flexsurfer fe20fa4e99 move transport (#18062) 2023-12-05 09:35:17 +01:00
Omar Basem 5c30fd847a Wallet: account real data (#17821)
* wallet: account real data
2023-12-05 10:56:37 +04:00
John Ngei 64de325678 update scan qr code page
* update scan qr code page

* update scan qr code page

* fixed: populate the search input with new identity

* dismiss keyboard when scan qr page is activated
2023-12-05 02:56:27 +03:00
Volodymyr Kozieiev 489557c1a3 Match the changes in collectibles api in status-go (#18033) 2023-12-04 16:44:56 +00:00
Icaro Motta 439fdfa12c Rename effects to :effects.*/* and move them to separate namespaces (#18047) 2023-12-04 12:55:57 -03:00
Mohsen f695dbf115 [#17909] fix: unhandled error when app launched in offline mode (#17973) 2023-12-04 17:48:45 +03:00
flexsurfer 7c45b1e075 update deps (#18056) 2023-12-04 14:49:51 +01:00
flexsurfer 64453716b0 rename onboarding 2 (#18060) 2023-12-04 14:49:05 +01:00
Mohamed Javid 56d135f1f8 Implemented Wallet - Account Switcher (#18003)
This commit:

- Implements the Wallet Account Switcher for easy switching between wallet accounts
- Updates the About tab in the accounts screen to display the correct account address and derivation path along with the profile.
- Updates the account-item component to pass the state from the parent and refactors the depreciated color functions
- Moves the handle-bar in the bottom sheet to a standalone component 
- Adds customization-color in account-origin component

---------

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2023-12-04 18:47:03 +05:30
Mohsen a7178a4950 [#17572] fix: 'Join Community' notification is not getting dismissed (#17834) 2023-12-04 15:24:06 +03:00
Siddarth Kumar 3cd302b271 fix: get rid of :redef-in-file warning (#18053) 2023-12-04 14:18:43 +05:30
yqrashawn 1e797273b6 fix: change system time backward break image server (#17989) 2023-12-04 16:12:50 +08:00
frank 8ff67bf344 fix: Cannot mark as read messages in communities (#18029)
* fix: Cannot mark as read messages in communities

* rename messenger-response to _messenger-response
2023-12-02 09:05:21 +08:00
Ulises Manuel 3fee21c73a [#17923] text combinations - standard title component (#17939)
* Simplify tag components by turning them to from-1

* Add standard-title component, preview screen and tests
2023-12-01 15:49:49 -06:00
Jamie Caprani f9f328107d chore: add ability to create watch address & some related ui changes on account page (#17868) 2023-12-01 04:29:01 -08:00
Yevheniia Berdnyk 04dee8be45 e2e: updated data for waku backup test 2023-12-01 12:28:26 +02:00
Alexander 52f7fc59ee Updated data-item, monospaced & aligned address (#18008)
* Upd

* Fix
2023-12-01 10:03:08 +01:00
Mohamed Javid b5202b4d28 [Feature] Added activity check on entered watch address (#17970)
This commit 
 - implements the activity check for the entered watch address.
 - added warning colors
 - fixes bottom inset in add address to watch screen

---------

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2023-12-01 00:28:09 +05:30
Andrea Maria Piana 210cf64ce0 Fix panic syncing community token gated
https://github.com/status-im/status-go/compare/8a4c2d8d...8206ffc7
2023-11-30 13:49:47 +00:00
Lungu Cristian ed270b2162 Enabling biometry without password during sync (#17960)
* feat: added migration for the keychain hashed password

* feat: added sync biometry without password entry

* fix: biometry typo from develop

* ref: moved migration side-effects outside the event

* ref: some renaming for keychain migration

* ref: addressed @cammellos' review comments

* ref: removed unnecessary anon fn

* fix: addressed @ilmotta's review comments

* ref: removed theme from enable-biometrics

* ref: addressed J-Son89's review comments

* test: added tests for mask-data and hash-masked-password

* test: added schema to hash-masked-password and fixed test

* fix: forgot the threading

* ref: improved the masked data schema

* fix: no biometry error when canceled by user

* fix: biometry error wasn't propagated during login

* fix: alert dismiss button not passed properly

* fix: show biometrics NOT_ENROLLED error only once

* lint: removed unused require
2023-11-30 13:40:29 +02:00
Andrea Maria Piana d412fa3c63 Set up skeleton for communities request to join 2023-11-30 09:49:43 +00:00
Yevheniia Berdnyk b7f675aa5c e2e: fix for deep links test 2023-11-30 01:09:42 +02:00
Volodymyr Kozieiev bfa23c182f Add requirement for component tests (#18015) 2023-11-29 18:50:49 +00:00
Mohsen 6b721265af [#17986] feat: implement new settings ui, header section (#17991) 2023-11-29 20:54:11 +03:00
Jamie CapraniandRende11 589a581298 chore(wallet): add ui for send page (#17786) - merged in (#18017)
---------
Co-authored-by: Rende11 <artamonovn@gmail.com>
2023-11-29 05:12:21 -08:00
Yevheniia Berdnyk 0546a87e9a e2e: deep links tests added 2023-11-29 14:09:31 +02:00
Parvesh Monu e5ce7fed3a fix position of the last item in the community chat list and the position of the jump-to button (#17999) 2023-11-29 16:45:30 +05:30
Siddarth Kumar 58d5c3d7a5 don't restrict diawi upload for iOS release builds (#18016)
This commit removes the restriction of uploading iOS release builds to Diawi

Its helpful to have the status app uploaded to Diawi to test release builds on our iPhones.

The installer is very straightforward and makes life easier when we want to try out release builds.
2023-11-28 22:46:58 +05:30
Ibrahem Khalil 6ccea1ddb2 Continue button is invisible behind keyboard in Add Address To Watch … (#17940) 2023-11-28 18:38:06 +02:00
Alex Tumanov a9a17aaae8 Implement dropdown-input based on the original dropdown component (#17927) 2023-11-28 15:21:15 +00:00
Andrea Maria Piana 6d69c278cd Update key in tests 2023-11-28 10:57:10 +00:00
Yevheniia Berdnyk c7e230d070 e2e: changed test order 2023-11-28 12:05:47 +02:00
frank d309aa366d chore: specify light client mode for wakuv2 (#18002) 2023-11-28 14:48:58 +08:00
Jamie Caprani f124ca4252 chore(wallet): add common page-nav component for account switcher (#17946) 2023-11-27 09:16:31 -08:00
Brian Sztamfater 1385e27cf4 feat: select asset screen ui (#17780)
feat: select asset screen ui

Signed-off-by: Brian Sztamfater <brian@status.im>
2023-11-27 11:03:02 -03:00
Volodymyr Kozieiev f82d28c6c9 Show network info on collectible info page (#17980) 2023-11-27 12:29:12 +00:00
Omar Basem a2856cf1c3 Wallet: Emoji picker performance (#17891)
Wallet: Emoji picker navigation perf
2023-11-27 09:57:29 +04:00
Yevheniia Berdnyk e6a7c420a2 e2e: APK upload time limit increased 2023-11-23 12:34:30 +02:00
alwx 671aa67002 Detect image dimensions correctly 2023-11-23 09:28:38 +00:00
Omar Basem dbc8df251a Wallet: Keypair follow up (#17953)
* Wallet: Keypair follow up
2023-11-23 10:00:22 +04:00
Ulises Manuel 279993b658 Add channel-name component (#17903) 2023-11-22 15:54:52 -06:00
Volodymyr Kozieiev 0c1a18b444 Connect collectible overview page to backend (#17884) 2023-11-22 19:40:26 +00:00
Omar Basem 73e9f67dbd Wallet: illustrations (#17931)
* wallet: illustrations
2023-11-21 10:55:46 +04:00
1850 changed files with 37321 additions and 32226 deletions
+142 -143
View File
@@ -1,55 +1,55 @@
status-im.utils.build/warning-handler
status-im.utils.build/get-current-sha
status-im2.constants/spacing-char
status-im2.constants/arg-wrapping-char
status-im.ios.core/init
status-im.ui.components.camera/aspects
status-im.ui.components.camera/capture-targets
status-im.ui.components.camera/set-torch
status-im.ui.components.camera/request-access-ios
status-im.chat.models.message-content/stylings
status-im.chat.models.message-content/actions
status-im.chat.models.message-content/blank-string
status-im.chat.models.message-content/sorted-ranges
status-im.ethereum.mnemonic/words->passphrase
legacy.status-im.utils.build/warning-handler
legacy.status-im.utils.build/get-current-sha
status-im.constants/spacing-char
status-im.constants/arg-wrapping-char
legacy.status-im.ios.core/init
legacy.status-im.ui.components.camera/aspects
legacy.status-im.ui.components.camera/capture-targets
legacy.status-im.ui.components.camera/set-torch
legacy.status-im.ui.components.camera/request-access-ios
legacy.status-im.chat.models.message-content/stylings
legacy.status-im.chat.models.message-content/actions
legacy.status-im.chat.models.message-content/blank-string
legacy.status-im.chat.models.message-content/sorted-ranges
legacy.status-im.ethereum.mnemonic/words->passphrase
native-module.core/listener
native-module.core/multiaccount-reset
native-module.core/extract-group-membership-signatures
native-module.core/sign-group-membership
native-module.core/update-mailservers
status-im.ethereum.abi-spec/bytes-to-hex
status-im.android.core/init
status-im.chat.models.message/transport-keys
status-im.utils.datetime/week
status-im.utils.datetime/time-ago
status-im.utils.datetime/format-date
status-im.utils.datetime/get-ordinal-date
legacy.status-im.ethereum.abi-spec/bytes-to-hex
legacy.status-im.android.core/init
legacy.status-im.chat.models.message/transport-keys
legacy.status-im.utils.datetime/week
legacy.status-im.utils.datetime/time-ago
legacy.status-im.utils.datetime/format-date
legacy.status-im.utils.datetime/get-ordinal-date
reagent.dom/render
reagent.dom/unmount-component-at-node
reagent.dom/dom-node
reagent.dom/force-update-all
status-im.multiaccounts.create.core/get-new-key-code
status-im.ethereum.decode/string
status-im.ui.screens.network.views/mainnet?
status-im.data-store.chats/event->string
status-im.mailserver.constants/seven-days
status-im.mailserver.constants/connection-timeout
status-im.hardwallet.card/install-applet
status-im.hardwallet.card/install-cash-applet
status-im.multiaccount.login.data-test/all-contacts
status-im.multiaccount.login.data-test/multiaccounts
status-im.multiaccount.login.data-test/get-chats
status-im.multiaccount.login.data-test/transport
status-im.multiaccount.login.data-test/topics
status-im.utils.utils/clear-timeout
status-im.utils.handlers/logged-in
status-im.multiaccounts.model/credentials
status-im.multiaccounts.login.core/contract-fleet?
status-im.multiaccounts.login.core/fetch-nodes
status-im2.config/rpc-networks-only?
status-im2.config/waku-enabled?
status-im.utils.pairing/has-paired-installations?
status-im.tribute-to-talk.core-test/user-cofx
legacy.status-im.multiaccounts.create.core/get-new-key-code
legacy.status-im.ethereum.decode/string
legacy.status-im.ui.screens.network.views/mainnet?
legacy.status-im.data-store.chats/event->string
legacy.status-im.mailserver.constants/seven-days
legacy.status-im.mailserver.constants/connection-timeout
legacy.status-im.hardwallet.card/install-applet
legacy.status-im.hardwallet.card/install-cash-applet
legacy.status-im.multiaccount.login.data-test/all-contacts
legacy.status-im.multiaccount.login.data-test/multiaccounts
legacy.status-im.multiaccount.login.data-test/get-chats
legacy.status-im.multiaccount.login.data-test/transport
legacy.status-im.multiaccount.login.data-test/topics
legacy.status-im.utils.utils/clear-timeout
legacy.status-im.utils.handlers/logged-in
legacy.status-im.multiaccounts.model/credentials
legacy.status-im.multiaccounts.login.core/contract-fleet?
legacy.status-im.multiaccounts.login.core/fetch-nodes
status-im.config/rpc-networks-only?
status-im.config/waku-enabled?
legacy.status-im.utils.pairing/has-paired-installations?
legacy.status-im.tribute-to-talk.core-test/user-cofx
mocks.js-dependencies/action-button
mocks.js-dependencies/camera
mocks.js-dependencies/dismiss-keyboard
@@ -78,109 +78,108 @@ mocks.js-dependencies/react-navigation-bottom-tabs
mocks.js-dependencies/react-native-haptic-feedback
mocks.js-dependencies/mock
quo.previews.main/init
status-im.chat.models.message-list-test/descending-range
status-im.chat.models.message-list-test/random-range
status-im.ethereum.eip165/supports?
status-im.utils.hex/valid-hex?
status-im.multiaccounts.core/chat-send?
status-im.hardwallet.simulated-keycard/install-cash-applet
status-im.hardwallet.simulated-keycard/sign-typed-data
status-im.utils.core/safe-read-message-content
status-im.ui.components.react/native-modules
status-im.ui.components.react/progress-bar
legacy.status-im.chat.models.message-list-test/descending-range
legacy.status-im.chat.models.message-list-test/random-range
legacy.status-im.ethereum.eip165/supports?
legacy.status-im.utils.hex/valid-hex?
legacy.status-im.multiaccounts.core/chat-send?
legacy.status-im.hardwallet.simulated-keycard/install-cash-applet
legacy.status-im.hardwallet.simulated-keycard/sign-typed-data
legacy.status-im.utils.core/safe-read-message-content
legacy.status-im.ui.components.react/native-modules
legacy.status-im.ui.components.react/progress-bar
react-native.fs/move-file
react-native.fs/read-dir
react-native.fs/mkdir
react-native.fs/unlink
react-native.fs/file-exists?
status-im.ui.components.colors/white
status-im.ui.components.colors/black
status-im.transport.core-test/messages
status-im.ui.components.core/animated-header
status-im.ui.components.core/safe-area-provider
status-im.ui.components.core/safe-area-consumer
status-im.ui.components.core/safe-area-view
status-im.utils.universal-links.core/open!
status-im.transport.filters.core-test/member-2
status-im.ui.screens.chat.ttt/one-to-one-chat-description-container
status-im.ethereum.ens/ttl
status-im.ethereum.ens/addr-hash
status-im.ethereum.ens/name-hash
status-im.ethereum.ens/ABI-hash
status-im.ethereum.ens/pubkey-hash
status-im.network.core/get-network
status-im2.constants/desktop-content-types
status-im2.constants/blocks-per-hour
status-im2.constants/one-earth-day
status-im2.constants/left-pane-min-width
status-im2.constants/system
status-im2.constants/contact-discovery
status-im2.constants/send-transaction-failed-parse-response
status-im2.constants/send-transaction-failed-parse-params
status-im2.constants/send-transaction-no-account-selected
status-im2.constants/send-transaction-invalid-tx-sender
status-im2.constants/web3-get-logs
status-im2.constants/web3-transaction-receipt
status-im2.constants/web3-new-filter
status-im2.constants/web3-new-pending-transaction-filter
status-im2.constants/web3-new-block-filter
status-im2.constants/web3-uninstall-filter
status-im2.constants/web3-get-filter-changes
status-im2.constants/web3-shh-post
status-im2.constants/web3-shh-new-identity
status-im2.constants/web3-shh-has-identity
status-im2.constants/web3-shh-new-group
status-im2.constants/web3-shh-add-to-group
status-im2.constants/web3-shh-new-filter
status-im2.constants/web3-shh-uninstall-filter
status-im2.constants/web3-shh-get-filter-changes
status-im2.constants/web3-shh-get-messages
status-im2.constants/status-create-address
status-im2.constants/event-transfer-hash
status-im2.constants/regx-rtl-characters
status-im2.constants/desktop-msg-chars-hard-limit
status-im2.constants/debug-metrics
status-im2.constants/scan-qr-code
status-im2.constants/ipfs-proto-code
status-im2.constants/swarm-proto-code
status-im.multiaccounts.update.publisher/publish-update!
status-im.utils.async/task-queue
status-im.utils.async/async-periodic-run!
status-im.desktop.core/app-root
status-im.desktop.core/init
status-im.chat.models-test/test-db
status-im.ui.components.spacing/padding-vertical
status-im.utils.money/percent-change
legacy.status-im.ui.components.colors/white
legacy.status-im.ui.components.colors/black
legacy.status-im.ui.components.core/animated-header
legacy.status-im.ui.components.core/safe-area-provider
legacy.status-im.ui.components.core/safe-area-consumer
legacy.status-im.ui.components.core/safe-area-view
legacy.status-im.utils.universal-links.core/open!
legacy.status-im.transport.filters.core-test/member-2
legacy.status-im.ui.screens.chat.ttt/one-to-one-chat-description-container
legacy.status-im.ethereum.ens/ttl
legacy.status-im.ethereum.ens/addr-hash
legacy.status-im.ethereum.ens/name-hash
legacy.status-im.ethereum.ens/ABI-hash
legacy.status-im.ethereum.ens/pubkey-hash
legacy.status-im.network.core/get-network
status-im.constants/desktop-content-types
status-im.constants/blocks-per-hour
status-im.constants/one-earth-day
status-im.constants/left-pane-min-width
status-im.constants/system
status-im.constants/contact-discovery
status-im.constants/send-transaction-failed-parse-response
status-im.constants/send-transaction-failed-parse-params
status-im.constants/send-transaction-no-account-selected
status-im.constants/send-transaction-invalid-tx-sender
status-im.constants/web3-get-logs
status-im.constants/web3-transaction-receipt
status-im.constants/web3-new-filter
status-im.constants/web3-new-pending-transaction-filter
status-im.constants/web3-new-block-filter
status-im.constants/web3-uninstall-filter
status-im.constants/web3-get-filter-changes
status-im.constants/web3-shh-post
status-im.constants/web3-shh-new-identity
status-im.constants/web3-shh-has-identity
status-im.constants/web3-shh-new-group
status-im.constants/web3-shh-add-to-group
status-im.constants/web3-shh-new-filter
status-im.constants/web3-shh-uninstall-filter
status-im.constants/web3-shh-get-filter-changes
status-im.constants/web3-shh-get-messages
status-im.constants/status-create-address
status-im.constants/event-transfer-hash
status-im.constants/regx-rtl-characters
status-im.constants/desktop-msg-chars-hard-limit
status-im.constants/debug-metrics
status-im.constants/scan-qr-code
status-im.constants/ipfs-proto-code
status-im.constants/swarm-proto-code
legacy.status-im.multiaccounts.update.publisher/publish-update!
legacy.status-im.utils.async/task-queue
legacy.status-im.utils.async/async-periodic-run!
legacy.status-im.desktop.core/app-root
legacy.status-im.desktop.core/init
legacy.status-im.chat.models-test/test-db
legacy.status-im.ui.components.spacing/padding-vertical
legacy.status-im.utils.money/percent-change
utils.debounce/clear-all
status-im.transport.db/create-chat
status-im.utils.priority-map/priority-map
status-im.utils.priority-map/priority-map-by
status-im.utils.priority-map/priority-map-keyfn
status-im.utils.priority-map/empty-message-map
status-im.wallet.choose-recipient.core/use-default-eth-gas
status-im.ui.components.animation/decay
status-im.ui.components.animation/remove-all-listeners
status-im.ui.components.animation/stop-animation
status-im.ui.components.animation/animated
status-im.ui.components.animation/add
status-im.ui.components.animation/subtract
status-im.ui.components.animation/get-layout
status-im.wallet.transactions-test/uri-query-data
status-im.utils.name/shortened-name
status-im.ui.components.button.haptic/trigger
status-im.contact.db/filter-dapps
status-im.contact.db/filter-group-contacts
status-im.contact.db/legacy-pending?
status-im.utils.transducers-test/preview-call-1
status-im.utils.transducers-test/preview-call-2
status-im.utils.types/to-string
status-im.chat.db/datemark?
status-im.chat.db/gap?
status-im.chat.db/map->sorted-seq
status-im.utils.snoopy/status-module-filter
status-im.utils.snoopy/websocket-filter
status-im.utils.snoopy/touches-filter
status-im.utils.snoopy/native-animation-filter
status-im.utils.snoopy/keyboard-observer-filter
status-im.utils.multihash/hex
status-im.utils.multihash/decode-array
legacy.status-im.transport.db/create-chat
legacy.status-im.utils.priority-map/priority-map
legacy.status-im.utils.priority-map/priority-map-by
legacy.status-im.utils.priority-map/priority-map-keyfn
legacy.status-im.utils.priority-map/empty-message-map
legacy.status-im.wallet.choose-recipient.core/use-default-eth-gas
legacy.status-im.ui.components.animation/decay
legacy.status-im.ui.components.animation/remove-all-listeners
legacy.status-im.ui.components.animation/stop-animation
legacy.status-im.ui.components.animation/animated
legacy.status-im.ui.components.animation/add
legacy.status-im.ui.components.animation/subtract
legacy.status-im.ui.components.animation/get-layout
legacy.status-im.wallet.transactions-test/uri-query-data
legacy.status-im.utils.name/shortened-name
legacy.status-im.ui.components.button.haptic/trigger
legacy.status-im.contact.db/filter-dapps
legacy.status-im.contact.db/filter-group-contacts
legacy.status-im.contact.db/legacy-pending?
legacy.status-im.utils.transducers-test/preview-call-1
legacy.status-im.utils.transducers-test/preview-call-2
legacy.status-im.utils.types/to-string
legacy.status-im.chat.db/datemark?
legacy.status-im.chat.db/gap?
legacy.status-im.chat.db/map->sorted-seq
legacy.status-im.utils.snoopy/status-module-filter
legacy.status-im.utils.snoopy/websocket-filter
legacy.status-im.utils.snoopy/touches-filter
legacy.status-im.utils.snoopy/native-animation-filter
legacy.status-im.utils.snoopy/keyboard-observer-filter
legacy.status-im.utils.multihash/hex
legacy.status-im.utils.multihash/decode-array
+14 -13
View File
@@ -1,15 +1,15 @@
{:config-paths ["status-im"]
:lint-as {status-im.utils.views/defview clojure.core/defn
status-im.utils.views/letsubs clojure.core/let
reagent.core/with-let clojure.core/let
status-im.utils.fx/defn clj-kondo.lint-as/def-catch-all
utils.re-frame/defn clj-kondo.lint-as/def-catch-all
quo.react/with-deps-check clojure.core/fn
quo.previews.preview/list-comp clojure.core/for
status-im.utils.styles/def clojure.core/def
status-im.utils.styles/defn clojure.core/defn
test-helpers.unit/deftest-sub clojure.core/defn
taoensso.tufte/defnp clojure.core/defn}
:lint-as {legacy.status-im.utils.views/defview clojure.core/defn
legacy.status-im.utils.views/letsubs clojure.core/let
reagent.core/with-let clojure.core/let
legacy.status-im.utils.fx/defn clj-kondo.lint-as/def-catch-all
utils.re-frame/defn clj-kondo.lint-as/def-catch-all
quo.react/with-deps-check clojure.core/fn
quo.previews.preview/list-comp clojure.core/for
legacy.status-im.utils.styles/def clojure.core/def
legacy.status-im.utils.styles/defn clojure.core/defn
test-helpers.unit/deftest-sub clojure.core/defn
taoensso.tufte/defnp clojure.core/defn}
:linters {:case-duplicate-test {:level :error}
:case-quoted-test {:level :error}
:case-symbol-test {:level :error}
@@ -32,7 +32,8 @@
:docstring-blank {:level :error}
:equals-true {:level :error}
:inline-def {:level :error}
:invalid-arity {:skip-args [status-im.utils.fx/defn utils.re-frame/defn]}
:invalid-arity {:skip-args [legacy.status-im.utils.fx/defn
utils.re-frame/defn]}
:loop-without-recur {:level :error}
:minus-one {:level :error}
:misplaced-docstring {:level :error}
@@ -62,7 +63,7 @@
;; https://github.com/borkdude/clj-kondo/issues/867
:unresolved-symbol {:exclude [PersistentPriorityMap.EMPTY
number
status-im.test-helpers/restore-app-db]}
legacy.status-im.test-helpers/restore-app-db]}
:unresolved-var {:level :error}
:unsorted-required-namespaces {:level :error}
:unused-alias {:level :warning}
@@ -0,0 +1,4 @@
{:linters
{:unresolved-symbol
{:exclude [(cljs.test/is [match? thrown-match?])
(clojure.test/is [match? thrown-match?])]}}}
@@ -0,0 +1,5 @@
{:lint-as
{rewrite-clj.zip/subedit-> clojure.core/->
rewrite-clj.zip/subedit->> clojure.core/->>
rewrite-clj.zip/edit-> clojure.core/->
rewrite-clj.zip/edit->> clojure.core/->>}}
+7 -1
View File
@@ -1,2 +1,8 @@
{:hooks {:analyze-call {utils.i18n/label utils.i18n/label}}
{:hooks
{:analyze-call
{utils.i18n/label utils.i18n/label
test-helpers.component/get-all-by-translation-text utils.i18n/label
test-helpers.component/get-by-translation-text utils.i18n/label
test-helpers.component/query-all-by-translation-text utils.i18n/label
test-helpers.component/query-by-translation-text utils.i18n/label}}
:linters {:status-im.linter/invalid-translation-keyword {:level :error}}}
+1
View File
@@ -0,0 +1 @@
{:hooks {:analyze-call {taoensso.encore/defalias taoensso.encore/defalias}}}
@@ -0,0 +1,16 @@
(ns taoensso.encore
(:require
[clj-kondo.hooks-api :as hooks]))
(defn defalias [{:keys [node]}]
(let [[sym-raw src-raw] (rest (:children node))
src (if src-raw src-raw sym-raw)
sym (if src-raw
sym-raw
(symbol (name (hooks/sexpr src))))]
{:node (with-meta
(hooks/list-node
[(hooks/token-node 'def)
(hooks/token-node (hooks/sexpr sym))
(hooks/token-node (hooks/sexpr src))])
(meta src))}))
+1 -1
View File
@@ -1,4 +1,4 @@
module.exports = {
root: true,
extends: '@react-native-community',
extends: '@react-native',
};
+4 -4
View File
@@ -36,6 +36,10 @@ project.xcworkspace
**/android/.project
**/android/.settings/org.eclipse.buildship.core.prefs
local.properties
*.hprof
.cxx/
*.keystore
!debug.keystore
# Atom
.tags*
@@ -190,7 +194,3 @@ test/appium/tests/users.py
## git hooks
lefthook.yml
## clj-kondo
/.clj-kondo/taoensso/*
/.clj-kondo/babashka/*
+4 -4
View File
@@ -1,10 +1,10 @@
{
"include": [
"target/test/status_im/**"
"target/test/legacy/status_im/**"
],
"exclude": [
"target/test/status_im/test/**",
"target/test/status_im/ui/**"
"target/test/legacy/status_im/test/**",
"target/test/legacy/status_im/ui/**"
],
"report-dir": "./coverage-report",
"all": true,
@@ -14,4 +14,4 @@
"exclude-after-remap": false,
"extension": [".js"],
"reporter": ["lcovonly"]
}
}
+23 -18
View File
@@ -1,30 +1,34 @@
;; -*- mode: clojure -*-
;; vi: ft=clojure
{:width 105
:style [;; community style
;; https://github.com/kkinnear/zprint/blob/main/doc/reference.md#community
:community
{:width 105
:remove {:fn-force-nl #{:noarg1-body}}
;; no comma in map
:no-comma
:style
[;; community style https://github.com/kkinnear/zprint/blob/main/doc/reference.md#community
:community
:custom-justify
;; no comma in map
:no-comma
;; respect all newlines
;; https://github.com/kkinnear/zprint/blob/main/doc/reference.md#respect-nl
:respect-nl
:custom-justify
;; respect blank line
;; https://github.com/kkinnear/zprint/blob/main/doc/reference.md#respect-bl
:respect-bl
;; respect all newlines https://github.com/kkinnear/zprint/blob/main/doc/reference.md#respect-nl
:respect-nl
;; respect blank line https://github.com/kkinnear/zprint/blob/main/doc/reference.md#respect-bl
:respect-bl
;; hang multiline left-hand-thing https://github.com/kkinnear/zprint/issues/273
:multi-lhs-hang]
;; hang multiline left-hand-thing
;; https://github.com/kkinnear/zprint/issues/273
:multi-lhs-hang]
:fn-map
{"reg-sub" :arg1-pair
"h/describe" :arg1-body
"h/describe-skip" :arg1-body
"h/describe-only" :arg1-body
"h/test" :arg1-body
"h/test-skip" :arg1-body
"h/test-only" :arg1-body
"global.describe" :arg1-body
"global.test" :arg1-body
"list-comp" :binding
@@ -32,6 +36,7 @@
"letsubs" :binding
"with-let" "let"
"reg-event-fx" :arg1-pair
"reg-fx" :arg1-pair
"testing" :arg1-body
"deftest-sub" :arg1-body
"wait-for" :arg1-body
@@ -45,9 +50,9 @@
"assoc-some" "assoc"
"conj-when" "conj"
"conj-some" "conj"}
:remove {:fn-force-nl #{:noarg1-body}}
:style-map
{:no-comma {:map {:comma? false}}
{:no-comma {:map {:comma? false}}
:custom-justify
{:doc "Justify everything using pre-1.1.2 approach"
:binding {:justify? true :justify {:max-variance 1000}}
+48 -27
View File
@@ -279,8 +279,10 @@ run-android: ##@run Build Android APK and start it on the device
npx react-native run-android --appIdSuffix debug
SIMULATOR=iPhone 13
# TODO: fix IOS_STATUS_GO_TARGETS to be either amd64 or arm64 when RN is upgraded
run-ios: export TARGET := ios
run-ios: export IOS_STATUS_GO_TARGETS := iossimulator/amd64
run-ios: export IOS_STATUS_GO_TARGETS := ios/arm64;iossimulator/amd64
run-ios: export XCBeautify=$(shell which xcbeautify) # for react-native-cli to pick this up and to auto format output
run-ios: ##@run Build iOS app and start it in a simulator/device
ifneq ("$(SIMULATOR)", "")
npx react-native run-ios --simulator="$(SIMULATOR)"
@@ -291,8 +293,9 @@ endif
show-ios-devices: ##@other shows connected ios device and its name
xcrun xctrace list devices
# TODO: fix IOS_STATUS_GO_TARGETS to be either amd64 or arm64 when RN is upgraded
run-ios-device: export TARGET := ios
run-ios-device: export IOS_STATUS_GO_TARGETS := ios/arm64
run-ios-device: export IOS_STATUS_GO_TARGETS := ios/arm64;iossimulator/amd64
run-ios-device: ##@run iOS app and start it on a connected device by its name
ifndef DEVICE_NAME
$(error Usage: make run-ios-device DEVICE_NAME=your-device-name)
@@ -305,7 +308,7 @@ endif
# Get all clojure files, including untracked, excluding removed
define find_all_clojure_files
$$(comm -23 <(sort <(git ls-files --cached --others --exclude-standard)) <(sort <(git ls-files --deleted)) | grep -e \.clj$$ -e \.cljs$$ -e \.cljc$$ -e \.edn)
$$(comm -23 <(sort <(git ls-files --cached --others --exclude-standard)) <(sort <(git ls-files --deleted)) | grep -E '((\.clj-kondo\/status-im)|(src).*\.clj[sc]?$$)|((\.clj-kondo\/(status-im|config))|(src).*\.edn$$)|shadow-cljs\.edn')
endef
lint: export TARGET := clojure
@@ -327,7 +330,7 @@ lint-fix: ##@test Run code style checks and fix issues
ALL_CLOJURE_FILES=$(call find_all_clojure_files) && \
zprint '{:search-config? true}' -sw $$ALL_CLOJURE_FILES && \
zprint '{:search-config? true}' -sw $$ALL_CLOJURE_FILES && \
clojure-lsp --ns-exclude-regex ".*/src/status_im2/core\.cljs$$" clean-ns && \
clojure-lsp --ns-exclude-regex ".*/\.clj-kondo/.*|.*/src/status_im/core\.cljs|.*/src/test_helpers/component_tests_preload\.cljs$$" clean-ns && \
sh scripts/lint/trailing-newline.sh --fix && \
node_modules/.bin/prettier --write .
@@ -335,26 +338,44 @@ shadow-server: export TARGET := clojure
shadow-server:##@ Start shadow-cljs in server mode for watching
yarn shadow-cljs server
test-watch: export TARGET := clojure
test-watch: ##@ Watch tests and re-run no changes to cljs files
yarn install
nodemon --exec 'yarn shadow-cljs compile mocks && yarn shadow-cljs compile test && node --require ./test-resources/override.js target/test/test.js' -e cljs
test-watch-for-repl: export TARGET := clojure
test-watch-for-repl: ##@ Watch tests and support REPL connections
yarn install
rm -f target/test/test.js
concurrently --kill-others --prefix-colors 'auto' --names 'build,repl' \
'yarn shadow-cljs compile mocks && yarn shadow-cljs watch test --verbose' \
'until [ -f ./target/test/test.js ] ; do sleep 1 ; done ; node --require ./test-resources/override.js ./target/test/test.js --repl'
test: export TARGET := clojure
test: ##@test Run tests once in NodeJS
# Here we create the gyp bindings for nodejs
yarn install
_test-clojure: export TARGET := clojure
_test-clojure: export WATCH ?= false
_test-clojure:
ifeq ($(WATCH), true)
yarn install && \
yarn shadow-cljs compile mocks && \
nodemon --exec "yarn shadow-cljs compile test && node --require ./test-resources/override.js $$SHADOW_OUTPUT_TO" -e cljs
else
yarn install && \
yarn shadow-cljs compile mocks && \
yarn shadow-cljs compile test && \
node --require ./test-resources/override.js target/test/test.js
node --require ./test-resources/override.js "$$SHADOW_OUTPUT_TO"
endif
test: export SHADOW_OUTPUT_TO := target/test/test.js
test: export SHADOW_NS_REGEXP := .*-test$$
test: ##@test Run all Clojure tests
test: _test-clojure
test-watch-for-repl: export SHADOW_OUTPUT_TO := target/test/test.js
test-watch-for-repl: export SHADOW_NS_REGEXP := .*-test$$
test-watch-for-repl: ##@test Watch all Clojure tests and support REPL connections
yarn install
rm -f target/test/test.js
yarn shadow-cljs compile mocks && \
concurrently --kill-others --prefix-colors 'auto' --names 'build,repl' \
'yarn shadow-cljs watch test --verbose' \
"until [ -f $$SHADOW_OUTPUT_TO ] ; do sleep 1 ; done ; node --require ./test-resources/override.js $$SHADOW_OUTPUT_TO --repl"
test-unit: export SHADOW_OUTPUT_TO := target/unit_test/test.js
test-unit: export SHADOW_NS_REGEXP := ^(?!status-im\.integration-test).*-test$$
test-unit: ##@test Run unit tests
test-unit: _test-clojure
test-integration: export SHADOW_OUTPUT_TO := target/integration_test/test.js
test-integration: export SHADOW_NS_REGEXP := ^status-im\.integration-test.*$$
test-integration: ##@test Run integration tests
test-integration: _test-clojure
android-test: jsbundle
android-test: export TARGET := android
@@ -364,21 +385,21 @@ android-test:
component-test-watch: export TARGET := clojure
component-test-watch: export COMPONENT_TEST := true
component-test-watch: export BABEL_ENV := test
component-test-watch: export JEST_USE_SILENT_REPORTER := false
component-test-watch: ##@ Watch tests and re-run no changes to cljs files
@@scripts/check-metro-shadow-process.sh
@scripts/check-metro-shadow-process.sh
rm -rf ./component-spec
yarn install
nodemon --exec 'yarn shadow-cljs compile component-test && jest --config=test/jest/jest.config.js' -e cljs
nodemon --exec 'yarn shadow-cljs compile component-test && jest --config=test/jest/jest.config.js --testEnvironment node ' -e cljs
component-test: export TARGET := clojure
component-test: export COMPONENT_TEST := true
component-test: export BABEL_ENV := test
component-test: export JEST_USE_SILENT_REPORTER := false
component-test: ##@test Run component tests once in NodeJS
@scripts/check-metro-shadow-process.sh
rm -rf ./component-spec
yarn install
yarn shadow-cljs compile component-test && \
jest --config=test/jest/jest.config.js
jest --clearCache && jest --config=test/jest/jest.config.js --testEnvironment node
#--------------
# Other
+60 -211
View File
@@ -1,128 +1,75 @@
apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"
apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"
import com.android.build.OutputFile
import com.sun.org.apache.xalan.internal.xsltc.compiler.Copy
/**
* The react.gradle file registers a task for each build variant:
* - bundlePrJsAndAssets
* - bundleDebugJsAndAssets
* - bundleReleaseJsAndAssets
* These basically call `react-native bundle` with the correct arguments during the Android build
* cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
* bundle directly from the development server. Below you can see all the possible configurations
* and their defaults. If you decide to add a configuration block, make sure to add it before the
* `apply from: "../../node_modules/react-native/react.gradle"` line.
*
* project.ext.react = [
* // the name of the generated asset file containing your JS bundle
* bundleAssetName: "index.android.bundle",
*
* // the entry file for bundle generation
* entryFile: "index.js",
*
* // whether to bundle JS and assets in debug mode
* bundleInDebug: false,
*
* // whether to bundle JS and assets in release mode
* bundleInRelease: true,
*
* // whether to bundle JS and assets in another build variant (if configured).
* // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
* // The configuration property can be in the following formats
* // 'bundleIn${productFlavor}${buildType}'
* // 'bundleIn${buildType}'
* // bundleInFreeDebug: true,
* // bundleInPaidRelease: true,
* // bundleInBeta: true,
*
* // whether to disable dev mode in custom build variants (by default only disabled in release)
* // for example: to disable dev mode in the staging build type (if configured)
* devDisabledInStaging: true,
* // The configuration property can be in the following formats
* // 'devDisabledIn${productFlavor}${buildType}'
* // 'devDisabledIn${buildType}'
*
* // the root of your project, i.e. where "package.json" lives
* root: "../../",
*
* // where to put the JS bundle asset in debug mode
* jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
*
* // where to put the JS bundle asset in release mode
* jsBundleDirRelease: "$buildDir/intermediates/assets/release",
*
* // where to put drawable resources / React Native assets, e.g. the ones you use via
* // require('./image.png')), in debug mode
* resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
*
* // where to put drawable resources / React Native assets, e.g. the ones you use via
* // require('./image.png')), in release mode
* resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
*
* // by default the gradle tasks are skipped if none of the JS files or assets change; this means
* // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
* // date; if you have any other folders that you want to ignore for performance reasons (gradle
* // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
* // for example, you might want to remove it from here.
* inputExcludes: ["android/**", "ios/**"],
*
* // override which node gets called and with what additional arguments
* nodeExecutableAndArgs: ["node", "--max-old-space-size=8192"],
*
* // supply additional arguments to the packager
* extraPackagerArgs: []
* ]
*/
/*
Enabling Hermes on x86 devices is crashing the app after a few reloads,
this flag can be used to disable Hermes while building app.
https://github.com/status-im/status-mobile/issues/14031
* This is the configuration block to customize your React Native Android app.
* By default you don't need to apply any configuration, just uncomment the lines you need.
*/
react {
/* Folders */
// The root of your project, i.e. where "package.json" lives. Default is '..'
// root = file("../")
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
// reactNativeDir = file("../node_modules/react-native")
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
// codegenDir = file("../node_modules/@react-native/codegen")
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
// cliFile = file("../node_modules/react-native/cli.js")
def disableHermes = System.getenv('DISABLE_HERMES') == 'true'
/* Variants */
// The list of variants to that are debuggable. For those we're going to
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
// debuggableVariants = ["liteDebug", "prodDebug"]
project.ext.react = [
nodeExecutableAndArgs: ["node", "--max-old-space-size=16384"],
entryFile: "index.js",
/* NOTE: Hermes engine is required for Android 64-bit builds running on 64 devices,
* to guard against a hang in the UI thread after invoking status-go.
* Also a clean and rebuild is required when changing this. */
enableHermes: !disableHermes,
/* Disable 'The first definition was here.' warnings */
hermesFlagsRelease: ["-w"],
/* FIXME: Workaround for crash caused by missing libhermes-executor-release.so.
* https://github.com/facebook/react-native/issues/32928 */
deleteDebugFilesForVariant: { false },
enableVmCleanup: false,
bundleInPr: true,
inputExcludes: ["android/**", "ios/**", "react-native/**", "src/**", "test/**"]
]
/* Bundling */
// A list containing the node command and its flags. Default is just 'node'.
nodeExecutableAndArgs = ["node", "--max-old-space-size=16384" ]
//
// The command to run when bundling. By default is 'bundle'
// bundleCommand = "ram-bundle"
//
// The path to the CLI configuration file. Default is empty.
// bundleConfig = file(../rn-cli.config.js)
//
// The name of the generated asset file containing your JS bundle
// bundleAssetName = "MyApplication.android.bundle"
//
// The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
// entryFile = file("../js/MyApplication.android.js")
//
// A list of extra flags to pass to the 'bundle' commands.
// See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
// extraPackagerArgs = []
// NOTE: Uncomment if building RN from a fork
// configurations.all {
// exclude group: 'com.facebook.react', module: 'react-native'
// }
apply from: "../../node_modules/react-native/react.gradle"
/* Hermes Commands */
// The hermes compiler command to run. By default it is 'hermesc'
// hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
//
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
// hermesFlags = ["-O", "-output-source-map"]
}
/**
* Run Proguard to shrink the Java bytecode in release builds.
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
*/
def enableProguardInReleaseBuilds = false
/**
* The preferred build flavor of JavaScriptCore.
* The preferred build flavor of JavaScriptCore (JSC)
*
* For example, to use the international variant, you can use:
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
*
* The international variant includes ICU i18n library and necessary data
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
* give correct results when using with locales other than en-US. Note that
* give correct results when using with locales other than en-US. Note that
* this variant is about 6MiB larger per architecture than default.
*/
def jscFlavor = 'org.webkit:android-jsc:+'
@@ -134,15 +81,8 @@ def jscFlavor = 'org.webkit:android-jsc:+'
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
* and the benefits of using Hermes will therefore be sharply reduced.
*/
def enableHermes = project.ext.react.get("enableHermes", false);
def enableHermes = hermesEnabled.toBoolean();
/**
* Architectures to build native code for.
*/
def reactNativeArchitectures() {
def value = project.getProperties().get("reactNativeArchitectures")
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
}
def getCommitHash = { ->
if (project.hasProperty("commitHash")) {
@@ -205,6 +145,7 @@ android {
targetCompatibility JavaVersion.VERSION_11
}
namespace "im.status.ethereum"
defaultConfig {
applicationId "im.status.ethereum"
minSdkVersion rootProject.ext.minSdkVersion
@@ -220,70 +161,8 @@ android {
abiFilters getEnvOrConfig('ANDROID_ABI_INCLUDE').split(";")
}
}
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
if (isNewArchitectureEnabled()) {
// We configure the NDK build only if you decide to opt-in for the New Architecture.
externalNativeBuild {
ndkBuild {
arguments "APP_PLATFORM=android-21",
"APP_STL=c++_shared",
"NDK_TOOLCHAIN_VERSION=clang",
"GENERATED_SRC_DIR=$buildDir/generated/source",
"PROJECT_BUILD_DIR=$buildDir",
"REACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid",
"REACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build",
"NODE_MODULES_DIR=$rootDir/../node_modules"
cFlags "-Wall", "-Werror", "-fexceptions", "-frtti", "-DWITH_INSPECTOR=1"
cppFlags "-std=c++17"
// Make sure this target name is the same you specify inside the
// src/main/jni/Android.mk file for the `LOCAL_MODULE` variable.
targets "rndiffapp_appmodules"
}
}
}
}
if (isNewArchitectureEnabled()) {
// We configure the NDK build only if you decide to opt-in for the New Architecture.
externalNativeBuild {
ndkBuild {
path "$projectDir/src/main/jni/Android.mk"
}
}
def reactAndroidProjectDir = project(':ReactAndroid').projectDir
def packageReactNdkDebugLibs = tasks.register("packageReactNdkDebugLibs", Copy) {
dependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck")
from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
into("$buildDir/react-ndk/exported")
}
def packageReactNdkReleaseLibs = tasks.register("packageReactNdkReleaseLibs", Copy) {
dependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck")
from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
into("$buildDir/react-ndk/exported")
}
afterEvaluate {
// If you wish to add a custom TurboModule or component locally,
// you should uncomment this line.
// preBuild.dependsOn("generateCodegenArtifactsFromSchema")
preDebugBuild.dependsOn(packageReactNdkDebugLibs)
preReleaseBuild.dependsOn(packageReactNdkReleaseLibs)
// Due to a bug inside AGP, we have to explicitly set a dependency
// between configureNdkBuild* tasks and the preBuild tasks.
// This can be removed once this is solved: https://issuetracker.google.com/issues/207403732
configureNdkBuildRelease.dependsOn(preReleaseBuild)
configureNdkBuildDebug.dependsOn(preDebugBuild)
reactNativeArchitectures().each { architecture ->
tasks.findByName("configureNdkBuildDebug[${architecture}]")?.configure {
dependsOn("preDebugBuild")
}
tasks.findByName("configureNdkBuildRelease[${architecture}]")?.configure {
dependsOn("preReleaseBuild")
}
}
}
}
/**
* Arbitrary project metadata
* https://docs.gradle.org/current/dsl/org.gradle.api.plugins.ExtraPropertiesExtension.html
@@ -354,10 +233,11 @@ android {
versionNameSuffix ".pr"
debuggable false
matchingFallbacks = ["release"]
// necessary to make react-native-config's code generation work
resValue "string", "build_config_package", "im.status.ethereum"
// necessary to make react-native-config's code generation work
resValue "string", "build_config_package", "im.status.ethereum"
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
@@ -373,6 +253,7 @@ android {
}
}
aaptOptions {
// disable PNG optimization as for some reason it cannot be trusted to provide deterministic output (see https://f-droid.org/en/docs/Reproducible_Builds/)
cruncherEnabled = false
@@ -384,16 +265,12 @@ android {
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.facebook.react:react-native:+" // From node_modules
implementation 'com.facebook.soloader:soloader:0.10.3+'
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")
implementation "androidx.core:core-splashscreen:1.0.0"
if (enableHermes) {
//noinspection GradleDynamicVersion
implementation("com.facebook.react:hermes-engine:+") { // From node_modules
exclude group: 'com.facebook.fbjni' }
if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
} else {
implementation jscFlavor
}
@@ -401,37 +278,17 @@ dependencies {
// react-native-screens
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02'
implementation 'androidx.multidex:multidex:2.0.1' // only needed if minSdkVersion is less than 21 (https://developer.android.com/studio/build/multidex)
implementation project(':react-native-dialogs')
implementation 'androidx.multidex:multidex:2.0.1' // required by status-mobile/android/app/src/main/java/im/status/ethereum/MainApplication.java
implementation project(':react-native-blur')
// Force using exact RN version instead of relying on gradle dependency resolution
// https://docs.gradle.org/current/userguide/introduction_dependency_management.html#sec:dependency_resolution
// NOTE: Uncomment if building RN from a fork
//compile ("com.facebook.react:react-native:0.55.4") { force = true } // From node_modules
implementation project(':react-native-status')
implementation project(':react-native-status-keycard')
implementation 'com.github.status-im:function:0.0.1'
implementation 'com.facebook.fresco:fresco:2.5.0'
implementation 'com.facebook.fresco:animated-gif:2.5.0'
implementation "com.squareup.okhttp3:okhttp-tls:4.9.2"
implementation("com.google.prefab:cli:2.0.0")
}
if (isNewArchitectureEnabled()) {
// If new architecture is enabled, we let you build RN from source
// Otherwise we fallback to a prebuilt .aar bundled in the NPM package.
// This will be applied to all the imported transtitive dependency.
configurations.all {
resolutionStrategy.dependencySubstitution {
substitute(module("com.facebook.react:react-native"))
.using(project(":ReactAndroid"))
.because("On New Architecture we're building React Native from source")
substitute(module("com.facebook.react:hermes-engine"))
.using(project(":ReactAndroid:hermes-engine"))
.because("On New Architecture we're building Hermes from source")
}
}
}
def getLocalNDKDir = { ->
def rootDir = project.rootDir
@@ -466,11 +323,3 @@ task hemroidBuild(type: Exec) {
preBuild.dependsOn hemroidBuild
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
def isNewArchitectureEnabled() {
// To opt-in for the New Architecture, you can either:
// - Set `newArchEnabled` to true inside the `gradle.properties` file
// - Invoke gradle with `-newArchEnabled=true`
// - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true`
return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
}
+4 -5
View File
@@ -1,7 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:installLocation="auto"
package="im.status.ethereum">
android:installLocation="auto">
<!-- non-dangerous permissions -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
@@ -17,11 +16,11 @@
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="28" />
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<application
@@ -1,260 +0,0 @@
package im.status.ethereum;
import android.content.Context;
import android.annotation.TargetApi;
import androidx.annotation.Nullable;
import android.app.AlertDialog;
import android.app.ActivityManager;
import android.content.DialogInterface;
import android.content.DialogInterface.OnCancelListener;
import android.content.DialogInterface.OnClickListener;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Build;
import android.os.Looper;
import android.preference.PreferenceManager;
import androidx.core.app.ActivityCompat;
import android.util.Log;
import android.view.WindowManager;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.provider.Settings;
import android.os.Bundle;
import android.os.Handler;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.ReactRootView;
import com.facebook.react.modules.core.DeviceEventManagerModule;
import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.WritableMap;
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
import com.reactnativenavigation.NavigationActivity;
import com.facebook.react.modules.core.PermissionListener;
import androidx.core.splashscreen.SplashScreen;
import com.facebook.react.ReactActivity;
import java.util.Properties;
import im.status.ethereum.module.StatusThreadPoolExecutor;
import im.status.ethereum.MainApplication;
public class MainActivity extends NavigationActivity
implements ActivityCompat.OnRequestPermissionsResultCallback{
@Nullable private PermissionListener mPermissionListener;
private boolean keepSplash = true;
private final int SPLASH_DELAY = 3200;
private static void registerUncaughtExceptionHandler(final Context context) {
final Thread.UncaughtExceptionHandler defaultUncaughtExceptionHandler = Thread.getDefaultUncaughtExceptionHandler();
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
@Override
public void uncaughtException(final Thread thread, final Throwable t) {
// High priority, so don't use StatusThreadPoolExecutor
new Thread() {
@Override
public void run() {
Looper.prepare();
new AlertDialog.Builder(context)
.setTitle("Error")
.setMessage(t.toString())
.setNegativeButton("Exit", new DialogInterface.OnClickListener() {
public void onClick(final DialogInterface dialog, final int id) {
dialog.dismiss();
defaultUncaughtExceptionHandler.uncaughtException(thread, t);
}
}).show();
Looper.loop();
}
}.start();
}
});
}
private ActivityManager getActivityManager() {
return (ActivityManager) this.getSystemService(ACTIVITY_SERVICE);
}
private ActivityManager.MemoryInfo getAvailableMemory(final ActivityManager activityManager) {
final ActivityManager.MemoryInfo memoryInfo = new ActivityManager.MemoryInfo();
activityManager.getMemoryInfo(memoryInfo);
return memoryInfo;
}
protected void configureStatus() {
// Required because of crazy APN settings redirecting localhost (found in GB)
Properties properties = System.getProperties();
properties.setProperty("http.nonProxyHosts", "localhost|127.0.0.1");
properties.setProperty("https.nonProxyHosts", "localhost|127.0.0.1");
}
private Intent createNotificationSettingsIntent() {
final Intent intent = new Intent();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
intent.setAction(Settings.ACTION_APP_NOTIFICATION_SETTINGS);
intent.putExtra(Settings.EXTRA_APP_PACKAGE, getPackageName());
} else {
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
intent.addCategory(Intent.CATEGORY_DEFAULT);
intent.setData(Uri.parse("package:" + getPackageName()));
}
return intent;
}
private void tryToEmit(String eventName, WritableMap event) {
try {
((MainApplication) getApplication()).getReactNativeHost()
.getReactInstanceManager()
.getCurrentReactContext()
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
.emit("url", event);
} catch(Exception e) {/* we expect NPE on first start, which is OK because we have a fallback */}
}
@Override
public void onNewIntent(final Intent intent) {
super.onNewIntent(intent);
if (intent.getDataString() != null && intent.getData().getScheme().startsWith("app-settings")) {
startActivity(createNotificationSettingsIntent());
}
}
@Override
protected void onCreate(Bundle savedInstanceState) {
SplashScreen splashScreen = SplashScreen.installSplashScreen(this);
setTheme(R.style.DarkTheme);
// Make sure we get an Alert for every uncaught exceptions
registerUncaughtExceptionHandler(MainActivity.this);
// Report memory details for this application
final ActivityManager activityManager = getActivityManager();
Log.v("RNBootstrap", "Available system memory "+getAvailableMemory(activityManager).availMem + ", maximum usable application memory " + activityManager.getLargeMemoryClass()+"M");
setSecureFlag();
// NOTE: Try to not restore the state https://github.com/software-mansion/react-native-screens/issues/17
super.onCreate(null);
if (!shouldShowRootedNotification()) {
configureStatus();
} else {
AlertDialog dialog = new AlertDialog.Builder(MainActivity.this)
.setMessage(getResources().getString(R.string.root_warning))
.setPositiveButton(getResources().getString(R.string.root_okay), new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
rejectRootedNotification();
dialog.dismiss();
configureStatus();
}
})
.setNegativeButton(getResources().getString(R.string.root_cancel), new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
MainActivity.this.finishAffinity();
}
})
.setOnCancelListener(new OnCancelListener() {
@Override
public void onCancel(DialogInterface dialog) {
dialog.dismiss();
MainActivity.this.finishAffinity();
}
})
.create();
dialog.show();
}
Runnable r = new Runnable() {
@Override
public void run() {
System.loadLibrary("status-logs");
// when app is started but the Activity has been destroyed, the deep linking url event is
// not emitted when coming back to foreground. This is a workaround. If the problem is
// resolved in react-native this code should be removed
if (getIntent().getData() != null) {
WritableMap event = Arguments.createMap();
event.putString("url", getIntent().getDataString());
// on first start emit will (silently) fail, but the regular deep linking handler will work
tryToEmit("url", event);
}
}
};
splashScreen.setKeepOnScreenCondition(() -> keepSplash);
Handler handler = new Handler();
handler.postDelayed(() -> keepSplash = false, SPLASH_DELAY);
StatusThreadPoolExecutor.getInstance().execute(r);
}
@Override
protected void onDestroy() {
super.onDestroy();
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
Intent intent = new Intent("onConfigurationChanged");
intent.putExtra("newConfig", newConfig);
this.sendBroadcast(intent);
}
private static final String REJECTED_ROOTED_NOTIFICATION = "rejectedRootedNotification";
private static final Integer FREQUENCY_OF_REMINDER_IN_PERCENT = 5;
private boolean shouldShowRootedNotification() {
if (RootUtil.isDeviceRooted() && BuildConfig.ENABLE_ROOT_ALERT == "1") {
if (userRejectedRootedNotification()) {
return ((Math.random() * 100) < FREQUENCY_OF_REMINDER_IN_PERCENT);
} else return true;
} else {
return false;
}
}
private boolean userRejectedRootedNotification() {
SharedPreferences preferences = getPreferences(0);
return preferences.getBoolean(REJECTED_ROOTED_NOTIFICATION, false);
}
private void rejectRootedNotification() {
SharedPreferences preferences = getPreferences(0);
SharedPreferences.Editor editor = preferences.edit();
editor.putBoolean(REJECTED_ROOTED_NOTIFICATION, true);
editor.commit();
}
private void setSecureFlag() {
final SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
final boolean setSecure = sharedPrefs.getBoolean("BLANK_PREVIEW", false);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH && setSecure) {
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
} else {
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_SECURE);
}
}
@TargetApi(Build.VERSION_CODES.M)
public void requestPermissions(String[] permissions, int requestCode, PermissionListener listener) {
mPermissionListener = listener;
requestPermissions(permissions, requestCode);
}
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
if (mPermissionListener != null && mPermissionListener.onRequestPermissionsResult(requestCode, permissions, grantResults)) {
mPermissionListener = null;
}
}
}
@@ -0,0 +1,236 @@
package im.status.ethereum
import android.annotation.TargetApi
import android.app.ActivityManager
import android.app.AlertDialog
import android.content.Context
import android.content.DialogInterface
import android.content.Intent
import android.content.SharedPreferences
import android.content.pm.PackageManager
import android.content.res.Configuration
import android.net.Uri
import android.os.Build
import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.preference.PreferenceManager
import android.provider.Settings
import android.util.Log
import android.view.WindowManager
import androidx.annotation.Nullable
import androidx.core.app.ActivityCompat
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import com.facebook.react.ReactActivityDelegate
import com.facebook.react.bridge.Arguments
import com.facebook.react.bridge.WritableMap
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint
import com.facebook.react.defaults.DefaultReactActivityDelegate
import com.facebook.react.modules.core.DeviceEventManagerModule
import com.facebook.react.modules.core.PermissionListener
import com.reactnativenavigation.NavigationActivity
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView
import im.status.ethereum.MainApplication
import im.status.ethereum.module.StatusThreadPoolExecutor
import java.util.Properties
class MainActivity : NavigationActivity(), ActivityCompat.OnRequestPermissionsResultCallback {
@Nullable
private var mPermissionListener: PermissionListener? = null
private var keepSplash = true
private val SPLASH_DELAY = 3200
/**
* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
*/
protected fun getMainComponentName(): String {
return "StatusIm"
}
private fun registerUncaughtExceptionHandler(context: Context) {
val defaultUncaughtExceptionHandler = Thread.getDefaultUncaughtExceptionHandler()
// High priority, so don't use StatusThreadPoolExecutor
Thread.setDefaultUncaughtExceptionHandler { thread, t ->
Thread {
Looper.prepare()
AlertDialog.Builder(context)
.setTitle("Error")
.setMessage(t.toString())
.setNegativeButton("Exit") { dialog, id ->
dialog.dismiss()
defaultUncaughtExceptionHandler.uncaughtException(thread, t)
}.show()
Looper.loop()
}.start()
}
}
private fun getActivityManager(): ActivityManager {
return getSystemService(ACTIVITY_SERVICE) as ActivityManager
}
private fun getAvailableMemory(activityManager: ActivityManager): ActivityManager.MemoryInfo {
val memoryInfo = ActivityManager.MemoryInfo()
activityManager.getMemoryInfo(memoryInfo)
return memoryInfo
}
protected fun configureStatus() {
// Required because of crazy APN settings redirecting localhost (found in GB)
val properties = System.getProperties()
properties.setProperty("http.nonProxyHosts", "localhost|127.0.0.1")
properties.setProperty("https.nonProxyHosts", "localhost|127.0.0.1")
}
private fun createNotificationSettingsIntent(): Intent {
val intent = Intent()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
intent.action = Settings.ACTION_APP_NOTIFICATION_SETTINGS
intent.putExtra(Settings.EXTRA_APP_PACKAGE, packageName)
} else {
intent.action = Settings.ACTION_APPLICATION_DETAILS_SETTINGS
intent.addCategory(Intent.CATEGORY_DEFAULT)
intent.data = Uri.parse("package:$packageName")
}
return intent
}
private fun tryToEmit(eventName: String, event: WritableMap) {
try {
(getApplication() as MainApplication).getReactNativeHost()
.getReactInstanceManager()
.getCurrentReactContext()
?.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
?.emit("url", event)
} catch (e: Exception) { // we expect NPE on first start, which is OK because we have a fallback
}
}
override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
if (intent.dataString != null && intent.data!!.scheme!!.startsWith("app-settings")) {
startActivity(createNotificationSettingsIntent())
}
}
override fun onCreate(savedInstanceState: Bundle?) {
val splashScreen = installSplashScreen();
setTheme(R.style.DarkTheme)
// Make sure we get an Alert for every uncaught exceptions
registerUncaughtExceptionHandler(this)
// Report memory details for this application
val activityManager = getActivityManager()
Log.v("RNBootstrap", "Available system memory " + getAvailableMemory(activityManager).availMem + ", maximum usable application memory " + activityManager.largeMemoryClass + "M")
setSecureFlag()
// NOTE: Try to not restore the state https://github.com/software-mansion/react-native-screens/issues/17
super.onCreate(null)
if (!shouldShowRootedNotification()) {
configureStatus()
} else {
val dialog = AlertDialog.Builder(this)
.setMessage(resources.getString(R.string.root_warning))
.setPositiveButton(resources.getString(R.string.root_okay)) { dialog, which ->
rejectRootedNotification()
dialog.dismiss()
configureStatus()
}
.setNegativeButton(resources.getString(R.string.root_cancel)) { dialog, which ->
dialog.dismiss()
finishAffinity()
}
.setOnCancelListener {
it.dismiss()
finishAffinity()
}
.create()
dialog.show()
}
val r = Runnable {
System.loadLibrary("status-logs")
// when app is started but the Activity has been destroyed, the deep linking url event is
// not emitted when coming back to foreground. This is a workaround. If the problem is
// resolved in react-native this code should be removed
if (intent.data != null) {
val event = Arguments.createMap()
event.putString("url", intent.dataString)
// on first start emit will (silently) fail, but the regular deep linking handler will work
tryToEmit("url", event)
}
}
splashScreen.setKeepOnScreenCondition { keepSplash }
val handler = Handler()
handler.postDelayed({ keepSplash = false }, SPLASH_DELAY.toLong())
StatusThreadPoolExecutor.getInstance().execute(r)
}
override fun onDestroy() {
super.onDestroy()
}
override fun onConfigurationChanged(newConfig: Configuration) {
super.onConfigurationChanged(newConfig)
val intent = Intent("onConfigurationChanged")
intent.putExtra("newConfig", newConfig)
sendBroadcast(intent)
}
private val REJECTED_ROOTED_NOTIFICATION = "rejectedRootedNotification"
private val FREQUENCY_OF_REMINDER_IN_PERCENT = 5
private fun shouldShowRootedNotification(): Boolean {
if (RootUtil.isDeviceRooted() && BuildConfig.ENABLE_ROOT_ALERT == "1") {
return if (userRejectedRootedNotification()) {
(Math.random() * 100) < FREQUENCY_OF_REMINDER_IN_PERCENT
} else true
} else {
return false
}
}
private fun userRejectedRootedNotification(): Boolean {
val preferences = getPreferences(0)
return preferences.getBoolean(REJECTED_ROOTED_NOTIFICATION, false)
}
private fun rejectRootedNotification() {
val preferences = getPreferences(0)
val editor = preferences.edit()
editor.putBoolean(REJECTED_ROOTED_NOTIFICATION, true)
editor.commit()
}
private fun setSecureFlag() {
val sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this)
val setSecure = sharedPrefs.getBoolean("BLANK_PREVIEW", false)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH && setSecure) {
window.addFlags(WindowManager.LayoutParams.FLAG_SECURE)
} else {
window.clearFlags(WindowManager.LayoutParams.FLAG_SECURE)
}
}
@TargetApi(Build.VERSION_CODES.M)
override fun requestPermissions(permissions: Array<String>, requestCode: Int, listener: PermissionListener) {
mPermissionListener = listener
super.requestPermissions(permissions, requestCode)
}
override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<String>, grantResults: IntArray) {
if (mPermissionListener != null && mPermissionListener!!.onRequestPermissionsResult(requestCode, permissions, grantResults)) {
mPermissionListener = null
}
}
}
@@ -1,87 +0,0 @@
package im.status.ethereum;
import androidx.multidex.MultiDexApplication;
import android.content.Context;
import android.webkit.WebView;
import im.status.ethereum.newarchitecture.MainApplicationReactNativeHost;
import java.lang.reflect.InvocationTargetException;
import com.facebook.react.PackageList;
import com.aakashns.reactnativedialogs.ReactNativeDialogsPackage;
import com.facebook.react.ReactApplication;
import cl.json.RNSharePackage;
import com.facebook.react.ReactNativeHost;
import com.reactnativenavigation.NavigationApplication;
import com.reactnativenavigation.react.NavigationReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.config.ReactFeatureFlags;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.modules.network.OkHttpClientProvider;
import com.reactnativecommunity.blurview.BlurViewPackage;
import java.util.List;
import im.status.ethereum.keycard.RNStatusKeycardPackage;
import im.status.ethereum.module.StatusPackage;
import im.status.ethereum.pushnotifications.PushNotificationPackage;
import im.status.ethereum.StatusOkHttpClientFactory;
import com.facebook.react.bridge.JSIModulePackage;
import com.swmansion.reanimated.ReanimatedJSIModulePackage;
public class MainApplication extends NavigationApplication {
private final ReactNativeHost mReactNativeHost = new NavigationReactNativeHost(this) {
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@Override
protected List<ReactPackage> getPackages() {
StatusPackage statusPackage = new StatusPackage(RootUtil.isDeviceRooted());
List<ReactPackage> packages = new PackageList(this).getPackages();
packages.add(statusPackage);
packages.add(new ReactNativeDialogsPackage());
packages.add(new RNStatusKeycardPackage());
packages.add(new PushNotificationPackage());
packages.add(new BlurViewPackage());
return packages;
}
@Override
protected String getJSMainModuleName() {
return "index";
}
@Override
protected JSIModulePackage getJSIModulePackage() {
return new ReanimatedJSIModulePackage();
}
};
private final ReactNativeHost mNewArchitectureNativeHost = new MainApplicationReactNativeHost(this);
@Override
public ReactNativeHost getReactNativeHost() {
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
return mNewArchitectureNativeHost;
} else {
return mReactNativeHost;
}
}
@Override
public void onCreate() {
super.onCreate();
// If you opted-in for the New Architecture, we enable the TurboModule system
ReactFeatureFlags.useTurboModules = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
OkHttpClientProvider.setOkHttpClientFactory(new StatusOkHttpClientFactory());
WebView.setWebContentsDebuggingEnabled(BuildConfig.DEBUG_WEBVIEW == "1");
}
}
@@ -0,0 +1,61 @@
package im.status.ethereum
import android.webkit.WebView
import androidx.multidex.MultiDexApplication
import com.facebook.react.PackageList
import com.facebook.react.ReactApplication
import com.facebook.react.ReactNativeHost
import com.facebook.react.ReactPackage
import com.facebook.react.bridge.JSIModulePackage
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint
import com.facebook.react.modules.network.OkHttpClientProvider
import com.reactnativenavigation.NavigationApplication
import com.reactnativenavigation.react.NavigationReactNativeHost
import cl.json.RNSharePackage
import com.reactnativecommunity.blurview.BlurViewPackage
import im.status.ethereum.keycard.RNStatusKeycardPackage
import im.status.ethereum.module.StatusPackage
import im.status.ethereum.pushnotifications.PushNotificationPackage
import im.status.ethereum.StatusOkHttpClientFactory
class MainApplication : NavigationApplication() {
private val mReactNativeHost = object : NavigationReactNativeHost(this) {
override fun getUseDeveloperSupport(): Boolean {
return BuildConfig.DEBUG
}
override fun getPackages(): List<ReactPackage> {
val statusPackage = StatusPackage(RootUtil.isDeviceRooted())
val packages = PackageList(this).getPackages()
packages.add(statusPackage)
packages.add(RNStatusKeycardPackage())
packages.add(PushNotificationPackage())
packages.add(BlurViewPackage())
return packages
}
override fun getJSMainModuleName(): String = "index"
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
}
override fun getReactNativeHost(): ReactNativeHost {
return mReactNativeHost
}
override fun onCreate() {
super.onCreate()
OkHttpClientProvider.setOkHttpClientFactory(StatusOkHttpClientFactory())
WebView.setWebContentsDebuggingEnabled(BuildConfig.DEBUG_WEBVIEW == "1")
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
DefaultNewArchitectureEntryPoint.load()
}
}
}
@@ -0,0 +1,88 @@
package im.status.ethereum
import android.util.Log
import com.facebook.react.modules.network.OkHttpClientFactory
import com.facebook.react.modules.network.OkHttpClientProvider
import okhttp3.OkHttpClient
import okhttp3.tls.HandshakeCertificates
import java.io.ByteArrayInputStream
import java.lang.RuntimeException
import java.lang.reflect.Field
import java.lang.reflect.Method
import java.security.cert.CertificateFactory
import java.security.cert.X509Certificate
import im.status.ethereum.module.StatusPackage
class StatusOkHttpClientFactory : OkHttpClientFactory {
companion object {
private const val TAG = "StatusOkHttpClientFactory"
private const val SLEEP_DURATION = 500L // milliseconds
}
override fun createNewNetworkModuleClient(): OkHttpClient? {
val certPem = getCertificatePem().takeIf { it.isNotEmpty() }
?: return logAndReturnNull("Certificate is empty, cannot create OkHttpClient without a valid certificate")
val cert = try {
induceSleep()
// Convert PEM certificate string to X509Certificate object
CertificateFactory.getInstance("X.509")
.generateCertificate(ByteArrayInputStream(certPem.toByteArray())) as? X509Certificate
?: return logAndReturnNull("Certificate could not be parsed as non-null")
} catch (e: Exception) {
return logAndReturnNull("Could not parse certificate", e)
}
val clientCertificates = try {
induceSleep()
// Create HandshakeCertificates object with our certificate
HandshakeCertificates.Builder()
.addPlatformTrustedCertificates()
.addTrustedCertificate(cert)
.build()
} catch (e: Exception) {
return logAndReturnNull("Could not build HandshakeCertificates", e)
}
return try {
OkHttpClientProvider.createClientBuilder()
.sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager)
.build()
} catch (e: Exception) {
logAndReturnNull("Could not create OkHttpClient", e)
}
}
private fun getCertificatePem(): String {
return try {
// Create OkHttpClient with custom SSL socket factory and trust manager
StatusPackage.getImageTLSCert().takeIf { !it.isNullOrBlank() }
?: logAndReturnEmpty("Certificate PEM string is null or empty")
} catch (e: Exception) {
logAndReturnEmpty("Could not getImageTLSCert", e)
}
}
private fun induceSleep() {
try {
// induce half second sleep because sometimes a cert is not immediately available
// TODO : remove sleep if App no longer crashes on Android 10 devices with
// java.lang.RuntimeException: Could not invoke WebSocketModule.connect
Thread.sleep(SLEEP_DURATION)
} catch (e: InterruptedException) {
Log.e(TAG, "Sleep interrupted", e)
}
}
private fun logAndReturnNull(message: String, e: Exception? = null): Nothing? {
Log.e(TAG, message, e)
return null
}
private fun logAndReturnEmpty(message: String, e: Exception? = null): String {
Log.e(TAG, message, e)
return ""
}
}
@@ -1,77 +0,0 @@
package im.status.ethereum;
import android.util.Log;
import com.facebook.react.modules.network.OkHttpClientFactory;
import com.facebook.react.modules.network.OkHttpClientProvider;
import okhttp3.OkHttpClient;
import okhttp3.Interceptor;
import okhttp3.tls.HandshakeCertificates;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.lang.RuntimeException;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import im.status.ethereum.module.StatusPackage;
class StatusOkHttpClientFactory implements OkHttpClientFactory {
private static final String TAG = "StatusOkHttpClientFactory";
public OkHttpClient createNewNetworkModuleClient() {
X509Certificate cert = null;
HandshakeCertificates clientCertificates;
String certPem = "";
// Get TLS PEM certificate from status-go
try {
// induce half second sleep because sometimes a cert is not immediately available
// TODO : remove sleep if App no longer crashes on Android 10 devices with
// java.lang.RuntimeException: Could not invoke WebSocketModule.connect
Thread.sleep(500);
certPem = StatusPackage.getImageTLSCert();
} catch(Exception e) {
Log.e(TAG, "Could not getImageTLSCert",e);
}
// Convert PEM certificate string to X509Certificate object
try {
// induce half second sleep because sometimes a cert is not immediately available
// TODO : remove sleep if App no longer crashes on Android 10 devices
// java.lang.RuntimeException: Could not invoke WebSocketModule.connect
Thread.sleep(500);
CertificateFactory cf = CertificateFactory.getInstance("X.509");
cert = (X509Certificate) cf.generateCertificate(new ByteArrayInputStream(certPem.getBytes()));
} catch(Exception e) {
Log.e(TAG, "Could not parse certificate",e);
}
// Create HandshakeCertificates object with our certificate
try {
// induce half second sleep because sometimes a cert is not immediately available
// TODO : remove sleep if App no longer crashes on Android 10 devices
// java.lang.RuntimeException: Could not invoke WebSocketModule.connect
Thread.sleep(500);
clientCertificates = new HandshakeCertificates.Builder()
.addPlatformTrustedCertificates()
.addTrustedCertificate(cert)
.build();
} catch(Exception e) {
Log.e(TAG, "Could not build HandshakeCertificates", e);
return null;
}
// Create OkHttpClient with custom SSL socket factory and trust manager
try {
return OkHttpClientProvider.createClientBuilder()
.sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager())
.build();
} catch(Exception e) {
Log.e(TAG, "Could not create OkHttpClient", e);
return null;
}
}
}
@@ -1,103 +0,0 @@
package im.status.ethereum.newarchitecture;
import android.app.Application;
import androidx.annotation.NonNull;
import com.facebook.react.PackageList;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.ReactPackageTurboModuleManagerDelegate;
import com.facebook.react.bridge.JSIModulePackage;
import com.facebook.react.bridge.JSIModuleProvider;
import com.facebook.react.bridge.JSIModuleSpec;
import com.facebook.react.bridge.JSIModuleType;
import com.facebook.react.bridge.JavaScriptContextHolder;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.UIManager;
import com.facebook.react.fabric.ComponentFactory;
import com.facebook.react.fabric.CoreComponentsRegistry;
import com.facebook.react.fabric.FabricJSIModuleProvider;
import com.facebook.react.fabric.ReactNativeConfig;
import com.facebook.react.uimanager.ViewManagerRegistry;
import im.status.ethereum.BuildConfig;
import im.status.ethereum.newarchitecture.components.MainComponentsRegistry;
import im.status.ethereum.newarchitecture.modules.MainApplicationTurboModuleManagerDelegate;
import java.util.ArrayList;
import java.util.List;
/**
* A {@link ReactNativeHost} that helps you load everything needed for the New Architecture, both
* TurboModule delegates and the Fabric Renderer.
*
* <p>Please note that this class is used ONLY if you opt-in for the New Architecture (see the
* `newArchEnabled` property). Is ignored otherwise.
*/
public class MainApplicationReactNativeHost extends ReactNativeHost {
public MainApplicationReactNativeHost(Application application) {
super(application);
}
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@Override
protected List<ReactPackage> getPackages() {
List<ReactPackage> packages = new PackageList(this).getPackages();
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage());
// TurboModules must also be loaded here providing a valid TurboReactPackage implementation:
// packages.add(new TurboReactPackage() { ... });
// If you have custom Fabric Components, their ViewManagers should also be loaded here
// inside a ReactPackage.
return packages;
}
@Override
protected String getJSMainModuleName() {
return "index";
}
@NonNull
@Override
protected ReactPackageTurboModuleManagerDelegate.Builder
getReactPackageTurboModuleManagerDelegateBuilder() {
// Here we provide the ReactPackageTurboModuleManagerDelegate Builder. This is necessary
// for the new architecture and to use TurboModules correctly.
return new MainApplicationTurboModuleManagerDelegate.Builder();
}
@Override
protected JSIModulePackage getJSIModulePackage() {
return new JSIModulePackage() {
@Override
public List<JSIModuleSpec> getJSIModules(
final ReactApplicationContext reactApplicationContext,
final JavaScriptContextHolder jsContext) {
final List<JSIModuleSpec> specs = new ArrayList<>();
// Here we provide a new JSIModuleSpec that will be responsible of providing the
// custom Fabric Components.
specs.add(
new JSIModuleSpec() {
@Override
public JSIModuleType getJSIModuleType() {
return JSIModuleType.UIManager;
}
@Override
public JSIModuleProvider<UIManager> getJSIModuleProvider() {
final ComponentFactory componentFactory = new ComponentFactory();
CoreComponentsRegistry.register(componentFactory);
// Here we register a Components Registry.
// The one that is generated with the template contains no components
// and just provides you the one from React Native core.
MainComponentsRegistry.register(componentFactory);
final ReactInstanceManager reactInstanceManager = getReactInstanceManager();
ViewManagerRegistry viewManagerRegistry =
new ViewManagerRegistry(
reactInstanceManager.getOrCreateViewManagers(reactApplicationContext));
return new FabricJSIModuleProvider(
reactApplicationContext,
componentFactory,
ReactNativeConfig.DEFAULT_CONFIG,
viewManagerRegistry);
}
});
return specs;
}
};
}
}
@@ -1,30 +0,0 @@
package im.status.ethereum.newarchitecture.components;
import com.facebook.jni.HybridData;
import com.facebook.proguard.annotations.DoNotStrip;
import com.facebook.react.fabric.ComponentFactory;
import com.facebook.soloader.SoLoader;
/**
* Class responsible to load the custom Fabric Components. This class has native methods and needs a
* corresponding C++ implementation/header file to work correctly (already placed inside the jni/
* folder for you).
*
* <p>Please note that this class is used ONLY if you opt-in for the New Architecture (see the
* `newArchEnabled` property). Is ignored otherwise.
*/
@DoNotStrip
public class MainComponentsRegistry {
static {
SoLoader.loadLibrary("fabricjni");
}
@DoNotStrip private final HybridData mHybridData;
@DoNotStrip
private native HybridData initHybrid(ComponentFactory componentFactory);
@DoNotStrip
private MainComponentsRegistry(ComponentFactory componentFactory) {
mHybridData = initHybrid(componentFactory);
}
@DoNotStrip
public static MainComponentsRegistry register(ComponentFactory componentFactory) {
return new MainComponentsRegistry(componentFactory);
}
}
@@ -1,40 +0,0 @@
package im.status.ethereum.newarchitecture.modules;
import com.facebook.jni.HybridData;
import com.facebook.react.ReactPackage;
import com.facebook.react.ReactPackageTurboModuleManagerDelegate;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.soloader.SoLoader;
import java.util.List;
/**
* Class responsible to load the TurboModules. This class has native methods and needs a
* corresponding C++ implementation/header file to work correctly (already placed inside the jni/
* folder for you).
*
* <p>Please note that this class is used ONLY if you opt-in for the New Architecture (see the
* `newArchEnabled` property). Is ignored otherwise.
*/
public class MainApplicationTurboModuleManagerDelegate
extends ReactPackageTurboModuleManagerDelegate {
private static volatile boolean sIsSoLibraryLoaded;
protected MainApplicationTurboModuleManagerDelegate(
ReactApplicationContext reactApplicationContext, List<ReactPackage> packages) {
super(reactApplicationContext, packages);
}
protected native HybridData initHybrid();
native boolean canCreateTurboModule(String moduleName);
public static class Builder extends ReactPackageTurboModuleManagerDelegate.Builder {
protected MainApplicationTurboModuleManagerDelegate build(
ReactApplicationContext context, List<ReactPackage> packages) {
return new MainApplicationTurboModuleManagerDelegate(context, packages);
}
}
@Override
protected synchronized void maybeLoadOtherSoLibraries() {
if (!sIsSoLibraryLoaded) {
// If you change the name of your application .so file in the Android.mk file,
// make sure you update the name here as well.
SoLoader.loadLibrary("status-im_appmodules");
sIsSoLibraryLoaded = true;
}
}
}
-39
View File
@@ -1,39 +0,0 @@
THIS_DIR := $(call my-dir)
include $(REACT_ANDROID_DIR)/Android-prebuilt.mk
# If you wish to add a custom TurboModule or Fabric component in your app you
# will have to include the following autogenerated makefile.
# include $(GENERATED_SRC_DIR)/codegen/jni/Android.mk
include $(CLEAR_VARS)
LOCAL_PATH := $(THIS_DIR)
# You can customize the name of your application .so file here.
LOCAL_MODULE := rndiffapp_appmodules
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
# If you wish to add a custom TurboModule or Fabric component in your app you
# will have to uncomment those lines to include the generated source
# files from the codegen (placed in $(GENERATED_SRC_DIR)/codegen/jni)
#
# LOCAL_C_INCLUDES += $(GENERATED_SRC_DIR)/codegen/jni
# LOCAL_SRC_FILES += $(wildcard $(GENERATED_SRC_DIR)/codegen/jni/*.cpp)
# LOCAL_EXPORT_C_INCLUDES += $(GENERATED_SRC_DIR)/codegen/jni
# Here you should add any native library you wish to depend on.
LOCAL_SHARED_LIBRARIES := \
libfabricjni \
libfbjni \
libfolly_runtime \
libglog \
libjsi \
libreact_codegen_rncore \
libreact_debug \
libreact_nativemodule_core \
libreact_render_componentregistry \
libreact_render_core \
libreact_render_debug \
libreact_render_graphics \
librrc_view \
libruntimeexecutor \
libturbomodulejsijni \
libyoga
LOCAL_CFLAGS := -DLOG_TAG=\"ReactNative\" -fexceptions -frtti -std=c++17 -Wall
include $(BUILD_SHARED_LIBRARY)
@@ -1,20 +0,0 @@
#include "MainApplicationModuleProvider.h"
#include <rncore.h>
namespace facebook {
namespace react {
std::shared_ptr<TurboModule> MainApplicationModuleProvider(
const std::string moduleName,
const JavaTurboModule::InitParams &params) {
// Here you can provide your own module provider for TurboModules coming from
// either your application or from external libraries. The approach to follow
// is similar to the following (for a library called `samplelibrary`:
//
// auto module = samplelibrary_ModuleProvider(moduleName, params);
// if (module != nullptr) {
// return module;
// }
// return rncore_ModuleProvider(moduleName, params);
return rncore_ModuleProvider(moduleName, params);
}
} // namespace react
} // namespace facebook
@@ -1,11 +0,0 @@
#pragma once
#include <memory>
#include <string>
#include <ReactCommon/JavaTurboModule.h>
namespace facebook {
namespace react {
std::shared_ptr<TurboModule> MainApplicationModuleProvider(
const std::string moduleName,
const JavaTurboModule::InitParams &params);
} // namespace react
} // namespace facebook
@@ -1,38 +0,0 @@
#include "MainApplicationTurboModuleManagerDelegate.h"
#include "MainApplicationModuleProvider.h"
namespace facebook {
namespace react {
jni::local_ref<MainApplicationTurboModuleManagerDelegate::jhybriddata>
MainApplicationTurboModuleManagerDelegate::initHybrid(
jni::alias_ref<jhybridobject>) {
return makeCxxInstance();
}
void MainApplicationTurboModuleManagerDelegate::registerNatives() {
registerHybrid({
makeNativeMethod(
"initHybrid", MainApplicationTurboModuleManagerDelegate::initHybrid),
makeNativeMethod(
"canCreateTurboModule",
MainApplicationTurboModuleManagerDelegate::canCreateTurboModule),
});
}
std::shared_ptr<TurboModule>
MainApplicationTurboModuleManagerDelegate::getTurboModule(
const std::string name,
const std::shared_ptr<CallInvoker> jsInvoker) {
// Not implemented yet: provide pure-C++ NativeModules here.
return nullptr;
}
std::shared_ptr<TurboModule>
MainApplicationTurboModuleManagerDelegate::getTurboModule(
const std::string name,
const JavaTurboModule::InitParams &params) {
return MainApplicationModuleProvider(name, params);
}
bool MainApplicationTurboModuleManagerDelegate::canCreateTurboModule(
std::string name) {
return getTurboModule(name, nullptr) != nullptr ||
getTurboModule(name, {.moduleName = name}) != nullptr;
}
} // namespace react
} // namespace facebook
@@ -1,30 +0,0 @@
#include <memory>
#include <string>
#include <ReactCommon/TurboModuleManagerDelegate.h>
#include <fbjni/fbjni.h>
namespace facebook {
namespace react {
class MainApplicationTurboModuleManagerDelegate
: public jni::HybridClass<
MainApplicationTurboModuleManagerDelegate,
TurboModuleManagerDelegate> {
public:
// Adapt it to the package you used for your Java class.
static constexpr auto kJavaDescriptor =
"Lcom/rndiffapp/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate;";
static jni::local_ref<jhybriddata> initHybrid(jni::alias_ref<jhybridobject>);
static void registerNatives();
std::shared_ptr<TurboModule> getTurboModule(
const std::string name,
const std::shared_ptr<CallInvoker> jsInvoker) override;
std::shared_ptr<TurboModule> getTurboModule(
const std::string name,
const JavaTurboModule::InitParams &params) override;
/**
* Test-only method. Allows user to verify whether a TurboModule can be
* created by instances of this class.
*/
bool canCreateTurboModule(std::string name);
};
} // namespace react
} // namespace facebook
@@ -1,48 +0,0 @@
#include "MainComponentsRegistry.h"
#include <CoreComponentsRegistry.h>
#include <fbjni/fbjni.h>
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
#include <react/renderer/components/rncore/ComponentDescriptors.h>
namespace facebook {
namespace react {
MainComponentsRegistry::MainComponentsRegistry(ComponentFactory *delegate) {}
std::shared_ptr<ComponentDescriptorProviderRegistry const>
MainComponentsRegistry::sharedProviderRegistry() {
auto providerRegistry = CoreComponentsRegistry::sharedProviderRegistry();
// Custom Fabric Components go here. You can register custom
// components coming from your App or from 3rd party libraries here.
//
// providerRegistry->add(concreteComponentDescriptorProvider<
// AocViewerComponentDescriptor>());
return providerRegistry;
}
jni::local_ref<MainComponentsRegistry::jhybriddata>
MainComponentsRegistry::initHybrid(
jni::alias_ref<jclass>,
ComponentFactory *delegate) {
auto instance = makeCxxInstance(delegate);
auto buildRegistryFunction =
[](EventDispatcher::Weak const &eventDispatcher,
ContextContainer::Shared const &contextContainer)
-> ComponentDescriptorRegistry::Shared {
auto registry = MainComponentsRegistry::sharedProviderRegistry()
->createComponentDescriptorRegistry(
{eventDispatcher, contextContainer});
auto mutableRegistry =
std::const_pointer_cast<ComponentDescriptorRegistry>(registry);
mutableRegistry->setFallbackComponentDescriptor(
std::make_shared<UnimplementedNativeViewComponentDescriptor>(
ComponentDescriptorParameters{
eventDispatcher, contextContainer, nullptr}));
return registry;
};
delegate->buildRegistryFunction = buildRegistryFunction;
return instance;
}
void MainComponentsRegistry::registerNatives() {
registerHybrid({
makeNativeMethod("initHybrid", MainComponentsRegistry::initHybrid),
});
}
} // namespace react
} // namespace facebook
@@ -1,24 +0,0 @@
#pragma once
#include <ComponentFactory.h>
#include <fbjni/fbjni.h>
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
#include <react/renderer/componentregistry/ComponentDescriptorRegistry.h>
namespace facebook {
namespace react {
class MainComponentsRegistry
: public facebook::jni::HybridClass<MainComponentsRegistry> {
public:
// Adapt it to the package you used for your Java class.
constexpr static auto kJavaDescriptor =
"Lcom/rndiffapp/newarchitecture/components/MainComponentsRegistry;";
static void registerNatives();
MainComponentsRegistry(ComponentFactory *delegate);
private:
static std::shared_ptr<ComponentDescriptorProviderRegistry const>
sharedProviderRegistry();
static jni::local_ref<jhybriddata> initHybrid(
jni::alias_ref<jclass>,
ComponentFactory *delegate);
};
} // namespace react
} // namespace facebook
-10
View File
@@ -1,10 +0,0 @@
#include <fbjni/fbjni.h>
#include "MainApplicationTurboModuleManagerDelegate.h"
#include "MainComponentsRegistry.h"
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *) {
return facebook::jni::initialize(vm, [] {
facebook::react::MainApplicationTurboModuleManagerDelegate::
registerNatives();
facebook::react::MainComponentsRegistry::registerNatives();
});
}
+6 -38
View File
@@ -1,4 +1,3 @@
import org.apache.tools.ant.taskdefs.condition.Os
// Top-level build file where you can add configuration options common to all sub-projects/modules.
/**
@@ -6,25 +5,17 @@ import org.apache.tools.ant.taskdefs.condition.Os
*/
ext {
// kotlin_version is needed for react-native-camera-kit library
kotlin_version = project.kotlinVersion
RNNKotlinVersion = "1.6.20"
RNGH_kotlinVersion = "1.6.20"
kotlin_version = project.kotlinPluginVersion
RNNKotlinVersion = project.kotlinPluginVersion
RNGH_kotlinVersion = project.kotlinPluginVersion
buildToolsVersion = project.buildToolsVersion
minSdkVersion = Integer.valueOf(project.minSdkVersion)
compileSdkVersion = Integer.valueOf(project.compileSdkVersion)
targetSdkVersion = Integer.valueOf(project.targetSdkVersion)
supportLibVersion = project.supportLibVersion
gradlePluginVersion = project.gradlePluginVersion
kotlinPluginVersion = project.kotlinPluginVersion
if (System.properties['os.arch'] == "aarch64") {
// For M1 Users we need to use the NDK 24 which added support for aarch64
ndkVersion = "24.0.8215888"
} else {
// Otherwise we default to the side-by-side NDK version from AGP.
ndkVersion = "21.4.7075529"
}
kotlinVersion = project.kotlinPluginVersion
ndkVersion = "25.2.9519653"
}
buildscript {
@@ -35,11 +26,8 @@ buildscript {
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${project.ext.kotlinPluginVersion}"
classpath "com.android.tools.build:gradle:${project.ext.gradlePluginVersion}"
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("de.undercouch:gradle-download-task:5.0.1")
// WARNING: Do not place your application dependencies here!
// They belong in the individual module build.gradle files.
}
}
@@ -64,34 +52,14 @@ allprojects {
throw new GradleException('STATUS_GO_ANDROID_LIBDIR environment variable is not valid!')
}
}
repositories {
exclusiveContent {
// We get React Native's Android binaries exclusively through npm,
// from a local Maven repo inside node_modules/react-native/.
// (The use of exclusiveContent prevents looking elsewhere like Maven Central
// and potentially getting a wrong version.)
filter {
includeGroup "com.facebook.react"
}
forRepository {
maven {
url "$rootDir/../node_modules/react-native/android"
}
}
}
mavenLocal()
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
maven { url("$rootDir/../node_modules/react-native/android") }
// Android JSC is installed from npm
maven { url("$rootDir/../node_modules/jsc-android/dist") }
// For geth, function, and status-go
flatDir { dirs "libs", System.env.STATUS_GO_ANDROID_LIBDIR }
// Everything Else
google()
jcenter() // Required for @react-native-community/blur:3.6.1, can be removed after updating to 3.6.1+
mavenCentral()
// maven { url "https://www.jitpack.io" }
maven { url 'https://mvnrepository.com/artifact/com.github.gundy/semver4j'}
}
}
+11 -8
View File
@@ -21,15 +21,14 @@
# $keytool -genkey -v -keystore ./status-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias status
# Version requirements used throughout the Gradle scripts
kotlinVersion=1.6.20
minSdkVersion=24
compileSdkVersion=31
targetSdkVersion=31
buildToolsVersion=31.0.0
compileSdkVersion=33
targetSdkVersion=33
buildToolsVersion=33.0.0
supportLibVersion=28.0.0
# This should match version from nix/mobile/android/maven-and-npm-deps/maven/default.nix
gradlePluginVersion=7.2.2
kotlinPluginVersion=1.6.20
# This should match version from nix/pkgs/aapt2/default.nix
gradlePluginVersion=7.4.2
kotlinPluginVersion=1.9.0
android.useAndroidX=true
android.enableJetifier=true
@@ -42,7 +41,7 @@ KEYSTORE_KEY_PASSWORD=password
# By default we build a mostly universal APK
ANDROID_ABI_SPLIT=false
# Some platforms are excluded though
ANDROID_ABI_INCLUDE=armeabi-v7a;arm64-v8a;x86
ANDROID_ABI_INCLUDE=armeabi-v7a;arm64-v8a;x86;x86_64
org.gradle.jvmargs=-Xmx8704M
@@ -55,3 +54,7 @@ commitHash=unknown
# to write custom TurboModules/Fabric components OR use libraries that
# are providing them.
newArchEnabled=false
# Use this property to enable or disable the Hermes JS engine.
# If set to false, you will be using JSC instead.
hermesEnabled=true
+1 -9
View File
@@ -12,18 +12,10 @@ apply from: file("../node_modules/@react-native-community/cli-platform-android/n
include ':react-native-nfc-manager'
project(':react-native-nfc-manager').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-nfc-manager/android')
include ':app'
include ':react-native-dialogs'
project(':react-native-dialogs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-dialogs/android')
include ':react-native-status'
project(':react-native-status').projectDir = new File(rootProject.projectDir, '../modules/react-native-status/android')
include ':react-native-status-keycard'
project(':react-native-status-keycard').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-status-keycard/android')
include ':react-native-blur'
project(':react-native-blur').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/blur/android')
includeBuild('../node_modules/react-native-gradle-plugin')
if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") {
include(":ReactAndroid")
project(":ReactAndroid").projectDir = file('../node_modules/react-native/ReactAndroid')
include(":ReactAndroid:hermes-engine")
project(":ReactAndroid:hermes-engine").projectDir = file('../node_modules/react-native/ReactAndroid/hermes-engine')
}
includeBuild('../node_modules/@react-native/gradle-plugin')
+1 -1
View File
@@ -9,7 +9,7 @@ module.exports = {
'@babel/preset-env',
{
targets: {
node: '14',
node: 'current',
},
},
],
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.7.15'
library 'status-jenkins-lib@v1.8.4'
/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.7.15'
library 'status-jenkins-lib@v1.8.4'
pipeline {
agent { label 'linux' }
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.7.15'
library 'status-jenkins-lib@v1.8.4'
pipeline {
agent { label 'linux' }
+5 -4
View File
@@ -1,11 +1,11 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.7.15'
library 'status-jenkins-lib@v1.8.4'
/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()
pipeline {
agent { label 'macos && arm64 && nix-2.14 && xcode-14.3' }
agent { label 'macos && arm64 && nix-2.14 && xcode-15.1' }
parameters {
string(
@@ -77,9 +77,10 @@ pipeline {
}
}
stage('Upload') {
when { expression { !utils.isReleaseBuild() } }
steps { script {
env.DIAWI_URL = ios.uploadToDiawi()
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
env.DIAWI_URL = ios.uploadToDiawi()
}
env.PKG_URL = env.DIAWI_URL
jenkins.setBuildDesc(IPA: env.PKG_URL)
} }
+11 -3
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.7.15'
library 'status-jenkins-lib@v1.8.4'
/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()
@@ -52,16 +52,24 @@ pipeline {
"""
}
}
stage('Tests') {
stage('Unit Tests') {
steps {
sh """#!/bin/bash
set -eo pipefail
make test 2>&1 | tee -a ${LOG_FILE}
make test-unit 2>&1 | tee -a ${LOG_FILE}
"""
}
}
}
}
stage('Integration Tests') {
steps {
sh """#!/bin/bash
set -eo pipefail
make test-integration 2>&1 | tee -a ${LOG_FILE}
"""
}
}
stage('Component Tests') {
steps {
sh """#!/bin/bash
+2 -2
View File
@@ -36,10 +36,10 @@ pipeline {
steps { script {
copyArtifacts(
projectName: "status-mobile/platforms/android-e2e",
filter: 'result/*-x86.apk',
filter: 'result/*-x86_64.apk',
selector: specific(env.APK_BUILD_NUMBER),
)
apk_path = "${env.WORKSPACE}/${utils.findFile('result/*-x86.apk')}"
apk_path = "${env.WORKSPACE}/${utils.findFile('result/*-x86_64.apk')}"
} }
}
+26 -9
View File
@@ -21,8 +21,10 @@ pipeline {
/* See nix/README.md */
NIX_IGNORE_SYMLINK_STORE = 1
/* we source .bash_profile to be able to use nix-store */
NIX_SSHOPTS = "-o StrictHostKeyChecking=no source .profile;"
NIX_SSHOPTS = "-oStrictHostKeyChecking=no"
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
NIX_STORE_CMD = '/nix/var/nix/profiles/default/bin/nix-store'
NIX_SSH_REMOTE = "ssh://${params.NIX_CACHE_USER}@${params.NIX_CACHE_HOST}?remote-program=${env.NIX_STORE_CMD}"
}
options {
@@ -42,19 +44,21 @@ pipeline {
steps { script {
nix.shell('nix-env -i openssh', sandbox: false, pure: false)
/* some build targets don't build on MacOS */
os = sh(script: 'uname', returnStdout: true)
arch = sh(script: 'arch', returnStdout: true)
os = sh(script: 'uname', returnStdout: true).trim()
arch = sh(script: 'arch', returnStdout: true).trim()
} }
}
stage('Build status-go') {
steps { script {
def platforms = ['mobile.android', 'mobile.ios', 'library']
if (os != 'Darwin') { platforms.removeAll { it == 'mobile.ios' } }
/* FIXME: Remove this when #16237 is merged. */
/* FIXME: "'x86_64-darwin' with features {} is required to build" */
if (arch == 'arm64') { platforms.removeAll { it == 'mobile.android' } }
platforms.each { os ->
platforms.each { platform ->
/* Allow for Android builds on Apple ARM. */
env.NIXPKGS_SYSTEM_OVERRIDE = nixSysOverride(os, arch, platform)
nix.build(
attr: "targets.status-go.${os}",
attr: "targets.status-go.${platform}",
sandbox: false,
link: false
)
@@ -74,6 +78,8 @@ pipeline {
}
stage('Build android deps') {
steps { script {
/* Allow for Android builds on Apple ARM. */
env.NIXPKGS_SYSTEM_OVERRIDE = nixSysOverride(os, arch, 'android')
/* Build/fetch deps required to build android release. */
nix.build(
attr: 'targets.mobile.android.release.buildInputs',
@@ -86,9 +92,13 @@ pipeline {
stage('Build nix shell deps') {
steps { script {
def shells = ['android', 'ios', 'fastlane', 'keytool', 'clojure', 'gradle']
if (os != "Darwin") { shells.removeAll { it == 'ios' } }
if (os != 'Darwin') { shells.removeAll { it == 'ios' } }
/* FIXME: "'x86_64-darwin' with features {} is required to build" */
if (arch == 'arm64') { shells.removeAll { it == 'android' } }
/* Build/fetch deps required to start default Nix shell. */
shells.each { shell ->
/* Allow for Android builds on Apple ARM. */
env.NIXPKGS_SYSTEM_OVERRIDE = nixSysOverride(os, arch, shell)
nix.build(
attr: "shells.${shell}.buildInputs",
sandbox: false,
@@ -103,8 +113,7 @@ pipeline {
nix.shell("""
find /nix/store/ -mindepth 1 -maxdepth 1 -type d \
-not -name '*.links' -and -not -name '*-status-mobile-*' \
| xargs nix copy \
--to ssh-ng://${params.NIX_CACHE_USER}@${params.NIX_CACHE_HOST}
| xargs nix copy --to ${NIX_SSH_REMOTE}
""",
pure: false
)
@@ -119,3 +128,11 @@ pipeline {
} }
}
}
def nixSysOverride(os, arch, target='android') {
return (
os == 'Darwin' &&
arch == 'arm64' &&
target =~ /.*android$/
) ? 'x86_64-darwin' : ''
}
+56 -5
View File
@@ -212,16 +212,15 @@ Properties must be set on view level
:bottom 0}
```
### Apply animated styles in the style file
### Animated styles in the style file
```clojure
;; bad
(defn circle
[]
(let [opacity (reanimated/use-shared-value 1)]
[reanimated/view {:style (reanimated/apply-animations-to-style
{:opacity opacity}
style/circle-container)}]))
[reanimated/view {:style [{:opacity opacity}
style/circle-container]}]))
;; good
(defn circle
@@ -230,6 +229,38 @@ Properties must be set on view level
[reanimated/view {:style (style/circle-container opacity)}]))
```
### Pass a vector of styles to Reanimated view
Prefer to pass a vector of styles to `react-native.reanimated/view` `:style`
prop instead of using `apply-animations-to-style` directly. For more details, check out Reanimated docs about [inline
styles](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/your-first-animation/#defining-a-shared-value)
and [useAnimatedStyle](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/animating-styles-and-props/#animating-styles).
```clojure
(defn f-view []
(let [scroll-x (reanimated/use-shared-value 0)
opacity (reanimated/interpolate scroll-x [0 45 50] [1 1 0])]
[reanimated/view
;; bad
{:style (reanimated/apply-animations-to-style
{:opacity opacity
:transform [{:translate-x scroll-x}]}
{:flex-direction :row})}
;; good
{:style [{:opacity opacity
:transform [{:translate-x scroll-x}]}
{:flex-direction :row}]}
;; other valid and good variants
{:style [{:opacity opacity}
{:transform [{:translate-x scroll-x}]}
{:flex-direction :row}]}
{:style {:opacity opacity
:transform [{:translate-x scroll-x}]
:flex-direction :row}}]))
```
### Don't use percents to define width/height
In ReactNative, all layouts use the [flexbox
@@ -641,6 +672,26 @@ keywords and concatenating them into a single string.
```
### Tests
#### Prefer `match?` over `=` when comparing data structures
Prefer the `match?` directive over `=` when comparing data structures, otherwise
when the check fails the output can be too difficult to read. `match?` is
defined by library https://github.com/nubank/matcher-combinators.
```clojure
;; bad
(deftest some-test
(let [expected {...}
actual {...}]
(is (= expected actual))))
;; good
(deftest some-test
(let [expected {...}
actual {...}]
(is (match? expected actual))))
```
#### Subscription tests
Test [layer-3 subscriptions](https://day8.github.io/re-frame/subscriptions/) by
@@ -716,7 +767,7 @@ src
- `src/js`: Raw Javascript files, e.g. React Native Reanimated worklets.
- `src/mocks`: Plumbing configuration to be able to run tests.
- `src/quo/`: The component library for Status Mobile.
- `src/quo/`: The component library for Status Mobile. [Read more...](../src/quo/README.md)
- `src/react_native/`: Contains only low-level constructs to help React Native
work in tandem with Clojure(Script).
- `src/status_im2/`: Directory where we try to be as strict as possible about
+3 -3
View File
@@ -5,7 +5,7 @@
To run tests:
```
make test
make test
```
@@ -13,10 +13,10 @@ To run tests:
Also test watcher can be launched. It will re-run the entire test suite when any file is modified
```
make test-watch
make test WATCH=true
```
Developers can also manually change the shadow-cljs option `:ns-regex` to control which namespaces the test runner should pick.
Developers can also manually change the shadow-cljs option `:ns-regex` to control which namespaces the test runner should pick.
## Testing with REPL
+16 -18
View File
@@ -1,16 +1,18 @@
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
# Resolve react_native_pods.rb with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
'require.resolve(
"react-native/scripts/react_native_pods.rb",
{paths: [process.argv[1]]},
)', __dir__]).strip
platform :ios, '12.4'
platform :ios, min_ios_version_supported
prepare_react_native_project!
production = ENV["PRODUCTION"] == "1"
# We need to enable codegen discovery to fix the issue of these files not being generated properly:
# ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm
# ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h
# more details here : https://github.com/status-im/status-mobile/issues/15911
# TODO: remove this flag once you upgrade react-native above version 0.70
ENV['USE_CODEGEN_DISCOVERY'] = "1"
linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
use_frameworks! :linkage => linkage.to_sym
end
# If inside a Nix shell, allow pod install
inside_nix_shell = ENV['IN_NIX_SHELL']
@@ -30,11 +32,8 @@ abstract_target 'Status' do
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:production => production,
:hermes_enabled => flags[:hermes_enabled],
:hermes_enabled => false,
:fabric_enabled => flags[:fabric_enabled],
:use_codegen_discovery => true,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
@@ -45,9 +44,8 @@ abstract_target 'Status' do
pod 'SSZipArchive', '2.4.3'
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-Microphone', :path => "#{permissions_path}/Microphone.podspec"
pod 'Permission-Camera', :path => "#{permissions_path}/Camera.podspec"
pod 'Permission-Microphone', :path => "#{permissions_path}/Microphone/Permission-Microphone.podspec"
pod 'Permission-Camera', :path => "#{permissions_path}/Camera/Permission-Camera.podspec"
pod "react-native-status-keycard", path: "../node_modules/react-native-status-keycard"
pod "react-native-status", path: "../modules/react-native-status"
pod "Keycard", git: "https://github.com/status-im/Keycard.swift.git"
+426 -319
View File
File diff suppressed because it is too large Load Diff
+128 -128
View File
@@ -8,7 +8,6 @@
/* Begin PBXBuildFile section */
00E356F31AD99517003FC87E /* StatusImTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* StatusImTests.m */; };
04515E9DF839CBF55C690E79 /* libPods-Status-StatusImPR.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5006FF03675A7E50320B4002 /* libPods-Status-StatusImPR.a */; };
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
25DC9C9DC25846BD8D084888 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B9A886A2CB448B1ABA0EB62 /* libc++.tbd */; };
@@ -44,8 +43,9 @@
715D8132290BE850006F5C88 /* UbuntuMono-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 715D8131290BE850006F5C88 /* UbuntuMono-Regular.ttf */; };
715D8133290BE850006F5C88 /* UbuntuMono-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 715D8131290BE850006F5C88 /* UbuntuMono-Regular.ttf */; };
74B758FC20D7C00B003343C3 /* launch-image-universal.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 74B758FB20D7C00B003343C3 /* launch-image-universal.storyboard */; };
81F3191BB1D4BDF3442402BD /* libPods-Status-StatusIm.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0F8E9088BDE117AB71366407 /* libPods-Status-StatusIm.a */; };
8391E8E0E93C41A98AAA6631 /* Inter-SemiBoldItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = A4F2BBE8D4DD4140A6CCAC39 /* Inter-SemiBoldItalic.otf */; };
8BE7C1BD90A0AB68254988BD /* libPods-Status-StatusIm.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 28A248DF828DD5505CABC707 /* libPods-Status-StatusIm.a */; };
9930D2C5DF7BE851C6CE54A1 /* libPods-Status-StatusImPR.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B792BBAE71EAA1C3F2C9C47 /* libPods-Status-StatusImPR.a */; };
B24FC7FD1DE7195700D694FF /* Social.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B24FC7FC1DE7195700D694FF /* Social.framework */; };
B24FC7FF1DE7195F00D694FF /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B24FC7FE1DE7195F00D694FF /* MessageUI.framework */; };
B2F2D1BC1D9D531B00B7B453 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B2F2D1BB1D9D531B00B7B453 /* Images.xcassets */; };
@@ -57,10 +57,10 @@
C1715FFB29C0BCE50088FA8B /* launch-icon@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = C14C5F8C29C0A149005C58A7 /* launch-icon@3x.png */; };
C1715FFC29C0BCE80088FA8B /* launch-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = C14C5F9229C0ADB5005C58A7 /* launch-icon.png */; };
CE4E31B31D8695250033ED64 /* Statusgo.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE4E31B21D8695250033ED64 /* Statusgo.xcframework */; };
D156FF2CCF43C136F7BF8AE5 /* libPods-Status-StatusIm-StatusImTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3EFEEB5FC1235562D5D3BF1 /* libPods-Status-StatusIm-StatusImTests.a */; };
D1786306E0184916B11F4C37 /* Inter-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = B2A38FC3D3954DE7B2B171F8 /* Inter-Medium.otf */; };
D84616FB563A48EBB1678699 /* Inter-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = CD4A2C27D6D5473184DC1F7E /* Inter-Bold.otf */; };
D99C50E5E18942A39C8DDF61 /* Inter-BoldItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = B321D25F4493470980039457 /* Inter-BoldItalic.otf */; };
E6794203DEE6BE3C85F205F8 /* libPods-Status-StatusIm-StatusImTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9305FC57D289E57F96162DD2 /* libPods-Status-StatusIm-StatusImTests.a */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -108,15 +108,14 @@
00E356EE1AD99517003FC87E /* StatusImTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = StatusImTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
00E356F21AD99517003FC87E /* StatusImTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StatusImTests.m; sourceTree = "<group>"; };
06AF19FA626AFFC91E66916B /* Pods-Status-StatusImPR.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusImPR.release.xcconfig"; path = "Target Support Files/Pods-Status-StatusImPR/Pods-Status-StatusImPR.release.xcconfig"; sourceTree = "<group>"; };
0F8E9088BDE117AB71366407 /* libPods-Status-StatusIm.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Status-StatusIm.a"; sourceTree = BUILT_PRODUCTS_DIR; };
1130DCD9CBDCA3CA461F55B4 /* Pods-Status-StatusIm.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusIm.debug.xcconfig"; path = "Target Support Files/Pods-Status-StatusIm/Pods-Status-StatusIm.debug.xcconfig"; sourceTree = "<group>"; };
13B07F961A680F5B00A75B9A /* StatusIm.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = StatusIm.app; sourceTree = BUILT_PRODUCTS_DIR; };
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = StatusIm/AppDelegate.h; sourceTree = "<group>"; };
13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = StatusIm/AppDelegate.mm; sourceTree = "<group>"; };
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = StatusIm/Info.plist; sourceTree = "<group>"; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = StatusIm/main.m; sourceTree = "<group>"; };
1426DF592BA248FC81D955CB /* Inter-Regular.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-Regular.otf"; path = "../resources/fonts/Inter-Regular.otf"; sourceTree = "<group>"; };
1CDF317A2E103217DF386083 /* Pods-Status-StatusIm.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusIm.release.xcconfig"; path = "Target Support Files/Pods-Status-StatusIm/Pods-Status-StatusIm.release.xcconfig"; sourceTree = "<group>"; };
28A248DF828DD5505CABC707 /* libPods-Status-StatusIm.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Status-StatusIm.a"; sourceTree = BUILT_PRODUCTS_DIR; };
3A2626CE245C3F2200D5F94B /* Dummy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dummy.swift; sourceTree = "<group>"; };
3A6406FB24A3ADF90046ED37 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3A8F8EA924A4D31600BF206D /* GameKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameKit.framework; path = System/Library/Frameworks/GameKit.framework; sourceTree = SDKROOT; };
@@ -124,21 +123,24 @@
3AB1C3AD245C043900098F67 /* StatusIm-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "StatusIm-Bridging-Header.h"; sourceTree = "<group>"; };
4C16DE0B1F89508700AA10DB /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
4E586E1B0E544F64AA9F5BD1 /* libz.tbd */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
5006FF03675A7E50320B4002 /* libPods-Status-StatusImPR.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Status-StatusImPR.a"; sourceTree = BUILT_PRODUCTS_DIR; };
59C9C002A09CA7F40E69C6CB /* Pods-Status-StatusIm-StatusImTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusIm-StatusImTests.debug.xcconfig"; path = "Target Support Files/Pods-Status-StatusIm-StatusImTests/Pods-Status-StatusIm-StatusImTests.debug.xcconfig"; sourceTree = "<group>"; };
5B792BBAE71EAA1C3F2C9C47 /* libPods-Status-StatusImPR.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Status-StatusImPR.a"; sourceTree = BUILT_PRODUCTS_DIR; };
65F693BD2578002500A45E76 /* CoreNFC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreNFC.framework; path = System/Library/Frameworks/CoreNFC.framework; sourceTree = SDKROOT; };
65F693BF2578003600A45E76 /* CoreNFC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreNFC.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/System/iOSSupport/System/Library/Frameworks/CoreNFC.framework; sourceTree = DEVELOPER_DIR; };
65F6941725780A4E00A45E76 /* StatusImTests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "StatusImTests-Bridging-Header.h"; sourceTree = "<group>"; };
65F6941825780A4F00A45E76 /* Bridge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Bridge.swift; sourceTree = "<group>"; };
668C1A2ADF1899973DAA1AB7 /* Pods-Status-StatusIm.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusIm.release.xcconfig"; path = "Target Support Files/Pods-Status-StatusIm/Pods-Status-StatusIm.release.xcconfig"; sourceTree = "<group>"; };
693A62DB37BC4CD5A30E5C96 /* Inter-SemiBold.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-SemiBold.otf"; path = "../resources/fonts/Inter-SemiBold.otf"; sourceTree = "<group>"; };
715D8131290BE850006F5C88 /* UbuntuMono-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "UbuntuMono-Regular.ttf"; path = "../resources/fonts/UbuntuMono-Regular.ttf"; sourceTree = "<group>"; };
74B758FB20D7C00B003343C3 /* launch-image-universal.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = "launch-image-universal.storyboard"; sourceTree = "<group>"; };
8B9A886A2CB448B1ABA0EB62 /* libc++.tbd */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
922C4CA61F4D5F8B0033C753 /* StatusIm.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = StatusIm.entitlements; path = StatusIm/StatusIm.entitlements; sourceTree = "<group>"; };
93347A9564A62A24509EFA9C /* Pods-Status-StatusIm-StatusImTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusIm-StatusImTests.release.xcconfig"; path = "Target Support Files/Pods-Status-StatusIm-StatusImTests/Pods-Status-StatusIm-StatusImTests.release.xcconfig"; sourceTree = "<group>"; };
9305FC57D289E57F96162DD2 /* libPods-Status-StatusIm-StatusImTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Status-StatusIm-StatusImTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
9C76AF5A418D4D65A4CAD1D9 /* InterStatus-Regular.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "InterStatus-Regular.otf"; path = "../resources/fonts/InterStatus-Regular.otf"; sourceTree = "<group>"; };
9EC0135C1E06FB1900155B5C /* RCTWKWebView.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWKWebView.xcodeproj; path = "../node_modules/react-native-wkwebview-reborn/ios/RCTWKWebView.xcodeproj"; sourceTree = "<group>"; };
A18E846035BD6544591E45B9 /* Pods-Status-StatusImPR.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusImPR.release.xcconfig"; path = "Target Support Files/Pods-Status-StatusImPR/Pods-Status-StatusImPR.release.xcconfig"; sourceTree = "<group>"; };
A4F2BBE8D4DD4140A6CCAC39 /* Inter-SemiBoldItalic.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-SemiBoldItalic.otf"; path = "../resources/fonts/Inter-SemiBoldItalic.otf"; sourceTree = "<group>"; };
AA6DC18226EB1EFB2A8FE64D /* Pods-Status-StatusIm.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusIm.debug.xcconfig"; path = "Target Support Files/Pods-Status-StatusIm/Pods-Status-StatusIm.debug.xcconfig"; sourceTree = "<group>"; };
ACFD5EEA905CF67FD6F8C2CC /* Pods-Status-StatusIm-StatusImTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusIm-StatusImTests.release.xcconfig"; path = "Target Support Files/Pods-Status-StatusIm-StatusImTests/Pods-Status-StatusIm-StatusImTests.release.xcconfig"; sourceTree = "<group>"; };
B07176ACDAA1422E8F0A3D6B /* Inter-Italic.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-Italic.otf"; path = "../resources/fonts/Inter-Italic.otf"; sourceTree = "<group>"; };
B24FC7FC1DE7195700D694FF /* Social.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Social.framework; path = System/Library/Frameworks/Social.framework; sourceTree = SDKROOT; };
B24FC7FE1DE7195F00D694FF /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; };
@@ -148,12 +150,10 @@
C14C5F8C29C0A149005C58A7 /* launch-icon@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "launch-icon@3x.png"; path = "StatusIm/launch-icon@3x.png"; sourceTree = "<group>"; };
C14C5F9029C0AD9C005C58A7 /* launch-icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "launch-icon@2x.png"; path = "StatusIm/launch-icon@2x.png"; sourceTree = "<group>"; };
C14C5F9229C0ADB5005C58A7 /* launch-icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "launch-icon.png"; path = "StatusIm/launch-icon.png"; sourceTree = "<group>"; };
C618F2C2EF820C722B1E7624 /* Pods-Status-StatusImPR.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusImPR.debug.xcconfig"; path = "Target Support Files/Pods-Status-StatusImPR/Pods-Status-StatusImPR.debug.xcconfig"; sourceTree = "<group>"; };
C6B1215047604CD59A4C74D6 /* Inter-MediumItalic.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-MediumItalic.otf"; path = "../resources/fonts/Inter-MediumItalic.otf"; sourceTree = "<group>"; };
CD4A2C27D6D5473184DC1F7E /* Inter-Bold.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-Bold.otf"; path = "../resources/fonts/Inter-Bold.otf"; sourceTree = "<group>"; };
CE4E31B21D8695250033ED64 /* Statusgo.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Statusgo.xcframework; path = "../modules/react-native-status/ios/RCTStatus/Statusgo.xcframework"; sourceTree = "<group>"; };
D3EFEEB5FC1235562D5D3BF1 /* libPods-Status-StatusIm-StatusImTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Status-StatusIm-StatusImTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
DAE7378308FEB005CE0A6E42 /* Pods-Status-StatusIm-StatusImTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusIm-StatusImTests.debug.xcconfig"; path = "Target Support Files/Pods-Status-StatusIm-StatusImTests/Pods-Status-StatusIm-StatusImTests.debug.xcconfig"; sourceTree = "<group>"; };
D0D6FCD821497D4A6D28C82E /* Pods-Status-StatusImPR.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusImPR.debug.xcconfig"; path = "Target Support Files/Pods-Status-StatusImPR/Pods-Status-StatusImPR.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -161,7 +161,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
D156FF2CCF43C136F7BF8AE5 /* libPods-Status-StatusIm-StatusImTests.a in Frameworks */,
E6794203DEE6BE3C85F205F8 /* libPods-Status-StatusIm-StatusImTests.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -174,7 +174,7 @@
CE4E31B31D8695250033ED64 /* Statusgo.xcframework in Frameworks */,
25DC9C9DC25846BD8D084888 /* libc++.tbd in Frameworks */,
BA68A2377A20496EA737000D /* libz.tbd in Frameworks */,
81F3191BB1D4BDF3442402BD /* libPods-Status-StatusIm.a in Frameworks */,
8BE7C1BD90A0AB68254988BD /* libPods-Status-StatusIm.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -188,7 +188,7 @@
3AAD2AC224A3A60E0075D594 /* Statusgo.xcframework in Frameworks */,
3AAD2AC524A3A60E0075D594 /* libc++.tbd in Frameworks */,
3AAD2AC624A3A60E0075D594 /* libz.tbd in Frameworks */,
04515E9DF839CBF55C690E79 /* libPods-Status-StatusImPR.a in Frameworks */,
9930D2C5DF7BE851C6CE54A1 /* libPods-Status-StatusImPR.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -314,9 +314,9 @@
CE4E31B21D8695250033ED64 /* Statusgo.xcframework */,
8B9A886A2CB448B1ABA0EB62 /* libc++.tbd */,
4E586E1B0E544F64AA9F5BD1 /* libz.tbd */,
0F8E9088BDE117AB71366407 /* libPods-Status-StatusIm.a */,
D3EFEEB5FC1235562D5D3BF1 /* libPods-Status-StatusIm-StatusImTests.a */,
5006FF03675A7E50320B4002 /* libPods-Status-StatusImPR.a */,
28A248DF828DD5505CABC707 /* libPods-Status-StatusIm.a */,
9305FC57D289E57F96162DD2 /* libPods-Status-StatusIm-StatusImTests.a */,
5B792BBAE71EAA1C3F2C9C47 /* libPods-Status-StatusImPR.a */,
);
name = Frameworks;
sourceTree = "<group>";
@@ -324,12 +324,12 @@
D0D5C8D06825D33BA2D2121E /* Pods */ = {
isa = PBXGroup;
children = (
AA6DC18226EB1EFB2A8FE64D /* Pods-Status-StatusIm.debug.xcconfig */,
1CDF317A2E103217DF386083 /* Pods-Status-StatusIm.release.xcconfig */,
DAE7378308FEB005CE0A6E42 /* Pods-Status-StatusIm-StatusImTests.debug.xcconfig */,
93347A9564A62A24509EFA9C /* Pods-Status-StatusIm-StatusImTests.release.xcconfig */,
C618F2C2EF820C722B1E7624 /* Pods-Status-StatusImPR.debug.xcconfig */,
06AF19FA626AFFC91E66916B /* Pods-Status-StatusImPR.release.xcconfig */,
1130DCD9CBDCA3CA461F55B4 /* Pods-Status-StatusIm.debug.xcconfig */,
668C1A2ADF1899973DAA1AB7 /* Pods-Status-StatusIm.release.xcconfig */,
59C9C002A09CA7F40E69C6CB /* Pods-Status-StatusIm-StatusImTests.debug.xcconfig */,
ACFD5EEA905CF67FD6F8C2CC /* Pods-Status-StatusIm-StatusImTests.release.xcconfig */,
D0D6FCD821497D4A6D28C82E /* Pods-Status-StatusImPR.debug.xcconfig */,
A18E846035BD6544591E45B9 /* Pods-Status-StatusImPR.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
@@ -341,11 +341,11 @@
isa = PBXNativeTarget;
buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "StatusImTests" */;
buildPhases = (
A461E3110C485D2A21EB942C /* [CP] Check Pods Manifest.lock */,
CA339D1D94763C013F2794AD /* [CP] Check Pods Manifest.lock */,
00E356EA1AD99517003FC87E /* Sources */,
00E356EB1AD99517003FC87E /* Frameworks */,
00E356EC1AD99517003FC87E /* Resources */,
2B2389E62F0A9702C522FD40 /* [CP] Copy Pods Resources */,
D737FA0B0E9D346092C626FB /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -361,14 +361,14 @@
isa = PBXNativeTarget;
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "StatusIm" */;
buildPhases = (
C5DA0344FCE555AD1908FBCD /* [CP] Check Pods Manifest.lock */,
523CD6BCB20FD78FBF3564AD /* [CP] Check Pods Manifest.lock */,
13B07F871A680F5B00A75B9A /* Sources */,
13B07F8C1A680F5B00A75B9A /* Frameworks */,
13B07F8E1A680F5B00A75B9A /* Resources */,
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
20B6B6891D92C42700CC5C6A /* Embed Frameworks */,
E3914A731DF919ED00EBB515 /* Run Script */,
EC618D80223E4CE064CFF898 /* [CP] Copy Pods Resources */,
28606042DA81A750949525E4 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -383,14 +383,14 @@
isa = PBXNativeTarget;
buildConfigurationList = 3AAD2AD924A3A60E0075D594 /* Build configuration list for PBXNativeTarget "StatusImPR" */;
buildPhases = (
0196982A5A6EB89DC2106F9B /* [CP] Check Pods Manifest.lock */,
BDAFF7E8D7D1C97E92C1F9B0 /* [CP] Check Pods Manifest.lock */,
3AAD2ABB24A3A60E0075D594 /* Sources */,
3AAD2ABF24A3A60E0075D594 /* Frameworks */,
3AAD2AC924A3A60E0075D594 /* Resources */,
3AAD2AD524A3A60E0075D594 /* Bundle React Native code and images */,
3AAD2AD624A3A60E0075D594 /* Embed Frameworks */,
3AAD2AD724A3A60E0075D594 /* Run Script */,
4DBAAF9A3117797361E216BA /* [CP] Copy Pods Resources */,
BB1D92AA7446228787D6925C /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -544,35 +544,13 @@
shellPath = "/usr/bin/env sh";
shellScript = "set -o errexit\nexport NODE_BINARY=\"${NODE_BINARY:-node}\"\nexport NODE_ARGS=\"${NODE_ARGS:- --max-old-space-size=16384 }\"\n\nbash -x ../node_modules/react-native/scripts/react-native-xcode.sh > ./logs/react-native-xcode.log 2>&1";
};
0196982A5A6EB89DC2106F9B /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Status-StatusImPR-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
2B2389E62F0A9702C522FD40 /* [CP] Copy Pods Resources */ = {
28606042DA81A750949525E4 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Status-StatusIm-StatusImTests/Pods-Status-StatusIm-StatusImTests-resources.sh",
"${PODS_ROOT}/Target Support Files/Pods-Status-StatusIm/Pods-Status-StatusIm-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker/QBImagePicker.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/TOCropViewController/TOCropViewControllerBundle.bundle",
@@ -585,7 +563,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Status-StatusIm-StatusImTests/Pods-Status-StatusIm-StatusImTests-resources.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Status-StatusIm/Pods-Status-StatusIm-resources.sh\"\n";
showEnvVarsInLog = 0;
};
3AAD2AD524A3A60E0075D594 /* Bundle React Native code and images */ = {
@@ -616,51 +594,7 @@
shellPath = "/usr/bin/env sh";
shellScript = "\"${PROJECT_DIR}/scripts/set_xcode_version.sh\" > ./logs/set_xcode_version.log 2>&1";
};
4DBAAF9A3117797361E216BA /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Status-StatusImPR/Pods-Status-StatusImPR-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker/QBImagePicker.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/TOCropViewController/TOCropViewControllerBundle.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/QBImagePicker.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TOCropViewControllerBundle.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Status-StatusImPR/Pods-Status-StatusImPR-resources.sh\"\n";
showEnvVarsInLog = 0;
};
A461E3110C485D2A21EB942C /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Status-StatusIm-StatusImTests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
C5DA0344FCE555AD1908FBCD /* [CP] Check Pods Manifest.lock */ = {
523CD6BCB20FD78FBF3564AD /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -682,6 +616,94 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
BB1D92AA7446228787D6925C /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Status-StatusImPR/Pods-Status-StatusImPR-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker/QBImagePicker.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/TOCropViewController/TOCropViewControllerBundle.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/QBImagePicker.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TOCropViewControllerBundle.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Status-StatusImPR/Pods-Status-StatusImPR-resources.sh\"\n";
showEnvVarsInLog = 0;
};
BDAFF7E8D7D1C97E92C1F9B0 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Status-StatusImPR-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
CA339D1D94763C013F2794AD /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Status-StatusIm-StatusImTests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
D737FA0B0E9D346092C626FB /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Status-StatusIm-StatusImTests/Pods-Status-StatusIm-StatusImTests-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker/QBImagePicker.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/TOCropViewController/TOCropViewControllerBundle.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/QBImagePicker.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TOCropViewControllerBundle.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Status-StatusIm-StatusImTests/Pods-Status-StatusIm-StatusImTests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
E3914A731DF919ED00EBB515 /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 8;
@@ -696,28 +718,6 @@
shellPath = "/usr/bin/env sh";
shellScript = "\"${PROJECT_DIR}/scripts/set_xcode_version.sh\" > ./logs/set_xcode_version.log 2>&1";
};
EC618D80223E4CE064CFF898 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Status-StatusIm/Pods-Status-StatusIm-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker/QBImagePicker.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/TOCropViewController/TOCropViewControllerBundle.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/QBImagePicker.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TOCropViewControllerBundle.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Status-StatusIm/Pods-Status-StatusIm-resources.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@@ -765,7 +765,7 @@
/* Begin XCBuildConfiguration section */
00E356F61AD99517003FC87E /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = DAE7378308FEB005CE0A6E42 /* Pods-Status-StatusIm-StatusImTests.debug.xcconfig */;
baseConfigurationReference = 59C9C002A09CA7F40E69C6CB /* Pods-Status-StatusIm-StatusImTests.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_ID_SUFFIX = .debug;
@@ -802,7 +802,7 @@
};
00E356F71AD99517003FC87E /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 93347A9564A62A24509EFA9C /* Pods-Status-StatusIm-StatusImTests.release.xcconfig */;
baseConfigurationReference = ACFD5EEA905CF67FD6F8C2CC /* Pods-Status-StatusIm-StatusImTests.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_ID_SUFFIX = "";
@@ -835,7 +835,7 @@
};
13B07F941A680F5B00A75B9A /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = AA6DC18226EB1EFB2A8FE64D /* Pods-Status-StatusIm.debug.xcconfig */;
baseConfigurationReference = 1130DCD9CBDCA3CA461F55B4 /* Pods-Status-StatusIm.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon$(BUNDLE_ID_SUFFIX)";
BUNDLE_ID_SUFFIX = .debug;
@@ -915,7 +915,7 @@
};
13B07F951A680F5B00A75B9A /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 1CDF317A2E103217DF386083 /* Pods-Status-StatusIm.release.xcconfig */;
baseConfigurationReference = 668C1A2ADF1899973DAA1AB7 /* Pods-Status-StatusIm.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon$(BUNDLE_ID_SUFFIX)";
BUNDLE_ID_SUFFIX = "";
@@ -988,7 +988,7 @@
};
3AAD2ADA24A3A60E0075D594 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = C618F2C2EF820C722B1E7624 /* Pods-Status-StatusImPR.debug.xcconfig */;
baseConfigurationReference = D0D6FCD821497D4A6D28C82E /* Pods-Status-StatusImPR.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon$(BUNDLE_ID_SUFFIX)";
BUNDLE_ID_SUFFIX = .debug;
@@ -1065,7 +1065,7 @@
};
3AAD2ADB24A3A60E0075D594 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 06AF19FA626AFFC91E66916B /* Pods-Status-StatusImPR.release.xcconfig */;
baseConfigurationReference = A18E846035BD6544591E45B9 /* Pods-Status-StatusImPR.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIconPR$(BUNDLE_ID_SUFFIX)";
BUNDLE_ID_SUFFIX = "";
+2 -4
View File
@@ -7,12 +7,10 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <React/RCTBridgeDelegate.h>
#import <RCTAppDelegate.h>
#import <UIKit/UIKit.h>
#import <UserNotifications/UNUserNotificationCenter.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate, UNUserNotificationCenterDelegate>
@property (nonatomic, strong) UIWindow *window;
@interface AppDelegate : RCTAppDelegate <UIApplicationDelegate, UNUserNotificationCenterDelegate>
@end
+4 -83
View File
@@ -17,7 +17,6 @@
#import "RNSplashScreen.h"
#import "RCTLinkingManager.h"
#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTHTTPRequestHandler.h>
@@ -28,30 +27,8 @@
#import <SDWebImage/SDWebImageDownloaderOperation.h>
#import <Security/Security.h>
// adding this for v0.68.x
#import <React/RCTAppSetupUtils.h>
#if RCT_NEW_ARCH_ENABLED
#import <React/CoreModulesPlugins.h>
#import <React/RCTCxxBridgeDelegate.h>
#import <React/RCTFabricSurfaceHostingProxyRootView.h>
#import <React/RCTSurfacePresenter.h>
#import <React/RCTSurfacePresenterBridgeAdapter.h>
#import <ReactCommon/RCTTurboModuleManager.h>
#import <react/config/ReactNativeConfig.h>
static NSString *const kRNConcurrentRoot = @"concurrentRoot";
@interface AppDelegate () <RCTCxxBridgeDelegate, RCTTurboModuleManagerDelegate> {
RCTTurboModuleManager *_turboModuleManager;
RCTSurfacePresenterBridgeAdapter *_bridgeAdapter;
std::shared_ptr<const facebook::react::ReactNativeConfig> _reactNativeConfig;
facebook::react::ContextContainer::Shared _contextContainer;
}
@end
#endif
//TODO: properly import the framework
extern "C" NSString* StatusgoImageServerTLSCert();
@@ -66,18 +43,12 @@ extern "C" NSString* StatusgoImageServerTLSCert();
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
RCTAppSetupPrepareApp(application);
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
[ReactNativeNavigation bootstrapWithBridge:bridge];
if (!self.bridge) {
self.bridge = [self createBridgeWithDelegate:self launchOptions:launchOptions];
}
#if RCT_NEW_ARCH_ENABLED
_contextContainer = std::make_shared<facebook::react::ContextContainer const>();
_reactNativeConfig = std::make_shared<facebook::react::EmptyReactNativeConfig const>();
_contextContainer->insert("ReactNativeConfig", _reactNativeConfig);
_bridgeAdapter = [[RCTSurfacePresenterBridgeAdapter alloc] initWithBridge:bridge contextContainer:_contextContainer];
bridge.surfacePresenter = _bridgeAdapter.surfacePresenter;
#endif
[ReactNativeNavigation bootstrapWithBridge:self.bridge];
signal(SIGPIPE, SIG_IGN);
NSURL *jsCodeLocation;
@@ -132,25 +103,6 @@ extern "C" NSString* StatusgoImageServerTLSCert();
}
/// This method controls whether the `concurrentRoot`feature of React18 is turned on or off.
///
/// @see: https://reactjs.org/blog/2022/03/29/react-v18.html
/// @note: This requires to be rendering on Fabric (i.e. on the New Architecture).
/// @return: `true` if the `concurrentRoot` feture is enabled. Otherwise, it returns `false`.
- (BOOL)concurrentRootEnabled
{
// Switch this bool to turn on and off the concurrent root
return true;
}
- (NSDictionary *)prepareInitialProps
{
NSMutableDictionary *initProps = [NSMutableDictionary new];
#ifdef RCT_NEW_ARCH_ENABLED
initProps[kRNConcurrentRoot] = @([self concurrentRootEnabled]);
#endif
return initProps;
}
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG
@@ -160,37 +112,6 @@ extern "C" NSString* StatusgoImageServerTLSCert();
#endif
}
#if RCT_NEW_ARCH_ENABLED
#pragma mark - RCTCxxBridgeDelegate
- (std::unique_ptr<facebook::react::JSExecutorFactory>)jsExecutorFactoryForBridge:(RCTBridge *)bridge
{
_turboModuleManager = [[RCTTurboModuleManager alloc] initWithBridge:bridge
delegate:self
jsInvoker:bridge.jsCallInvoker];
return RCTAppSetupDefaultJsExecutorFactory(bridge, _turboModuleManager);
}
#pragma mark RCTTurboModuleManagerDelegate
- (Class)getModuleClassFromName:(const char *)name
{
return RCTCoreModulesClassProvider(name);
}
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
jsInvoker:(std::shared_ptr<facebook::react::CallInvoker>)jsInvoker
{
return nullptr;
}
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
initParams:
(const facebook::react::ObjCTurboModule::InitParams &)params
{
return nullptr;
}
- (id<RCTTurboModule>)getModuleInstanceFromClass:(Class)moduleClass
{
return RCTAppSetupDefaultModuleFromClass(moduleClass);
}
#endif
- (void)applicationWillResignActive:(UIApplication *)application {
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"BLANK_PREVIEW"]) {
[self.window addSubview:_blankView];
+9 -4
View File
@@ -1,10 +1,11 @@
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
/**
* Metro configuration for React Native
* https://github.com/facebook/react-native
* Metro configuration
* https://facebook.github.io/metro/docs/configuration
*
* @format
* @type {import('metro-config').MetroConfig}
*/
module.exports = {
const config = {
transformer: {
getTransformOptions: async () => ({
transform: {
@@ -14,6 +15,10 @@ module.exports = {
}),
},
resolver: {
resolverMainFields: ['react-native', 'browser', 'main'],
nodeModulesPaths: ['./node_modules'],
extraNodeModules: require('node-libs-react-native'),
unstable_enableSymlinks: true,
},
};
module.exports = mergeConfig(getDefaultConfig(__dirname), config);
@@ -1,4 +1,5 @@
apply plugin: 'com.android.library'
apply plugin: "org.jetbrains.kotlin.android"
def getStatusGoSHA1 = { ->
def statusgoOverridePath = System.getenv("STATUS_GO_SRC_OVERRIDE")
@@ -0,0 +1,345 @@
package im.status.ethereum.module;
import com.facebook.react.bridge.Callback;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import statusgo.Statusgo;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.IOException;
import org.json.JSONObject;
import org.json.JSONException;
import android.util.Log;
import android.content.Context;
import android.app.Activity;
public class AccountManager extends ReactContextBaseJavaModule {
private static final String TAG = "AccountManager";
private static final String gethLogFileName = "geth.log";
private ReactApplicationContext reactContext;
private Utils utils;
private LogManager logManager;
public AccountManager(ReactApplicationContext reactContext) {
super(reactContext);
this.reactContext = reactContext;
this.utils = new Utils(reactContext);
this.logManager = new LogManager(reactContext);
}
@Override
public String getName() {
return "AccountManager";
}
private String getTestnetDataDir(final String absRootDirPath) {
return this.utils.pathCombine(absRootDirPath, "ethereum/testnet");
}
@ReactMethod
public void createAccountAndLogin(final String createAccountRequest) {
Log.d(TAG, "createAccountAndLogin");
String result = Statusgo.createAccountAndLogin(createAccountRequest);
if (result.startsWith("{\"error\":\"\"")) {
Log.d(TAG, "createAccountAndLogin success: " + result);
Log.d(TAG, "Geth node started");
} else {
Log.e(TAG, "createAccountAndLogin failed: " + result);
}
}
@ReactMethod
public void restoreAccountAndLogin(final String restoreAccountRequest) {
Log.d(TAG, "restoreAccountAndLogin");
String result = Statusgo.restoreAccountAndLogin(restoreAccountRequest);
if (result.startsWith("{\"error\":\"\"")) {
Log.d(TAG, "restoreAccountAndLogin success: " + result);
Log.d(TAG, "Geth node started");
} else {
Log.e(TAG, "restoreAccountAndLogin failed: " + result);
}
}
private String updateConfig(final String jsonConfigString, final String absRootDirPath, final String keystoreDirPath) throws JSONException {
final JSONObject jsonConfig = new JSONObject(jsonConfigString);
// retrieve parameters from app config, that will be applied onto the Go-side config later on
final String dataDirPath = jsonConfig.getString("DataDir");
final Boolean logEnabled = jsonConfig.getBoolean("LogEnabled");
final Context context = this.getReactApplicationContext();
final File gethLogFile = logEnabled ? this.logManager.prepareLogsFile(context) : null;
String gethLogDirPath = null;
if (gethLogFile != null) {
gethLogDirPath = gethLogFile.getParent();
}
Log.d(TAG, "log dir: " + gethLogDirPath + " log name: " + gethLogFileName);
jsonConfig.put("DataDir", dataDirPath);
jsonConfig.put("KeyStoreDir", keystoreDirPath);
jsonConfig.put("LogDir", gethLogDirPath);
jsonConfig.put("LogFile", gethLogFileName);
return jsonConfig.toString();
}
private static void prettyPrintConfig(final String config) {
Log.d(TAG, "startNode() with config (see below)");
String configOutput = config;
final int maxOutputLen = 4000;
Log.d(TAG, "********************** NODE CONFIG ****************************");
while (!configOutput.isEmpty()) {
Log.d(TAG, "Node config:" + configOutput.substring(0, Math.min(maxOutputLen, configOutput.length())));
if (configOutput.length() > maxOutputLen) {
configOutput = configOutput.substring(maxOutputLen);
} else {
break;
}
}
Log.d(TAG, "******************* ENDOF NODE CONFIG *************************");
}
private void copyDirectory(File sourceLocation, File targetLocation) throws IOException {
if (sourceLocation.isDirectory()) {
if (!targetLocation.exists() && !targetLocation.mkdirs()) {
throw new IOException("Cannot create dir " + targetLocation.getAbsolutePath());
}
String[] children = sourceLocation.list();
for (int i = 0; i < children.length; i++) {
copyDirectory(new File(sourceLocation, children[i]), new File(targetLocation, children[i]));
}
} else {
File directory = targetLocation.getParentFile();
if (directory != null && !directory.exists() && !directory.mkdirs()) {
throw new IOException("Cannot create dir " + directory.getAbsolutePath());
}
InputStream in = new FileInputStream(sourceLocation);
OutputStream out = new FileOutputStream(targetLocation);
byte[] buf = new byte[1024];
int len;
while ((len = in.read(buf)) > 0) {
out.write(buf, 0, len);
}
in.close();
out.close();
}
}
private String prepareDirAndUpdateConfig(final String jsonConfigString, final String keyUID) {
final String absRootDirPath = this.utils.getNoBackupDirectory();
final String dataFolder = this.getTestnetDataDir(absRootDirPath);
Log.d(TAG, "Starting Geth node in folder: " + dataFolder);
try {
final File newFile = new File(dataFolder);
// todo handle error?
newFile.mkdir();
} catch (Exception e) {
Log.e(TAG, "error making folder: " + dataFolder, e);
}
final String ropstenFlagPath = this.utils.pathCombine(absRootDirPath, "ropsten_flag");
final File ropstenFlag = new File(ropstenFlagPath);
if (!ropstenFlag.exists()) {
try {
final String chaindDataFolderPath = this.utils.pathCombine(dataFolder, "StatusIM/lightchaindata");
final File lightChainFolder = new File(chaindDataFolderPath);
if (lightChainFolder.isDirectory()) {
String[] children = lightChainFolder.list();
for (int i = 0; i < children.length; i++) {
new File(lightChainFolder, children[i]).delete();
}
}
lightChainFolder.delete();
ropstenFlag.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
}
String testnetDataDir = dataFolder;
String oldKeystoreDir = this.utils.pathCombine(testnetDataDir, "keystore");
String newKeystoreDir = this.utils.pathCombine(absRootDirPath, "keystore");
final File oldKeystore = new File(oldKeystoreDir);
if (oldKeystore.exists()) {
try {
final File newKeystore = new File(newKeystoreDir);
copyDirectory(oldKeystore, newKeystore);
if (oldKeystore.isDirectory()) {
String[] children = oldKeystore.list();
for (int i = 0; i < children.length; i++) {
new File(oldKeystoreDir, children[i]).delete();
}
}
oldKeystore.delete();
} catch (IOException e) {
e.printStackTrace();
}
}
try {
final String multiaccountKeystoreDir = this.utils.pathCombine("/keystore", keyUID);
final String updatedJsonConfigString = this.updateConfig(jsonConfigString, absRootDirPath, multiaccountKeystoreDir);
prettyPrintConfig(updatedJsonConfigString);
return updatedJsonConfigString;
} catch (JSONException e) {
Log.e(TAG, "updateConfig failed: " + e.getMessage());
System.exit(1);
return "";
}
}
@ReactMethod
public void prepareDirAndUpdateConfig(final String keyUID, final String config, final Callback callback) {
Log.d(TAG, "prepareDirAndUpdateConfig");
String finalConfig = prepareDirAndUpdateConfig(config, keyUID);
callback.invoke(finalConfig);
}
@ReactMethod
public void saveAccountAndLoginWithKeycard(final String multiaccountData, final String password, final String settings, final String config, final String accountsData, final String chatKey) {
try {
Log.d(TAG, "saveAccountAndLoginWithKeycard");
String finalConfig = prepareDirAndUpdateConfig(config, this.utils.getKeyUID(multiaccountData));
String result = Statusgo.saveAccountAndLoginWithKeycard(multiaccountData, password, settings, finalConfig, accountsData, chatKey);
if (result.startsWith("{\"error\":\"\"")) {
Log.d(TAG, "saveAccountAndLoginWithKeycard result: " + result);
Log.d(TAG, "Geth node started");
} else {
Log.e(TAG, "saveAccountAndLoginWithKeycard failed: " + result);
}
} catch (JSONException e) {
Log.e(TAG, "JSON conversion failed: " + e.getMessage());
}
}
@ReactMethod
public void loginWithKeycard(final String accountData, final String password, final String chatKey, final String nodeConfigJSON) {
Log.d(TAG, "loginWithKeycard");
this.utils.migrateKeyStoreDir(accountData, password);
String result = Statusgo.loginWithKeycard(accountData, password, chatKey, nodeConfigJSON);
if (result.startsWith("{\"error\":\"\"")) {
Log.d(TAG, "LoginWithKeycard result: " + result);
} else {
Log.e(TAG, "LoginWithKeycard failed: " + result);
}
}
@ReactMethod
public void loginWithConfig(final String accountData, final String password, final String configJSON) {
Log.d(TAG, "loginWithConfig");
this.utils.migrateKeyStoreDir(accountData, password);
String result = Statusgo.loginWithConfig(accountData, password, configJSON);
if (result.startsWith("{\"error\":\"\"")) {
Log.d(TAG, "LoginWithConfig result: " + result);
} else {
Log.e(TAG, "LoginWithConfig failed: " + result);
}
}
@ReactMethod
public void loginAccount(final String request) {
Log.d(TAG, "loginAccount");
String result = Statusgo.loginAccount(request);
if (result.startsWith("{\"error\":\"\"")) {
Log.d(TAG, "loginAccount result: " + result);
} else {
Log.e(TAG, "loginAccount failed: " + result);
}
}
@ReactMethod
public void verify(final String address, final String password, final Callback callback) throws JSONException {
Activity currentActivity = getCurrentActivity();
final String absRootDirPath = this.utils.getNoBackupDirectory();
final String newKeystoreDir = this.utils.pathCombine(absRootDirPath, "keystore");
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.verifyAccountPassword(newKeystoreDir, address, password), callback);
}
@ReactMethod
public void verifyDatabasePassword(final String keyUID, final String password, final Callback callback) throws JSONException {
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.verifyDatabasePassword(keyUID, password), callback);
}
@ReactMethod
private void openAccounts(final Callback callback) throws JSONException {
Log.d(TAG, "openAccounts");
final String rootDir = this.utils.getNoBackupDirectory();
Log.d(TAG, "[Opening accounts" + rootDir);
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.openAccounts(rootDir), callback);
}
//TODO : refactor logout usage to accept callback so that we can do this.utils.executeRunnableStatusGoMethod
@ReactMethod
public void logout() {
Log.d(TAG, "logout");
Runnable r = new Runnable() {
@Override
public void run() {
String result = Statusgo.logout();
if (result.startsWith("{\"error\":\"\"")) {
Log.d(TAG, "Logout result: " + result);
} else {
Log.e(TAG, "Logout failed: " + result);
}
}
};
StatusThreadPoolExecutor.getInstance().execute(r);
}
@ReactMethod
public void multiAccountStoreAccount(final String json, final Callback callback) throws JSONException {
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.multiAccountStoreAccount(json), callback);
}
@ReactMethod
public void multiAccountLoadAccount(final String json, final Callback callback) throws JSONException {
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.multiAccountLoadAccount(json), callback);
}
@ReactMethod
public void multiAccountDeriveAddresses(final String json, final Callback callback) throws JSONException {
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.multiAccountDeriveAddresses(json), callback);
}
@ReactMethod
public void multiAccountGenerateAndDeriveAddresses(final String json, final Callback callback) throws JSONException {
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.multiAccountGenerateAndDeriveAddresses(json), callback);
}
@ReactMethod
public void multiAccountStoreDerived(final String json, final Callback callback) throws JSONException {
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.multiAccountStoreDerivedAccounts(json), callback);
}
@ReactMethod
public void multiAccountImportMnemonic(final String json, final Callback callback) throws JSONException {
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.multiAccountImportMnemonic(json), callback);
}
@ReactMethod
public void multiAccountImportPrivateKey(final String json, final Callback callback) throws JSONException {
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.multiAccountImportPrivateKey(json), callback);
}
@ReactMethod
public void deleteMultiaccount(final String keyUID, final Callback callback) throws JSONException {
final String keyStoreDir = this.utils.getKeyStorePath(keyUID);
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.deleteMultiaccount(keyUID, keyStoreDir), callback);
}
}
@@ -0,0 +1,66 @@
package im.status.ethereum.module;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.Callback;
import statusgo.Statusgo;
import android.util.Log;
import java.io.File;
import android.os.Environment;
import android.content.Context;
public class DatabaseManager extends ReactContextBaseJavaModule {
private static final String TAG = "DatabaseManager";
private ReactApplicationContext reactContext;
private static final String exportDBFileName = "export.db";
private Utils utils;
public DatabaseManager(ReactApplicationContext reactContext) {
this.reactContext = reactContext;
this.utils = new Utils(reactContext);
}
@Override
public String getName() {
return "DatabaseManager";
}
private File getExportDBFile() {
final Context context = this.getReactApplicationContext();
// Environment.getExternalStoragePublicDirectory doesn't work as expected on Android Q
// https://developer.android.com/reference/android/os/Environment#getExternalStoragePublicDirectory(java.lang.String)
final File pubDirectory = context.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS);
final File filename = new File(pubDirectory, exportDBFileName);
return filename;
}
@ReactMethod
public void exportUnencryptedDatabase(final String accountData, final String password, final Callback callback) {
Log.d(TAG, "login");
final File newFile = getExportDBFile();
this.utils.migrateKeyStoreDir(accountData, password);
String result = Statusgo.exportUnencryptedDatabase(accountData, password, newFile.getAbsolutePath());
if (result.startsWith("{\"error\":\"\"")) {
Log.d(TAG, "Login result: " + result);
} else {
Log.e(TAG, "Login failed: " + result);
}
}
@ReactMethod
public void importUnencryptedDatabase(final String accountData, final String password) {
Log.d(TAG, "importUnencryptedDatabase");
final File newFile = getExportDBFile();
this.utils.migrateKeyStoreDir(accountData, password);
String result = Statusgo.importUnencryptedDatabase(accountData, password, newFile.getAbsolutePath());
if (result.startsWith("{\"error\":\"\"")) {
Log.d(TAG, "import result: " + result);
} else {
Log.e(TAG, "import failed: " + result);
}
}
}
@@ -0,0 +1,173 @@
package im.status.ethereum.module;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.Callback;
import android.util.Log;
import statusgo.Statusgo;
import org.json.JSONException;
import java.util.function.Function;
import android.app.Activity;
import android.view.WindowManager;
import android.os.Build;
import android.view.Window;
import android.preference.PreferenceManager;
import android.content.SharedPreferences;
public class EncryptionUtils extends ReactContextBaseJavaModule {
private static final String TAG = "EncryptionUtils";
private ReactApplicationContext reactContext;
private Utils utils;
public EncryptionUtils(ReactApplicationContext reactContext) {
super(reactContext);
this.reactContext = reactContext;
this.utils = new Utils(reactContext);
}
@Override
public String getName() {
return "EncryptionUtils";
}
@ReactMethod
private void initKeystore(final String keyUID, final Callback callback) throws JSONException {
Log.d(TAG, "initKeystore");
final String commonKeydir = this.utils.pathCombine(this.utils.getNoBackupDirectory(), "/keystore");
final String keydir = this.utils.pathCombine(commonKeydir, keyUID);
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.initKeystore(keydir), callback);
}
@ReactMethod
public void reEncryptDbAndKeystore(final String keyUID, final String password, final String newPassword, final Callback callback) throws JSONException {
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.changeDatabasePassword(keyUID, password, newPassword), callback);
}
@ReactMethod
public void convertToKeycardAccount(final String keyUID, final String accountData, final String options, final String keycardUID, final String password,
final String newPassword, final Callback callback) throws JSONException {
final String keyStoreDir = this.utils.getKeyStorePath(keyUID);
this.utils.executeRunnableStatusGoMethod(() -> {
Statusgo.initKeystore(keyStoreDir);
return Statusgo.convertToKeycardAccount(accountData, options, keycardUID, password, newPassword);
}, callback);
}
@ReactMethod(isBlockingSynchronousMethod = true)
public String encodeTransfer(final String to, final String value) {
return Statusgo.encodeTransfer(to, value);
}
@ReactMethod(isBlockingSynchronousMethod = true)
public String decodeParameters(final String decodeParamJSON) {
return Statusgo.decodeParameters(decodeParamJSON);
}
@ReactMethod(isBlockingSynchronousMethod = true)
public String hexToNumber(final String hex) {
return Statusgo.hexToNumber(hex);
}
@ReactMethod(isBlockingSynchronousMethod = true)
public String numberToHex(final String numString) {
return Statusgo.numberToHex(numString);
}
@ReactMethod(isBlockingSynchronousMethod = true)
public String sha3(final String str) {
return Statusgo.sha3(str);
}
@ReactMethod(isBlockingSynchronousMethod = true)
public String utf8ToHex(final String str) {
return Statusgo.utf8ToHex(str);
}
@ReactMethod(isBlockingSynchronousMethod = true)
public String hexToUtf8(final String str) {
return Statusgo.hexToUtf8(str);
}
@ReactMethod
public void setBlankPreviewFlag(final Boolean blankPreview) {
final SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this.reactContext);
sharedPrefs.edit().putBoolean("BLANK_PREVIEW", blankPreview).commit();
setSecureFlag();
}
private void setSecureFlag() {
final SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this.reactContext);
final boolean setSecure = sharedPrefs.getBoolean("BLANK_PREVIEW", true);
final Activity activity = this.reactContext.getCurrentActivity();
if (activity != null) {
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
final Window window = activity.getWindow();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH && setSecure) {
window.addFlags(WindowManager.LayoutParams.FLAG_SECURE);
} else {
window.clearFlags(WindowManager.LayoutParams.FLAG_SECURE);
}
}
});
}
}
@ReactMethod
public void hashTransaction(final String txArgsJSON, final Callback callback) throws JSONException {
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.hashTransaction(txArgsJSON), callback);
}
@ReactMethod
public void hashMessage(final String message, final Callback callback) throws JSONException {
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.hashMessage(message), callback);
}
@ReactMethod
public void multiformatDeserializePublicKey(final String multiCodecKey, final String base58btc, final Callback callback) throws JSONException {
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.multiformatDeserializePublicKey(multiCodecKey,base58btc), callback);
}
@ReactMethod
public void deserializeAndCompressKey(final String desktopKey, final Callback callback) throws JSONException {
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.deserializeAndCompressKey(desktopKey), callback);
}
@ReactMethod
public void hashTypedData(final String data, final Callback callback) throws JSONException {
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.hashTypedData(data), callback);
}
@ReactMethod
public void hashTypedDataV4(final String data, final Callback callback) throws JSONException {
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.hashTypedDataV4(data), callback);
}
@ReactMethod
public void signMessage(final String rpcParams, final Callback callback) throws JSONException {
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.signMessage(rpcParams), callback);
}
@ReactMethod
public void signTypedData(final String data, final String account, final String password, final Callback callback) throws JSONException {
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.signTypedData(data, account, password), callback);
}
@ReactMethod
public void signTypedDataV4(final String data, final String account, final String password, final Callback callback) throws JSONException {
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.signTypedDataV4(data, account, password), callback);
}
@ReactMethod
public void signGroupMembership(final String content, final Callback callback) throws JSONException {
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.signGroupMembership(content), callback);
}
}
@@ -0,0 +1,227 @@
package im.status.ethereum.module;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.Callback;
import java.io.File;
import java.util.Stack;
import android.util.Log;
import android.net.Uri;
import java.io.OutputStreamWriter;
import java.io.IOException;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import androidx.core.content.FileProvider;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.FileOutputStream;
import java.util.zip.ZipOutputStream;
import java.io.FileInputStream;
import java.util.zip.ZipEntry;
import org.json.JSONObject;
import statusgo.Statusgo;
import android.content.Context;
import org.json.JSONException;
public class LogManager extends ReactContextBaseJavaModule {
private static final String TAG = "LogManager";
private static final String gethLogFileName = "geth.log";
private static final String statusLogFileName = "Status.log";
private static final String logsZipFileName = "Status-debug-logs.zip";
private ReactApplicationContext reactContext;
private Utils utils;
public LogManager(ReactApplicationContext reactContext) {
super(reactContext);
this.reactContext = reactContext;
this.utils = new Utils(reactContext);
}
@Override
public String getName() {
return "LogManager";
}
private File getLogsFile() {
final File pubDirectory = this.utils.getPublicStorageDirectory();
final File logFile = new File(pubDirectory, gethLogFileName);
return logFile;
}
public File prepareLogsFile(final Context context) {
final File logFile = this.utils.getLogsFile();
try {
logFile.setReadable(true);
File parent = logFile.getParentFile();
if (!parent.canWrite()) {
return null;
}
if (!parent.exists()) {
parent.mkdirs();
}
logFile.createNewFile();
logFile.setWritable(true);
Log.d(TAG, "Can write " + logFile.canWrite());
Uri gethLogUri = Uri.fromFile(logFile);
String gethLogFilePath = logFile.getAbsolutePath();
Log.d(TAG, gethLogFilePath);
return logFile;
} catch (Exception e) {
Log.d(TAG, "Can't create geth.log file! " + e.getMessage());
}
return null;
}
private void showErrorMessage(final String message) {
final Activity activity = getCurrentActivity();
new AlertDialog.Builder(activity)
.setTitle("Error")
.setMessage(message)
.setNegativeButton("Exit", new DialogInterface.OnClickListener() {
public void onClick(final DialogInterface dialog, final int id) {
dialog.dismiss();
}
}).show();
}
private void dumpAdbLogsTo(final FileOutputStream statusLogStream) throws IOException {
final String filter = "logcat -d -b main ReactNativeJS:D StatusModule:D StatusService:D StatusNativeLogs:D *:S";
final java.lang.Process p = Runtime.getRuntime().exec(filter);
final java.io.BufferedReader in = new java.io.BufferedReader(new java.io.InputStreamReader(p.getInputStream()));
final java.io.BufferedWriter out = new java.io.BufferedWriter(new java.io.OutputStreamWriter(statusLogStream));
String line;
while ((line = in.readLine()) != null) {
out.write(line);
out.newLine();
}
out.close();
in.close();
}
private Boolean zip(File[] _files, File zipFile, Stack<String> errorList) {
final int BUFFER = 0x8000;
try {
BufferedInputStream origin = null;
FileOutputStream dest = new FileOutputStream(zipFile);
ZipOutputStream out = new ZipOutputStream(new BufferedOutputStream(dest));
byte data[] = new byte[BUFFER];
for (int i = 0; i < _files.length; i++) {
final File file = _files[i];
if (file == null || !file.exists()) {
continue;
}
Log.v("Compress", "Adding: " + file.getAbsolutePath());
try {
FileInputStream fi = new FileInputStream(file);
origin = new BufferedInputStream(fi, BUFFER);
ZipEntry entry = new ZipEntry(file.getName());
out.putNextEntry(entry);
int count;
while ((count = origin.read(data, 0, BUFFER)) != -1) {
out.write(data, 0, count);
}
origin.close();
} catch (IOException e) {
Log.e(TAG, e.getMessage());
errorList.push(e.getMessage());
}
}
out.close();
return true;
} catch (Exception e) {
Log.e(TAG, e.getMessage());
e.printStackTrace();
return false;
}
}
@ReactMethod
public void sendLogs(final String dbJson, final String jsLogs, final Callback callback) {
Log.d(TAG, "sendLogs");
if (!this.utils.checkAvailability()) {
return;
}
final Context context = this.getReactApplicationContext();
final File logsTempDir = new File(context.getCacheDir(), "logs"); // This path needs to be in sync with android/app/src/main/res/xml/file_provider_paths.xml
logsTempDir.mkdir();
final File dbFile = new File(logsTempDir, "db.json");
try {
OutputStreamWriter outputStreamWriter = new OutputStreamWriter(new FileOutputStream(dbFile));
outputStreamWriter.write(dbJson);
outputStreamWriter.close();
} catch (IOException e) {
Log.e(TAG, "File write failed: " + e.toString());
showErrorMessage(e.getLocalizedMessage());
}
final File zipFile = new File(logsTempDir, logsZipFileName);
final File statusLogFile = new File(logsTempDir, statusLogFileName);
final File gethLogFile = getLogsFile();
try {
if (zipFile.exists() || zipFile.createNewFile()) {
final long usableSpace = zipFile.getUsableSpace();
if (usableSpace < 20 * 1024 * 1024) {
final String message = String.format("Insufficient space available on device (%s) to write logs.\nPlease free up some space.", android.text.format.Formatter.formatShortFileSize(context, usableSpace));
Log.e(TAG, message);
showErrorMessage(message);
return;
}
}
dumpAdbLogsTo(new FileOutputStream(statusLogFile));
final Stack<String> errorList = new Stack<String>();
final Boolean zipped = zip(new File[]{dbFile, gethLogFile, statusLogFile}, zipFile, errorList);
if (zipped && zipFile.exists()) {
zipFile.setReadable(true, false);
Uri extUri = FileProvider.getUriForFile(context, context.getPackageName() + ".provider", zipFile);
callback.invoke(extUri.toString());
} else {
Log.d(TAG, "File " + zipFile.getAbsolutePath() + " does not exist");
}
} catch (Exception e) {
Log.e(TAG, e.getMessage());
showErrorMessage(e.getLocalizedMessage());
e.printStackTrace();
return;
} finally {
dbFile.delete();
statusLogFile.delete();
zipFile.deleteOnExit();
}
}
@ReactMethod
public void initLogging(final boolean enabled, final boolean mobileSystem, final String logLevel, final Callback callback) throws JSONException {
final JSONObject jsonConfig = new JSONObject();
jsonConfig.put("Enabled", enabled);
jsonConfig.put("MobileSystem", mobileSystem);
jsonConfig.put("Level", logLevel);
jsonConfig.put("File", getLogsFile().getAbsolutePath());
final String config = jsonConfig.toString();
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.initLogging(config), callback);
}
@ReactMethod(isBlockingSynchronousMethod = true)
public String logFileDirectory() {
return this.utils.getPublicStorageDirectory().getAbsolutePath();
}
}
@@ -0,0 +1,78 @@
package im.status.ethereum.module;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.Callback;
import org.json.JSONException;
import statusgo.Statusgo;
import org.json.JSONObject;
public class NetworkManager extends ReactContextBaseJavaModule {
private ReactApplicationContext reactContext;
private Utils utils;
public NetworkManager(ReactApplicationContext reactContext) {
super(reactContext);
this.reactContext = reactContext;
this.utils = new Utils(reactContext);
}
@Override
public String getName() {
return "NetworkManager";
}
@ReactMethod
public void startSearchForLocalPairingPeers(final Callback callback) throws JSONException {
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.startSearchForLocalPairingPeers(), callback);
}
@ReactMethod
public void getConnectionStringForBootstrappingAnotherDevice(final String configJSON, final Callback callback) throws JSONException {
final JSONObject jsonConfig = new JSONObject(configJSON);
final JSONObject senderConfig = jsonConfig.getJSONObject("senderConfig");
final String keyUID = senderConfig.getString("keyUID");
final String keyStorePath = this.utils.getKeyStorePath(keyUID);
senderConfig.put("keystorePath", keyStorePath);
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.getConnectionStringForBootstrappingAnotherDevice(jsonConfig.toString()), callback);
}
@ReactMethod
public void inputConnectionStringForBootstrapping(final String connectionString, final String configJSON, final Callback callback) throws JSONException {
final JSONObject jsonConfig = new JSONObject(configJSON);
final JSONObject receiverConfig = jsonConfig.getJSONObject("receiverConfig");
final String keyStorePath = this.utils.pathCombine(this.utils.getNoBackupDirectory(), "/keystore");
receiverConfig.put("keystorePath", keyStorePath);
receiverConfig.getJSONObject("nodeConfig").put("rootDataDir", this.utils.getNoBackupDirectory());
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.inputConnectionStringForBootstrapping(connectionString, jsonConfig.toString()), callback);
}
@ReactMethod
public void sendTransactionWithSignature(final String txArgsJSON, final String signature, final Callback callback) throws JSONException {
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.sendTransactionWithSignature(txArgsJSON, signature), callback);
}
@ReactMethod
public void sendTransaction(final String txArgsJSON, final String password, final Callback callback) throws JSONException {
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.sendTransaction(txArgsJSON, password), callback);
}
@ReactMethod
public void callRPC(final String payload, final Callback callback) throws JSONException {
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.callRPC(payload), callback);
}
@ReactMethod
public void callPrivateRPC(final String payload, final Callback callback) throws JSONException {
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.callPrivateRPC(payload), callback);
}
@ReactMethod
public void recover(final String rpcParams, final Callback callback) throws JSONException {
this.utils.executeRunnableStatusGoMethod(() -> Statusgo.recover(rpcParams), callback);
}
}
@@ -1,78 +0,0 @@
package im.status.ethereum.module;
import android.view.ActionMode;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.uimanager.NativeViewHierarchyManager;
import com.facebook.react.uimanager.UIBlock;
import com.facebook.react.uimanager.UIManagerModule;
import com.facebook.react.views.textinput.ReactEditText;
import javax.annotation.Nonnull;
class RNSelectableTextInputModule extends ReactContextBaseJavaModule {
private ActionMode lastActionMode;
public RNSelectableTextInputModule(ReactApplicationContext reactContext) {
super(reactContext);
}
@Nonnull
@Override
public String getName() {
return "RNSelectableTextInputManager";
}
@ReactMethod
public void setupMenuItems(final Integer selectableTextViewReactTag, final Integer textInputReactTag) {
ReactApplicationContext reactContext = this.getReactApplicationContext();
UIManagerModule uiManager = reactContext.getNativeModule(UIManagerModule.class);
uiManager.addUIBlock(new UIBlock() {
public void execute (NativeViewHierarchyManager nvhm) {
RNSelectableTextInputViewManager rnSelectableTextManager = (RNSelectableTextInputViewManager) nvhm.resolveViewManager(selectableTextViewReactTag);
ReactEditText reactTextView = (ReactEditText) nvhm.resolveView(textInputReactTag);
rnSelectableTextManager.registerSelectionListener(reactTextView);
}
});
}
@ReactMethod
public void startActionMode(final Integer textInputReactTag) {
ReactApplicationContext reactContext = this.getReactApplicationContext();
UIManagerModule uiManager = reactContext.getNativeModule(UIManagerModule.class);
uiManager.addUIBlock(new UIBlock() {
public void execute (NativeViewHierarchyManager nvhm) {
ReactEditText reactTextView = (ReactEditText) nvhm.resolveView(textInputReactTag);
lastActionMode = reactTextView.startActionMode(reactTextView.getCustomSelectionActionModeCallback(), ActionMode.TYPE_FLOATING);
}
});
}
@ReactMethod
public void hideLastActionMode(){
ReactApplicationContext reactContext = this.getReactApplicationContext();
UIManagerModule uiManager = reactContext.getNativeModule(UIManagerModule.class);
uiManager.addUIBlock(new UIBlock() {
public void execute (NativeViewHierarchyManager nvhm) {
if(lastActionMode!=null){
lastActionMode.finish();
lastActionMode = null;
}
}
});
}
@ReactMethod
public void setSelection(final Integer textInputReactTag, final Integer start, final Integer end){
ReactApplicationContext reactContext = this.getReactApplicationContext();
UIManagerModule uiManager = reactContext.getNativeModule(UIManagerModule.class);
uiManager.addUIBlock(new UIBlock() {
public void execute (NativeViewHierarchyManager nvhm) {
ReactEditText reactTextView = (ReactEditText) nvhm.resolveView(textInputReactTag);
reactTextView.setSelection(start, end);
}
});
}
}
@@ -0,0 +1,72 @@
package im.status.ethereum.module
import android.view.ActionMode
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.bridge.ReactContextBaseJavaModule
import com.facebook.react.bridge.ReactMethod
import com.facebook.react.uimanager.NativeViewHierarchyManager
import com.facebook.react.uimanager.UIBlock
import com.facebook.react.uimanager.UIManagerModule
import com.facebook.react.views.textinput.ReactEditText
class RNSelectableTextInputModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {
private var lastActionMode: ActionMode? = null
override fun getName(): String {
return "RNSelectableTextInputManager"
}
@ReactMethod
fun setupMenuItems(selectableTextViewReactTag: Int?, textInputReactTag: Int?) {
val reactContext = reactApplicationContext
val uiManager = reactContext.getNativeModule(UIManagerModule::class.java)
selectableTextViewReactTag?.let { selectableTag ->
textInputReactTag?.let { inputTag ->
uiManager?.addUIBlock(UIBlock { nvhm: NativeViewHierarchyManager ->
val rnSelectableTextManager = nvhm.resolveViewManager(selectableTag) as RNSelectableTextInputViewManager
val reactTextView = nvhm.resolveView(inputTag) as ReactEditText
rnSelectableTextManager.registerSelectionListener(reactTextView)
})
}
}
}
@ReactMethod
fun startActionMode(textInputReactTag: Int?) {
val reactContext = reactApplicationContext
val uiManager = reactContext.getNativeModule(UIManagerModule::class.java)
textInputReactTag?.let { inputTag ->
uiManager?.addUIBlock(UIBlock { nvhm: NativeViewHierarchyManager ->
val reactTextView = nvhm.resolveView(inputTag) as ReactEditText
lastActionMode = reactTextView.startActionMode(reactTextView.customSelectionActionModeCallback, ActionMode.TYPE_FLOATING)
})
}
}
@ReactMethod
fun hideLastActionMode() {
val reactContext = reactApplicationContext
val uiManager = reactContext.getNativeModule(UIManagerModule::class.java)
uiManager?.addUIBlock(UIBlock { _ ->
lastActionMode?.finish()
lastActionMode = null
})
}
@ReactMethod
fun setSelection(textInputReactTag: Int?, start: Int?, end: Int?) {
val reactContext = reactApplicationContext
val uiManager = reactContext.getNativeModule(UIManagerModule::class.java)
textInputReactTag?.let { inputTag ->
start?.let { s ->
end?.let { e ->
uiManager?.addUIBlock(UIBlock { nvhm: NativeViewHierarchyManager ->
val reactTextView = nvhm.resolveView(inputTag) as ReactEditText
reactTextView.setSelection(s, e)
})
}
}
}
}
}
@@ -1,102 +0,0 @@
package im.status.ethereum.module;
import android.view.ActionMode;
import android.view.ActionMode.Callback;
import android.view.Menu;
import android.view.MenuItem;
import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.bridge.WritableMap;
import com.facebook.react.common.MapBuilder;
import com.facebook.react.uimanager.ThemedReactContext;
import com.facebook.react.uimanager.annotations.ReactProp;
import com.facebook.react.uimanager.events.RCTEventEmitter;
import com.facebook.react.views.textinput.ReactEditText;
import com.facebook.react.views.view.ReactViewGroup;
import com.facebook.react.views.view.ReactViewManager;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class RNSelectableTextInputViewManager extends ReactViewManager {
public static final String REACT_CLASS = "RNSelectableTextInput";
private String[] _menuItems = new String[0];
@Override
public String getName() {
return REACT_CLASS;
}
@Override
public ReactViewGroup createViewInstance(ThemedReactContext context) {
return new ReactViewGroup(context);
}
@ReactProp(name = "menuItems")
public void setMenuItems(ReactViewGroup reactViewGroup, ReadableArray items) {
if(items != null) {
List<String> result = new ArrayList<String>(items.size());
for (int i = 0; i < items.size(); i++) {
result.add(items.getString(i));
}
this._menuItems = result.toArray(new String[items.size()]);
}
}
public void registerSelectionListener(final ReactEditText view) {
view.setCustomSelectionActionModeCallback(new Callback() {
@Override
public boolean onPrepareActionMode(ActionMode mode, Menu menu) {
menu.clear();
for (int i = 0; i < _menuItems.length; i++) {
menu.add(0, i, 0, _menuItems[i]);
}
return true;
}
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
return true;
}
@Override
public void onDestroyActionMode(ActionMode mode) {
}
@Override
public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
int selectionStart = view.getSelectionStart();
int selectionEnd = view.getSelectionEnd();
String selectedText = view.getText().toString().substring(selectionStart, selectionEnd);
// Dispatch event
onSelectNativeEvent(view, item.getItemId(), selectedText, selectionStart, selectionEnd);
mode.finish();
return true;
}
});
}
public void onSelectNativeEvent(ReactEditText view, int eventType, String content, int selectionStart, int selectionEnd) {
WritableMap event = Arguments.createMap();
event.putInt("eventType", eventType);
event.putString("content", content);
event.putInt("selectionStart", selectionStart);
event.putInt("selectionEnd", selectionEnd);
// Dispatch
ReactContext reactContext = (ReactContext) view.getContext();
reactContext.getJSModule(RCTEventEmitter.class).receiveEvent(view.getId(), "topSelection", event);
}
@Override
public Map getExportedCustomDirectEventTypeConstants() {
return MapBuilder.builder()
.put("topSelection", MapBuilder.of("registrationName","onSelection"))
.build();
}
}
@@ -0,0 +1,85 @@
package im.status.ethereum.module
import android.view.ActionMode
import android.view.Menu
import android.view.MenuItem
import com.facebook.react.bridge.Arguments
import com.facebook.react.bridge.ReactContext
import com.facebook.react.bridge.ReadableArray
import com.facebook.react.bridge.WritableMap
import com.facebook.react.common.MapBuilder
import com.facebook.react.uimanager.ThemedReactContext
import com.facebook.react.uimanager.annotations.ReactProp
import com.facebook.react.uimanager.events.RCTEventEmitter
import com.facebook.react.views.textinput.ReactEditText
import com.facebook.react.views.view.ReactViewGroup
import com.facebook.react.views.view.ReactViewManager
class RNSelectableTextInputViewManager : ReactViewManager() {
companion object {
const val REACT_CLASS = "RNSelectableTextInput"
}
private var _menuItems = arrayOf<String>()
override fun getName(): String {
return REACT_CLASS
}
override fun createViewInstance(context: ThemedReactContext): ReactViewGroup {
return ReactViewGroup(context)
}
@ReactProp(name = "menuItems")
fun setMenuItems(reactViewGroup: ReactViewGroup, items: ReadableArray?) {
_menuItems = items?.let {
Array(items.size()) { i -> items.getString(i) }
} ?: arrayOf()
}
fun registerSelectionListener(view: ReactEditText) {
view.customSelectionActionModeCallback = object : ActionMode.Callback {
override fun onPrepareActionMode(mode: ActionMode, menu: Menu): Boolean {
menu.clear()
_menuItems.forEachIndexed { i, item ->
menu.add(0, i, 0, item)
}
return true
}
override fun onCreateActionMode(mode: ActionMode, menu: Menu): Boolean {
return true
}
override fun onDestroyActionMode(mode: ActionMode) {}
override fun onActionItemClicked(mode: ActionMode, item: MenuItem): Boolean {
val selectionStart = view.selectionStart
val selectionEnd = view.selectionEnd
val selectedText = view.text.toString().substring(selectionStart, selectionEnd)
onSelectNativeEvent(view, item.itemId, selectedText, selectionStart, selectionEnd)
mode.finish()
return true
}
}
}
private fun onSelectNativeEvent(view: ReactEditText, eventType: Int, content: String, selectionStart: Int, selectionEnd: Int) {
val event: WritableMap = Arguments.createMap().apply {
putInt("eventType", eventType)
putString("content", content)
putInt("selectionStart", selectionStart)
putInt("selectionEnd", selectionEnd)
}
val reactContext = view.context as ReactContext
reactContext.getJSModule(RCTEventEmitter::class.java).receiveEvent(view.id, "topSelection", event)
}
override fun getExportedCustomDirectEventTypeConstants(): Map<String, Any>? {
return MapBuilder.builder<String, Any>()
.put("topSelection", MapBuilder.of("registrationName", "onSelection"))
.build()
}
}
@@ -30,6 +30,13 @@ public class StatusPackage implements ReactPackage {
List<NativeModule> modules = new ArrayList<>();
modules.add(new StatusModule(reactContext, this.rootedDevice));
modules.add(new AccountManager(reactContext));
modules.add(new EncryptionUtils(reactContext));
modules.add(new DatabaseManager(reactContext));
modules.add(new UIHelper(reactContext));
modules.add(new LogManager(reactContext));
modules.add(new Utils(reactContext));
modules.add(new NetworkManager(reactContext));
modules.add(new RNSelectableTextInputModule(reactContext));
return modules;
@@ -1,44 +0,0 @@
package im.status.ethereum.module;
import java.util.concurrent.*;
/** Uses an unbounded queue, but allows timeout of core threads
* (modified case 2 in
* https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadPoolExecutor.html ) */
public class StatusThreadPoolExecutor {
private static final int NUMBER_OF_CORES =
Runtime.getRuntime().availableProcessors();
private static final int THREADS_TO_CORES_RATIO = 100;
private static final int KEEP_ALIVE_TIME = 1;
private static final TimeUnit KEEP_ALIVE_TIME_UNIT = TimeUnit.SECONDS;
private final BlockingQueue<Runnable> mQueue;
private final ThreadPoolExecutor mThreadPool;
private StatusThreadPoolExecutor() {
mQueue = new LinkedBlockingQueue<>();
mThreadPool = new ThreadPoolExecutor(
THREADS_TO_CORES_RATIO * NUMBER_OF_CORES,
THREADS_TO_CORES_RATIO * NUMBER_OF_CORES,
KEEP_ALIVE_TIME,
KEEP_ALIVE_TIME_UNIT,
mQueue);
// Allow pool to drain
mThreadPool.allowCoreThreadTimeOut(true);
}
/** Pugh singleton */
private static class Holder {
private static StatusThreadPoolExecutor instance = new StatusThreadPoolExecutor();
}
public static StatusThreadPoolExecutor getInstance() {
return Holder.instance;
}
public void execute(final Runnable r) {
mThreadPool.execute(r);
}
}
@@ -0,0 +1,47 @@
package im.status.ethereum.module
import java.util.concurrent.*
/**
* Uses an unbounded queue but allows timeout of core threads
* (modified case 2 in
* https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadPoolExecutor.html )
*/
class StatusThreadPoolExecutor private constructor() {
private val NUMBER_OF_CORES: Int = Runtime.getRuntime().availableProcessors()
private val THREADS_TO_CORES_RATIO: Int = 100
private val KEEP_ALIVE_TIME: Int = 1
private val KEEP_ALIVE_TIME_UNIT: TimeUnit = TimeUnit.SECONDS
private val mQueue: BlockingQueue<Runnable> = LinkedBlockingQueue()
private val mThreadPool: ThreadPoolExecutor
init {
mThreadPool = ThreadPoolExecutor(
THREADS_TO_CORES_RATIO * NUMBER_OF_CORES,
THREADS_TO_CORES_RATIO * NUMBER_OF_CORES,
KEEP_ALIVE_TIME.toLong(),
KEEP_ALIVE_TIME_UNIT,
mQueue
)
// Allow pool to drain
mThreadPool.allowCoreThreadTimeOut(true)
}
/** Singleton holder */
private object Holder {
val instance = StatusThreadPoolExecutor()
}
companion object {
@JvmStatic
fun getInstance(): StatusThreadPoolExecutor {
return Holder.instance
}
}
fun execute(r: Runnable) {
mThreadPool.execute(r)
}
}
@@ -0,0 +1,124 @@
package im.status.ethereum.module;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import android.app.Activity;
import android.util.Log;
import android.os.Build;
import android.webkit.WebView;
import android.webkit.CookieManager;
import android.webkit.CookieSyncManager;
import android.webkit.WebStorage;
import android.view.WindowManager;
import com.facebook.react.uimanager.UIManagerModule;
import com.facebook.react.uimanager.UIBlock;
import com.facebook.react.uimanager.NativeViewHierarchyManager;
import android.view.inputmethod.InputMethodManager;
import android.view.View;
import android.widget.EditText;
import android.content.Context;
public class UIHelper extends ReactContextBaseJavaModule {
private static final String TAG = "UIHelper";
private ReactApplicationContext reactContext;
public UIHelper(ReactApplicationContext reactContext) {
super(reactContext);
this.reactContext = reactContext;
}
@Override
public String getName() {
return "UIHelper";
}
@ReactMethod
public void setSoftInputMode(final int mode) {
Log.d(TAG, "setSoftInputMode");
final Activity activity = getCurrentActivity();
if (activity == null) {
return;
}
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
activity.getWindow().setSoftInputMode(mode);
}
});
}
@SuppressWarnings("deprecation")
@ReactMethod
public void clearCookies() {
Log.d(TAG, "clearCookies");
final Activity activity = getCurrentActivity();
if (activity == null) {
return;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP_MR1) {
CookieManager.getInstance().removeAllCookies(null);
CookieManager.getInstance().flush();
} else {
CookieSyncManager cookieSyncManager = CookieSyncManager.createInstance(activity);
cookieSyncManager.startSync();
CookieManager cookieManager = CookieManager.getInstance();
cookieManager.removeAllCookie();
cookieManager.removeSessionCookie();
cookieSyncManager.stopSync();
cookieSyncManager.sync();
}
}
@ReactMethod
public void toggleWebviewDebug(final boolean val) {
Log.d(TAG, "toggleWebviewDebug");
final Activity activity = getCurrentActivity();
if (activity == null) {
return;
}
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
WebView.setWebContentsDebuggingEnabled(val);
}
});
}
@ReactMethod
public void clearStorageAPIs() {
Log.d(TAG, "clearStorageAPIs");
final Activity activity = getCurrentActivity();
if (activity == null) {
return;
}
WebStorage storage = WebStorage.getInstance();
if (storage != null) {
storage.deleteAllData();
}
}
@ReactMethod
public void resetKeyboardInputCursor(final int reactTagToReset, final int selection) {
UIManagerModule uiManager = getReactApplicationContext().getNativeModule(UIManagerModule.class);
uiManager.addUIBlock(new UIBlock() {
@Override
public void execute(NativeViewHierarchyManager nativeViewHierarchyManager) {
InputMethodManager imm = (InputMethodManager) getReactApplicationContext().getBaseContext().getSystemService(Context.INPUT_METHOD_SERVICE);
if (imm != null) {
View viewToReset = nativeViewHierarchyManager.resolveView(reactTagToReset);
imm.restartInput(viewToReset);
try {
EditText textView = (EditText) viewToReset;
textView.setSelection(selection);
} catch (Exception e) {}
}
}
});
}
}
@@ -0,0 +1,155 @@
package im.status.ethereum.module;
import com.facebook.react.bridge.Callback;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import android.util.Log;
import java.util.function.Supplier;
import java.io.File;
import android.content.Context;
import android.os.Environment;
import org.json.JSONObject;
import org.json.JSONException;
import statusgo.Statusgo;
public class Utils extends ReactContextBaseJavaModule {
private static final String gethLogFileName = "geth.log";
private static final String TAG = "Utils";
private ReactApplicationContext reactContext;
public Utils(ReactApplicationContext reactContext) {
super(reactContext);
this.reactContext = reactContext;
}
@Override
public String getName() {
return "Utils";
}
public String getNoBackupDirectory() {
return this.getReactApplicationContext().getNoBackupFilesDir().getAbsolutePath();
}
@ReactMethod(isBlockingSynchronousMethod = true)
public String backupDisabledDataDir() {
return getNoBackupDirectory();
}
public File getPublicStorageDirectory() {
final Context context = this.getReactApplicationContext();
// Environment.getExternalStoragePublicDirectory doesn't work as expected on Android Q
// https://developer.android.com/reference/android/os/Environment#getExternalStoragePublicDirectory(java.lang.String)
return context.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS);
}
public File getLogsFile() {
final File pubDirectory = getPublicStorageDirectory();
final File logFile = new File(pubDirectory, gethLogFileName);
return logFile;
}
public String getKeyUID(final String json) throws JSONException {
final JSONObject jsonObj = new JSONObject(json);
return jsonObj.getString("key-uid");
}
public String pathCombine(final String path1, final String path2) {
// Replace this logic with Paths.get(path1, path2) once API level 26+ becomes the minimum supported API level
final File file = new File(path1, path2);
return file.getAbsolutePath();
}
public String getKeyStorePath(String keyUID) {
final String commonKeydir = pathCombine(getNoBackupDirectory(), "/keystore");
final String keydir = pathCombine(commonKeydir, keyUID);
return keydir;
}
@ReactMethod(isBlockingSynchronousMethod = true)
public String keystoreDir() {
final String absRootDirPath = getNoBackupDirectory();
return pathCombine(absRootDirPath, "keystore");
}
public void migrateKeyStoreDir(final String accountData, final String password) {
try {
final String commonKeydir = pathCombine(getNoBackupDirectory(), "/keystore");
final String keydir = getKeyStorePath(getKeyUID(accountData));
Log.d(TAG, "before migrateKeyStoreDir " + keydir);
File keydirFile = new File(keydir);
if(!keydirFile.exists() || keydirFile.list().length == 0) {
Log.d(TAG, "migrateKeyStoreDir");
Statusgo.migrateKeyStoreDir(accountData, password, commonKeydir, keydir);
Statusgo.initKeystore(keydir);
}
} catch (JSONException e) {
Log.e(TAG, "JSON conversion failed: " + e.getMessage());
}
}
public boolean checkAvailability() {
// We wait at least 10s for getCurrentActivity to return a value,
// otherwise we give up
for (int attempts = 0; attempts < 100; attempts++) {
if (getCurrentActivity() != null) {
return true;
}
try {
Thread.sleep(100);
} catch (InterruptedException ex) {
if (getCurrentActivity() != null) {
return true;
}
Log.d(TAG, "Activity doesn't exist");
return false;
}
}
Log.d(TAG, "Activity doesn't exist");
return false;
}
public void executeRunnableStatusGoMethod(Supplier<String> method, Callback callback) throws JSONException {
if (!checkAvailability()) {
callback.invoke(false);
return;
}
Runnable runnableTask = () -> {
String res = method.get();
callback.invoke(res);
};
StatusThreadPoolExecutor.getInstance().execute(runnableTask);
}
@ReactMethod
public void validateMnemonic(final String seed, final Callback callback) throws JSONException {
executeRunnableStatusGoMethod(() -> Statusgo.validateMnemonic(seed), callback);
}
public Boolean is24Hour() {
return android.text.format.DateFormat.is24HourFormat(this.reactContext.getApplicationContext());
}
@ReactMethod(isBlockingSynchronousMethod = true)
public String checkAddressChecksum(final String address) {
return Statusgo.checkAddressChecksum(address);
}
@ReactMethod(isBlockingSynchronousMethod = true)
public String isAddress(final String address) {
return Statusgo.isAddress(address);
}
@ReactMethod(isBlockingSynchronousMethod = true)
public String toChecksumAddress(final String address) {
return Statusgo.toChecksumAddress(address);
}
}
@@ -1,23 +0,0 @@
package android.util;
public class Log {
public static int d(String tag, String msg) {
System.out.println("DEBUG: " + tag + ": " + msg);
return 0;
}
public static int i(String tag, String msg) {
System.out.println("INFO: " + tag + ": " + msg);
return 0;
}
public static int w(String tag, String msg) {
System.out.println("WARN: " + tag + ": " + msg);
return 0;
}
public static int e(String tag, String msg) {
System.out.println("ERROR: " + tag + ": " + msg);
return 0;
}
}
@@ -0,0 +1,27 @@
package android.util
object Log {
@JvmStatic
fun d(tag: String, msg: String): Int {
println("DEBUG: $tag: $msg")
return 0
}
@JvmStatic
fun i(tag: String, msg: String): Int {
println("INFO: $tag: $msg")
return 0
}
@JvmStatic
fun w(tag: String, msg: String): Int {
println("WARN: $tag: $msg")
return 0
}
@JvmStatic
fun e(tag: String, msg: String): Int {
println("ERROR: $tag: $msg")
return 0
}
}
@@ -0,0 +1,9 @@
#import <sys/utsname.h>
#import <Foundation/Foundation.h>
#import <React/RCTBridgeModule.h>
#import "Statusgo.h"
#import "RCTLog.h"
@interface AccountManager : NSObject <RCTBridgeModule>
@end
@@ -0,0 +1,217 @@
#import "AccountManager.h"
#import "React/RCTBridge.h"
#import "React/RCTEventDispatcher.h"
#import "Statusgo.h"
#import "Utils.h"
@implementation AccountManager
RCT_EXPORT_MODULE();
RCT_EXPORT_METHOD(createAccountAndLogin:(NSString *)request) {
#if DEBUG
NSLog(@"createAccountAndLogin() method called");
#endif
StatusgoCreateAccountAndLogin(request);
}
RCT_EXPORT_METHOD(restoreAccountAndLogin:(NSString *)request) {
#if DEBUG
NSLog(@"restoreAccountAndLogin() method called");
#endif
StatusgoRestoreAccountAndLogin(request);
}
-(NSString *) prepareDirAndUpdateConfig:(NSString *)config
withKeyUID:(NSString *)keyUID {
NSFileManager *fileManager = [NSFileManager defaultManager];
NSError *error = nil;
NSURL *rootUrl =[[fileManager
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
lastObject];
NSURL *absTestnetFolderName = [rootUrl URLByAppendingPathComponent:@"ethereum/testnet"];
if (![fileManager fileExistsAtPath:absTestnetFolderName.path])
[fileManager createDirectoryAtPath:absTestnetFolderName.path withIntermediateDirectories:YES attributes:nil error:&error];
NSURL *flagFolderUrl = [rootUrl URLByAppendingPathComponent:@"ropsten_flag"];
if(![fileManager fileExistsAtPath:flagFolderUrl.path]){
NSLog(@"remove lightchaindata");
NSURL *absLightChainDataUrl = [absTestnetFolderName URLByAppendingPathComponent:@"StatusIM/lightchaindata"];
if([fileManager fileExistsAtPath:absLightChainDataUrl.path]) {
[fileManager removeItemAtPath:absLightChainDataUrl.path
error:nil];
}
[fileManager createDirectoryAtPath:flagFolderUrl.path
withIntermediateDirectories:NO
attributes:nil
error:&error];
}
NSLog(@"after remove lightchaindata");
NSString *keystore = @"keystore";
NSURL *absTestnetKeystoreUrl = [absTestnetFolderName URLByAppendingPathComponent:keystore];
NSURL *absKeystoreUrl = [rootUrl URLByAppendingPathComponent:keystore];
if([fileManager fileExistsAtPath:absTestnetKeystoreUrl.path]){
NSLog(@"copy keystore");
[fileManager copyItemAtPath:absTestnetKeystoreUrl.path toPath:absKeystoreUrl.path error:nil];
[fileManager removeItemAtPath:absTestnetKeystoreUrl.path error:nil];
}
NSLog(@"after lightChainData");
NSLog(@"preconfig: %@", config);
NSData *configData = [config dataUsingEncoding:NSUTF8StringEncoding];
NSDictionary *configJSON = [NSJSONSerialization JSONObjectWithData:configData options:NSJSONReadingMutableContainers error:nil];
NSString *relativeDataDir = [configJSON objectForKey:@"DataDir"];
NSString *absDataDir = [rootUrl.path stringByAppendingString:relativeDataDir];
NSURL *absDataDirUrl = [NSURL fileURLWithPath:absDataDir];
NSString *keystoreDir = [@"/keystore/" stringByAppendingString:keyUID];
[configJSON setValue:keystoreDir forKey:@"KeyStoreDir"];
[configJSON setValue:@"" forKey:@"LogDir"];
[configJSON setValue:@"geth.log" forKey:@"LogFile"];
NSString *resultingConfig = [Utils jsonStringWithPrettyPrint:NO fromDictionary:configJSON];
NSLog(@"node config %@", resultingConfig);
if(![fileManager fileExistsAtPath:absDataDir]) {
[fileManager createDirectoryAtPath:absDataDir
withIntermediateDirectories:YES attributes:nil error:nil];
}
NSLog(@"logUrlPath %@ rootDir %@", @"geth.log", rootUrl.path);
NSURL *absLogUrl = [absDataDirUrl URLByAppendingPathComponent:@"geth.log"];
if(![fileManager fileExistsAtPath:absLogUrl.path]) {
NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
[dict setObject:[NSNumber numberWithInt:511] forKey:NSFilePosixPermissions];
[fileManager createFileAtPath:absLogUrl.path contents:nil attributes:dict];
}
return resultingConfig;
}
RCT_EXPORT_METHOD(deleteMultiaccount:(NSString *)keyUID
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"DeleteMultiaccount() method called");
#endif
NSURL *multiaccountKeystoreDir = [Utils getKeyStoreDirForKeyUID:keyUID];
NSString *result = StatusgoDeleteMultiaccount(keyUID, multiaccountKeystoreDir.path);
callback(@[result]);
}
RCT_EXPORT_METHOD(prepareDirAndUpdateConfig:(NSString *)keyUID
config:(NSString *)config
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"PrepareDirAndUpdateConfig() method called");
#endif
NSString *updatedConfig = [self prepareDirAndUpdateConfig:config
withKeyUID:keyUID];
callback(@[updatedConfig]);
}
RCT_EXPORT_METHOD(saveAccountAndLoginWithKeycard:(NSString *)multiaccountData
password:(NSString *)password
settings:(NSString *)settings
config:(NSString *)config
accountsData:(NSString *)accountsData
chatKey:(NSString *)chatKey) {
#if DEBUG
NSLog(@"SaveAccountAndLoginWithKeycard() method called");
#endif
[Utils getExportDbFilePath];
NSString *keyUID = [Utils getKeyUID:multiaccountData];
NSString *finalConfig = [self prepareDirAndUpdateConfig:config
withKeyUID:keyUID];
NSString *result = StatusgoSaveAccountAndLoginWithKeycard(multiaccountData, password, settings, finalConfig, accountsData, chatKey);
NSLog(@"%@", result);
}
RCT_EXPORT_METHOD(loginWithKeycard:(NSString *)accountData
password:(NSString *)password
chatKey:(NSString *)chatKey
nodeConfigJSON:(NSString *)nodeConfigJSON) {
#if DEBUG
NSLog(@"LoginWithKeycard() method called");
#endif
[Utils getExportDbFilePath];
[Utils migrateKeystore:accountData password:password];
NSString *result = StatusgoLoginWithKeycard(accountData, password, chatKey, nodeConfigJSON);
NSLog(@"%@", result);
}
RCT_EXPORT_METHOD(loginWithConfig:(NSString *)accountData
password:(NSString *)password
configJSON:(NSString *)configJSON) {
#if DEBUG
NSLog(@"LoginWithConfig() method called");
#endif
[Utils getExportDbFilePath];
[Utils migrateKeystore:accountData password:password];
NSString *result = StatusgoLoginWithConfig(accountData, password, configJSON);
NSLog(@"%@", result);
}
RCT_EXPORT_METHOD(loginAccount:(NSString *)request) {
#if DEBUG
NSLog(@"LoginAccount() method called");
#endif
NSString *result = StatusgoLoginAccount(request);
NSLog(@"%@", result);
}
RCT_EXPORT_METHOD(verify:(NSString *)address
password:(NSString *)password
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"VerifyAccountPassword() method called");
#endif
NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *rootUrl =[[fileManager
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
lastObject];
NSURL *absKeystoreUrl = [rootUrl URLByAppendingPathComponent:@"keystore"];
NSString *result = StatusgoVerifyAccountPassword(absKeystoreUrl.path, address, password);
callback(@[result]);
}
RCT_EXPORT_METHOD(verifyDatabasePassword:(NSString *)keyUID
password:(NSString *)password
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"VerifyDatabasePassword() method called");
#endif
NSString *result = StatusgoVerifyDatabasePassword(keyUID, password);
callback(@[result]);
}
RCT_EXPORT_METHOD(openAccounts:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"OpenAccounts() method called");
#endif
NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *rootUrl =[[fileManager
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
lastObject];
NSString *result = StatusgoOpenAccounts(rootUrl.path);
callback(@[result]);
}
RCT_EXPORT_METHOD(logout) {
#if DEBUG
NSLog(@"Logout() method called");
#endif
NSString *result = StatusgoLogout();
NSLog(@"%@", result);
}
@end
@@ -0,0 +1,9 @@
#import <sys/utsname.h>
#import <Foundation/Foundation.h>
#import <React/RCTBridgeModule.h>
#import "Statusgo.h"
#import "RCTLog.h"
@interface DatabaseManager : NSObject <RCTBridgeModule>
@end
@@ -0,0 +1,33 @@
#import "DatabaseManager.h"
#import "React/RCTBridge.h"
#import "React/RCTEventDispatcher.h"
#import "Statusgo.h"
#import "Utils.h"
@implementation DatabaseManager
RCT_EXPORT_MODULE();
RCT_EXPORT_METHOD(exportUnencryptedDatabase:(NSString *)accountData
password:(NSString *)password
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"exportUnencryptedDatabase() method called");
#endif
NSString *filePath = [Utils getExportDbFilePath];
StatusgoExportUnencryptedDatabase(accountData, password, filePath);
callback(@[filePath]);
}
RCT_EXPORT_METHOD(importUnencryptedDatabase:(NSString *)accountData
password:(NSString *)password) {
#if DEBUG
NSLog(@"importUnencryptedDatabase() method called");
#endif
"";
}
@end
@@ -0,0 +1,9 @@
#import <sys/utsname.h>
#import <Foundation/Foundation.h>
#import <React/RCTBridgeModule.h>
#import "Statusgo.h"
#import "RCTLog.h"
@interface EncryptionUtils : NSObject <RCTBridgeModule>
@end
@@ -0,0 +1,200 @@
#import "EncryptionUtils.h"
#import "React/RCTBridge.h"
#import "React/RCTEventDispatcher.h"
#import "Statusgo.h"
#import "Utils.h"
@implementation EncryptionUtils
RCT_EXPORT_MODULE();
#pragma mark - InitKeystore method
RCT_EXPORT_METHOD(initKeystore:(NSString *)keyUID
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"initKeystore() method called");
#endif
NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *rootUrl =[[fileManager
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
lastObject];
NSURL *commonKeystoreDir = [rootUrl URLByAppendingPathComponent:@"keystore"];
NSURL *keystoreDir = [commonKeystoreDir URLByAppendingPathComponent:keyUID];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0),
^(void)
{
NSString *res = StatusgoInitKeystore(keystoreDir.path);
NSLog(@"InitKeyStore result %@", res);
callback(@[]);
});
}
RCT_EXPORT_METHOD(reEncryptDbAndKeystore:(NSString *)keyUID
currentPassword:(NSString *)currentPassword
newPassword:(NSString *)newPassword
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"reEncryptDbAndKeystore() method called");
#endif
// changes password and re-encrypts keystore
NSString *result = StatusgoChangeDatabasePassword(keyUID, currentPassword, newPassword);
callback(@[result]);
}
RCT_EXPORT_METHOD(convertToKeycardAccount:(NSString *)keyUID
accountData:(NSString *)accountData
settings:(NSString *)settings
keycardUID:(NSString *)keycardUID
currentPassword:(NSString *)currentPassword
newPassword:(NSString *)newPassword
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"convertToKeycardAccount() method called");
#endif
NSURL *multiaccountKeystoreDir = [Utils getKeyStoreDirForKeyUID:keyUID];
StatusgoInitKeystore(multiaccountKeystoreDir.path);
NSString *result = StatusgoConvertToKeycardAccount(accountData, settings, keycardUID, currentPassword, newPassword);
callback(@[result]);
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(encodeTransfer:(NSString *)to
value:(NSString *)value) {
return StatusgoEncodeTransfer(to,value);
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(encodeFunctionCall:(NSString *)method
paramsJSON:(NSString *)paramsJSON) {
return StatusgoEncodeFunctionCall(method,paramsJSON);
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(decodeParameters:(NSString *)decodeParamJSON) {
return StatusgoDecodeParameters(decodeParamJSON);
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(hexToNumber:(NSString *)hex) {
return StatusgoHexToNumber(hex);
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(numberToHex:(NSString *)numString) {
return StatusgoNumberToHex(numString);
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(sha3:(NSString *)str) {
return StatusgoSha3(str);
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(utf8ToHex:(NSString *)str) {
return StatusgoUtf8ToHex(str);
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(hexToUtf8:(NSString *)str) {
return StatusgoHexToUtf8(str);
}
RCT_EXPORT_METHOD(setBlankPreviewFlag:(BOOL *)newValue)
{
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
[userDefaults setBool:newValue forKey:@"BLANK_PREVIEW"];
[userDefaults synchronize];
}
RCT_EXPORT_METHOD(hashTransaction:(NSString *)txArgsJSON
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"HashTransaction() method called");
#endif
NSString *result = StatusgoHashTransaction(txArgsJSON);
callback(@[result]);
}
RCT_EXPORT_METHOD(hashMessage:(NSString *)message
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"hashMessage() method called");
#endif
NSString *result = StatusgoHashMessage(message);
callback(@[result]);
}
RCT_EXPORT_METHOD(localPairingPreflightOutboundCheck:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"LocalPairingPreflightOutboundCheck() method called");
#endif
NSString *result = StatusgoLocalPairingPreflightOutboundCheck();
callback(@[result]);
}
RCT_EXPORT_METHOD(multiformatDeserializePublicKey:(NSString *)multiCodecKey
base58btc:(NSString *)base58btc
callback:(RCTResponseSenderBlock)callback) {
NSString *result = StatusgoMultiformatDeserializePublicKey(multiCodecKey,base58btc);
callback(@[result]);
}
RCT_EXPORT_METHOD(deserializeAndCompressKey:(NSString *)desktopKey
callback:(RCTResponseSenderBlock)callback) {
NSString *result = StatusgoDeserializeAndCompressKey(desktopKey);
callback(@[result]);
}
RCT_EXPORT_METHOD(hashTypedData:(NSString *)data
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"hashTypedData() method called");
#endif
NSString *result = StatusgoHashTypedData(data);
callback(@[result]);
}
RCT_EXPORT_METHOD(hashTypedDataV4:(NSString *)data
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"hashTypedDataV4() method called");
#endif
NSString *result = StatusgoHashTypedDataV4(data);
callback(@[result]);
}
#pragma mark - SignMessage
RCT_EXPORT_METHOD(signMessage:(NSString *)message
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"SignMessage() method called");
#endif
NSString *result = StatusgoSignMessage(message);
callback(@[result]);
}
#pragma mark - SignTypedData
RCT_EXPORT_METHOD(signTypedData:(NSString *)data
account:(NSString *)account
password:(NSString *)password
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"SignTypedData() method called");
#endif
NSString *result = StatusgoSignTypedData(data, account, password);
callback(@[result]);
}
#pragma mark - SignTypedDataV4
RCT_EXPORT_METHOD(signTypedDataV4:(NSString *)data
account:(NSString *)account
password:(NSString *)password
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"SignTypedDataV4() method called");
#endif
NSString *result = StatusgoSignTypedDataV4(data, account, password);
callback(@[result]);
}
@end
@@ -0,0 +1,9 @@
#import <sys/utsname.h>
#import <Foundation/Foundation.h>
#import <React/RCTBridgeModule.h>
#import "Statusgo.h"
#import "RCTLog.h"
@interface LogManager : NSObject <RCTBridgeModule>
@end
@@ -0,0 +1,115 @@
#import "LogManager.h"
#import "React/RCTBridge.h"
#import "React/RCTEventDispatcher.h"
#import "Statusgo.h"
#import "Utils.h"
#import "SSZipArchive.h"
@implementation LogManager
RCT_EXPORT_MODULE();
#pragma mark - SendLogs method
RCT_EXPORT_METHOD(sendLogs:(NSString *)dbJson
jsLogs:(NSString *)jsLogs
callback:(RCTResponseSenderBlock)callback) {
// TODO: Implement SendLogs for iOS
#if DEBUG
NSLog(@"SendLogs() method called, not implemented");
#endif
NSFileManager *fileManager = [NSFileManager defaultManager];
NSError *error = nil;
NSURL *rootUrl =[[fileManager
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
lastObject];
NSURL *zipFile = [rootUrl URLByAppendingPathComponent:@"logs.zip"];
[fileManager removeItemAtPath:zipFile.path error:nil];
NSURL *logsFolderName = [rootUrl URLByAppendingPathComponent:@"logs"];
if (![fileManager fileExistsAtPath:logsFolderName.path])
[fileManager createDirectoryAtPath:logsFolderName.path withIntermediateDirectories:YES attributes:nil error:&error];
NSURL *dbFile = [logsFolderName URLByAppendingPathComponent:@"db.json"];
NSURL *jsLogsFile = [logsFolderName URLByAppendingPathComponent:@"Status.log"];
#if DEBUG
NSString *networkDirPath = @"ethereum/mainnet_rpc_dev";
#else
NSString *networkDirPath = @"ethereum/mainnet_rpc";
#endif
#if DEBUG
NSString *goerliNetworkDirPath = @"ethereum/goerli_rpc_dev";
#else
NSString *goerliNetworkDirPath = @"ethereum/goerli_rpc";
#endif
NSURL *networkDir = [rootUrl URLByAppendingPathComponent:networkDirPath];
NSURL *originalGethLogsFile = [networkDir URLByAppendingPathComponent:@"geth.log"];
NSURL *gethLogsFile = [logsFolderName URLByAppendingPathComponent:@"mainnet_geth.log"];
NSURL *goerliNetworkDir = [rootUrl URLByAppendingPathComponent:goerliNetworkDirPath];
NSURL *goerliGethLogsFile = [goerliNetworkDir URLByAppendingPathComponent:@"geth.log"];
NSURL *goerliLogsFile = [logsFolderName URLByAppendingPathComponent:@"goerli_geth.log"];
NSURL *mainGethLogsFile = [rootUrl URLByAppendingPathComponent:@"geth.log"];
NSURL *mainLogsFile = [logsFolderName URLByAppendingPathComponent:@"geth.log"];
[dbJson writeToFile:dbFile.path atomically:YES encoding:NSUTF8StringEncoding error:nil];
[jsLogs writeToFile:jsLogsFile.path atomically:YES encoding:NSUTF8StringEncoding error:nil];
//NSString* gethLogs = StatusgoExportNodeLogs();
//[gethLogs writeToFile:gethLogsFile.path atomically:YES encoding:NSUTF8StringEncoding error:nil];
[fileManager copyItemAtPath:originalGethLogsFile.path toPath:gethLogsFile.path error:nil];
[fileManager copyItemAtPath:goerliGethLogsFile.path toPath:goerliLogsFile.path error:nil];
[fileManager copyItemAtPath:mainGethLogsFile.path toPath:mainLogsFile.path error:nil];
[SSZipArchive createZipFileAtPath:zipFile.path withContentsOfDirectory:logsFolderName.path];
[fileManager removeItemAtPath:logsFolderName.path error:nil];
callback(@[zipFile.absoluteString]);
}
RCT_EXPORT_METHOD(initLogging:(BOOL)enabled
mobileSystem:(BOOL)mobileSystem
logLevel:(NSString *)logLevel
callback:(RCTResponseSenderBlock)callback)
{
NSString *logDirectory = [self logFileDirectory];
NSString *logFilePath = [logDirectory stringByAppendingPathComponent:@"geth.log"];
NSMutableDictionary *jsonConfig = [NSMutableDictionary dictionary];
jsonConfig[@"Enabled"] = @(enabled);
jsonConfig[@"MobileSystem"] = @(mobileSystem);
jsonConfig[@"Level"] = logLevel;
jsonConfig[@"File"] = logFilePath;
NSError *error = nil;
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:jsonConfig options:0 error:&error];
if (error) {
// Handle JSON serialization error
callback(@[error.localizedDescription]);
return;
}
NSString *config = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
// Call your native logging initialization method here
NSString *initResult = StatusgoInitLogging(config);
callback(@[initResult]);
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(logFileDirectory) {
NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *rootUrl =[[fileManager
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
lastObject];
return rootUrl.path;
}
@end
@@ -0,0 +1,9 @@
#import <sys/utsname.h>
#import <Foundation/Foundation.h>
#import <React/RCTBridgeModule.h>
#import "Statusgo.h"
#import "RCTLog.h"
@interface NetworkManager : NSObject <RCTBridgeModule>
@end
@@ -0,0 +1,109 @@
#import "NetworkManager.h"
#import "React/RCTBridge.h"
#import "React/RCTEventDispatcher.h"
#import "Statusgo.h"
#import "Utils.h"
@implementation NetworkManager
RCT_EXPORT_MODULE();
RCT_EXPORT_METHOD(startSearchForLocalPairingPeers:(RCTResponseSenderBlock)callback) {
NSString *result = StatusgoStartSearchForLocalPairingPeers();
callback(@[result]);
}
RCT_EXPORT_METHOD(getConnectionStringForBootstrappingAnotherDevice:(NSString *)configJSON
callback:(RCTResponseSenderBlock)callback) {
NSData *configData = [configJSON dataUsingEncoding:NSUTF8StringEncoding];
NSError *error;
NSMutableDictionary *configDict = [NSJSONSerialization JSONObjectWithData:configData options:NSJSONReadingMutableContainers error:&error];
NSMutableDictionary *senderConfig = configDict[@"senderConfig"];
NSString *keyUID = senderConfig[@"keyUID"];
NSURL *multiaccountKeystoreDir = [Utils getKeyStoreDirForKeyUID:keyUID];
NSString *keystoreDir = multiaccountKeystoreDir.path;
[senderConfig setValue:keystoreDir forKey:@"keystorePath"];
NSString *modifiedConfigJSON = [Utils jsonStringWithPrettyPrint:NO fromDictionary:configDict];
NSString *result = StatusgoGetConnectionStringForBootstrappingAnotherDevice(modifiedConfigJSON);
callback(@[result]);
}
RCT_EXPORT_METHOD(inputConnectionStringForBootstrapping:(NSString *)cs
configJSON:(NSString *)configJSON
callback:(RCTResponseSenderBlock)callback) {
NSData *configData = [configJSON dataUsingEncoding:NSUTF8StringEncoding];
NSError *error;
NSMutableDictionary *configDict = [NSJSONSerialization JSONObjectWithData:configData options:NSJSONReadingMutableContainers error:&error];
NSMutableDictionary *receiverConfig = configDict[@"receiverConfig"];
NSMutableDictionary *nodeConfig = receiverConfig[@"nodeConfig"];
NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *rootUrl =[[fileManager URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask] lastObject];
NSURL *multiaccountKeystoreDir = [rootUrl URLByAppendingPathComponent:@"keystore"];
NSString *keystoreDir = multiaccountKeystoreDir.path;
NSString *rootDataDir = rootUrl.path;
[receiverConfig setValue:keystoreDir forKey:@"keystorePath"];
[nodeConfig setValue:rootDataDir forKey:@"rootDataDir"];
NSString *modifiedConfigJSON = [Utils jsonStringWithPrettyPrint:NO fromDictionary:configDict];
NSString *result = StatusgoInputConnectionStringForBootstrapping(cs, modifiedConfigJSON);
callback(@[result]);
}
RCT_EXPORT_METHOD(sendTransactionWithSignature:(NSString *)txArgsJSON
signature:(NSString *)signature
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"sendTransactionWithSignature() method called");
#endif
NSString *result = StatusgoSendTransactionWithSignature(txArgsJSON, signature);
callback(@[result]);
}
#pragma mark - SendTransaction
RCT_EXPORT_METHOD(sendTransaction:(NSString *)txArgsJSON
password:(NSString *)password
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"SendTransaction() method called");
#endif
NSString *result = StatusgoSendTransaction(txArgsJSON, password);
callback(@[result]);
}
RCT_EXPORT_METHOD(callRPC:(NSString *)payload
callback:(RCTResponseSenderBlock)callback) {
dispatch_async( dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSString *result = StatusgoCallRPC(payload);
dispatch_async(dispatch_get_main_queue(), ^{
callback(@[result]);
});
});
}
RCT_EXPORT_METHOD(callPrivateRPC:(NSString *)payload
callback:(RCTResponseSenderBlock)callback) {
dispatch_async( dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSString *result = StatusgoCallPrivateRPC(payload);
dispatch_async(dispatch_get_main_queue(), ^{
callback(@[result]);
});
});
}
#pragma mark - Recover
RCT_EXPORT_METHOD(recover:(NSString *)message
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"Recover() method called");
#endif
NSString *result = StatusgoRecover(message);
callback(@[result]);
}
@end
@@ -2,48 +2,8 @@
#import "React/RCTBridge.h"
#import "React/RCTEventDispatcher.h"
#import "Statusgo.h"
#import "SSZipArchive.h"
@interface NSDictionary (BVJSONString)
-(NSString*) bv_jsonStringWithPrettyPrint:(BOOL) prettyPrint;
@end
@implementation NSDictionary (BVJSONString)
-(NSString*) bv_jsonStringWithPrettyPrint:(BOOL) prettyPrint {
NSError *error;
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:self
options:(NSJSONWritingOptions) (prettyPrint ? NSJSONWritingPrettyPrinted : 0)
error:&error];
if (! jsonData) {
NSLog(@"bv_jsonStringWithPrettyPrint: error: %@", error.localizedDescription);
return @"{}";
} else {
return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
}
}
@end
@interface NSArray (BVJSONString)
- (NSString *)bv_jsonStringWithPrettyPrint:(BOOL)prettyPrint;
@end
@implementation NSArray (BVJSONString)
-(NSString*) bv_jsonStringWithPrettyPrint:(BOOL) prettyPrint {
NSError *error;
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:self
options:(NSJSONWritingOptions) (prettyPrint ? NSJSONWritingPrettyPrinted : 0)
error:&error];
if (! jsonData) {
NSLog(@"bv_jsonStringWithPrettyPrint: error: %@", error.localizedDescription);
return @"[]";
} else {
return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
}
}
@end
#import "Utils.h"
static RCTBridge *bridge;
@@ -96,7 +56,6 @@ RCT_EXPORT_METHOD(shouldMoveToInternalStorage:(RCTResponseSenderBlock)onResultCa
onResultCallback(@[[NSNull null]]);
}
#pragma mark - moveToInternalStorage
RCT_EXPORT_METHOD(moveToInternalStorage:(RCTResponseSenderBlock)onResultCallback) {
@@ -104,96 +63,6 @@ RCT_EXPORT_METHOD(moveToInternalStorage:(RCTResponseSenderBlock)onResultCallback
onResultCallback(@[[NSNull null]]);
}
#pragma mark - InitKeystore method
RCT_EXPORT_METHOD(initKeystore:(NSString *)keyUID
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"initKeystore() method called");
#endif
NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *rootUrl =[[fileManager
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
lastObject];
NSURL *commonKeystoreDir = [rootUrl URLByAppendingPathComponent:@"keystore"];
NSURL *keystoreDir = [commonKeystoreDir URLByAppendingPathComponent:keyUID];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0),
^(void)
{
NSString *res = StatusgoInitKeystore(keystoreDir.path);
NSLog(@"InitKeyStore result %@", res);
callback(@[]);
});
}
#pragma mark - SendLogs method
RCT_EXPORT_METHOD(sendLogs:(NSString *)dbJson
jsLogs:(NSString *)jsLogs
callback:(RCTResponseSenderBlock)callback) {
// TODO: Implement SendLogs for iOS
#if DEBUG
NSLog(@"SendLogs() method called, not implemented");
#endif
NSFileManager *fileManager = [NSFileManager defaultManager];
NSError *error = nil;
NSURL *rootUrl =[[fileManager
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
lastObject];
NSURL *zipFile = [rootUrl URLByAppendingPathComponent:@"logs.zip"];
[fileManager removeItemAtPath:zipFile.path error:nil];
NSURL *logsFolderName = [rootUrl URLByAppendingPathComponent:@"logs"];
if (![fileManager fileExistsAtPath:logsFolderName.path])
[fileManager createDirectoryAtPath:logsFolderName.path withIntermediateDirectories:YES attributes:nil error:&error];
NSURL *dbFile = [logsFolderName URLByAppendingPathComponent:@"db.json"];
NSURL *jsLogsFile = [logsFolderName URLByAppendingPathComponent:@"Status.log"];
#if DEBUG
NSString *networkDirPath = @"ethereum/mainnet_rpc_dev";
#else
NSString *networkDirPath = @"ethereum/mainnet_rpc";
#endif
#if DEBUG
NSString *goerliNetworkDirPath = @"ethereum/goerli_rpc_dev";
#else
NSString *goerliNetworkDirPath = @"ethereum/goerli_rpc";
#endif
NSURL *networkDir = [rootUrl URLByAppendingPathComponent:networkDirPath];
NSURL *originalGethLogsFile = [networkDir URLByAppendingPathComponent:@"geth.log"];
NSURL *gethLogsFile = [logsFolderName URLByAppendingPathComponent:@"mainnet_geth.log"];
NSURL *goerliNetworkDir = [rootUrl URLByAppendingPathComponent:goerliNetworkDirPath];
NSURL *goerliGethLogsFile = [goerliNetworkDir URLByAppendingPathComponent:@"geth.log"];
NSURL *goerliLogsFile = [logsFolderName URLByAppendingPathComponent:@"goerli_geth.log"];
NSURL *mainGethLogsFile = [rootUrl URLByAppendingPathComponent:@"geth.log"];
NSURL *mainLogsFile = [logsFolderName URLByAppendingPathComponent:@"geth.log"];
[dbJson writeToFile:dbFile.path atomically:YES encoding:NSUTF8StringEncoding error:nil];
[jsLogs writeToFile:jsLogsFile.path atomically:YES encoding:NSUTF8StringEncoding error:nil];
//NSString* gethLogs = StatusgoExportNodeLogs();
//[gethLogs writeToFile:gethLogsFile.path atomically:YES encoding:NSUTF8StringEncoding error:nil];
[fileManager copyItemAtPath:originalGethLogsFile.path toPath:gethLogsFile.path error:nil];
[fileManager copyItemAtPath:goerliGethLogsFile.path toPath:goerliLogsFile.path error:nil];
[fileManager copyItemAtPath:mainGethLogsFile.path toPath:mainLogsFile.path error:nil];
[SSZipArchive createZipFileAtPath:zipFile.path withContentsOfDirectory:logsFolderName.path];
[fileManager removeItemAtPath:logsFolderName.path error:nil];
callback(@[zipFile.absoluteString]);
}
RCT_EXPORT_METHOD(exportLogs:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"exportLogs() method called");
@@ -202,25 +71,6 @@ RCT_EXPORT_METHOD(exportLogs:(RCTResponseSenderBlock)callback) {
callback(@[result]);
}
RCT_EXPORT_METHOD(addPeer:(NSString *)enode
callback:(RCTResponseSenderBlock)callback) {
NSString *result = StatusgoAddPeer(enode);
callback(@[result]);
#if DEBUG
NSLog(@"AddPeer() method called");
#endif
}
RCT_EXPORT_METHOD(deleteMultiaccount:(NSString *)keyUID
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"DeleteMultiaccount() method called");
#endif
NSURL *multiaccountKeystoreDir = [self getKeyStoreDir:keyUID];
NSString *result = StatusgoDeleteMultiaccount(keyUID, multiaccountKeystoreDir.path);
callback(@[result]);
}
RCT_EXPORT_METHOD(deleteImportedKey:(NSString *)keyUID
address:(NSString *)address
password:(NSString *)password
@@ -228,7 +78,7 @@ RCT_EXPORT_METHOD(deleteImportedKey:(NSString *)keyUID
#if DEBUG
NSLog(@"DeleteImportedKey() method called");
#endif
NSURL *multiaccountKeystoreDir = [self getKeyStoreDir:keyUID];
NSURL *multiaccountKeystoreDir = [Utils getKeyStoreDirForKeyUID:keyUID];
NSString *result = StatusgoDeleteImportedKey(address, password, multiaccountKeystoreDir.path);
callback(@[result]);
}
@@ -260,14 +110,6 @@ RCT_EXPORT_METHOD(multiAccountLoadAccount:(NSString *)json
callback(@[result]);
}
RCT_EXPORT_METHOD(multiAccountReset:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"MultiAccountReset() method called");
#endif
NSString *result = StatusgoMultiAccountReset();
callback(@[result]);
}
RCT_EXPORT_METHOD(multiAccountStoreDerived:(NSString *)json
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
@@ -286,137 +128,6 @@ RCT_EXPORT_METHOD(multiAccountImportPrivateKey:(NSString *)json
callback(@[result]);
}
RCT_EXPORT_METHOD(hashTransaction:(NSString *)txArgsJSON
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"HashTransaction() method called");
#endif
NSString *result = StatusgoHashTransaction(txArgsJSON);
callback(@[result]);
}
RCT_EXPORT_METHOD(hashMessage:(NSString *)message
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"hashMessage() method called");
#endif
NSString *result = StatusgoHashMessage(message);
callback(@[result]);
}
RCT_EXPORT_METHOD(localPairingPreflightOutboundCheck:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"LocalPairingPreflightOutboundCheck() method called");
#endif
NSString *result = StatusgoLocalPairingPreflightOutboundCheck();
callback(@[result]);
}
RCT_EXPORT_METHOD(startSearchForLocalPairingPeers:(RCTResponseSenderBlock)callback) {
NSString *result = StatusgoStartSearchForLocalPairingPeers();
callback(@[result]);
}
RCT_EXPORT_METHOD(getConnectionStringForBootstrappingAnotherDevice:(NSString *)configJSON
callback:(RCTResponseSenderBlock)callback) {
NSData *configData = [configJSON dataUsingEncoding:NSUTF8StringEncoding];
NSError *error;
NSMutableDictionary *configDict = [NSJSONSerialization JSONObjectWithData:configData options:NSJSONReadingMutableContainers error:&error];
NSMutableDictionary *senderConfig = configDict[@"senderConfig"];
NSString *keyUID = senderConfig[@"keyUID"];
NSURL *multiaccountKeystoreDir = [self getKeyStoreDir:keyUID];
NSString *keystoreDir = multiaccountKeystoreDir.path;
[senderConfig setValue:keystoreDir forKey:@"keystorePath"];
NSString *modifiedConfigJSON = [configDict bv_jsonStringWithPrettyPrint:NO];
NSString *result = StatusgoGetConnectionStringForBootstrappingAnotherDevice(modifiedConfigJSON);
callback(@[result]);
}
RCT_EXPORT_METHOD(inputConnectionStringForBootstrapping:(NSString *)cs
configJSON:(NSString *)configJSON
callback:(RCTResponseSenderBlock)callback) {
NSData *configData = [configJSON dataUsingEncoding:NSUTF8StringEncoding];
NSError *error;
NSMutableDictionary *configDict = [NSJSONSerialization JSONObjectWithData:configData options:NSJSONReadingMutableContainers error:&error];
NSMutableDictionary *receiverConfig = configDict[@"receiverConfig"];
NSMutableDictionary *nodeConfig = receiverConfig[@"nodeConfig"];
NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *rootUrl =[[fileManager URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask] lastObject];
NSURL *multiaccountKeystoreDir = [rootUrl URLByAppendingPathComponent:@"keystore"];
NSString *keystoreDir = multiaccountKeystoreDir.path;
NSString *rootDataDir = rootUrl.path;
[receiverConfig setValue:keystoreDir forKey:@"keystorePath"];
[nodeConfig setValue:rootDataDir forKey:@"rootDataDir"];
NSString *modifiedConfigJSON = [configDict bv_jsonStringWithPrettyPrint:NO];
NSString *result = StatusgoInputConnectionStringForBootstrapping(cs, modifiedConfigJSON);
callback(@[result]);
}
RCT_EXPORT_METHOD(multiformatSerializePublicKey:(NSString *)multiCodecKey
base58btc:(NSString *)base58btc
callback:(RCTResponseSenderBlock)callback) {
NSString *result = StatusgoMultiformatSerializePublicKey(multiCodecKey,base58btc);
callback(@[result]);
}
RCT_EXPORT_METHOD(multiformatDeserializePublicKey:(NSString *)multiCodecKey
base58btc:(NSString *)base58btc
callback:(RCTResponseSenderBlock)callback) {
NSString *result = StatusgoMultiformatDeserializePublicKey(multiCodecKey,base58btc);
callback(@[result]);
}
RCT_EXPORT_METHOD(decompressPublicKey:(NSString *)multiCodecKey
callback:(RCTResponseSenderBlock)callback) {
NSString *result = StatusgoDecompressPublicKey(multiCodecKey);
callback(@[result]);
}
RCT_EXPORT_METHOD(compressPublicKey:(NSString *)multiCodecKey
callback:(RCTResponseSenderBlock)callback) {
NSString *result = StatusgoCompressPublicKey(multiCodecKey);
callback(@[result]);
}
RCT_EXPORT_METHOD(deserializeAndCompressKey:(NSString *)desktopKey
callback:(RCTResponseSenderBlock)callback) {
NSString *result = StatusgoDeserializeAndCompressKey(desktopKey);
callback(@[result]);
}
RCT_EXPORT_METHOD(hashTypedData:(NSString *)data
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"hashTypedData() method called");
#endif
NSString *result = StatusgoHashTypedData(data);
callback(@[result]);
}
RCT_EXPORT_METHOD(hashTypedDataV4:(NSString *)data
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"hashTypedDataV4() method called");
#endif
NSString *result = StatusgoHashTypedDataV4(data);
callback(@[result]);
}
RCT_EXPORT_METHOD(sendTransactionWithSignature:(NSString *)txArgsJSON
signature:(NSString *)signature
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"sendTransactionWithSignature() method called");
#endif
NSString *result = StatusgoSendTransactionWithSignature(txArgsJSON, signature);
callback(@[result]);
}
RCT_EXPORT_METHOD(multiAccountImportMnemonic:(NSString *)json
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
@@ -435,388 +146,6 @@ RCT_EXPORT_METHOD(multiAccountDeriveAddresses:(NSString *)json
callback(@[result]);
}
-(NSString *) getKeyUID:(NSString *)jsonString {
NSData *data = [jsonString dataUsingEncoding:NSUTF8StringEncoding];
NSDictionary *json = [NSJSONSerialization
JSONObjectWithData:data
options:NSJSONReadingMutableContainers
error:nil];
return [json valueForKey:@"key-uid"];
}
-(NSString *) prepareDirAndUpdateConfig:(NSString *)config
withKeyUID:(NSString *)keyUID {
NSFileManager *fileManager = [NSFileManager defaultManager];
NSError *error = nil;
NSURL *rootUrl =[[fileManager
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
lastObject];
NSURL *absTestnetFolderName = [rootUrl URLByAppendingPathComponent:@"ethereum/testnet"];
if (![fileManager fileExistsAtPath:absTestnetFolderName.path])
[fileManager createDirectoryAtPath:absTestnetFolderName.path withIntermediateDirectories:YES attributes:nil error:&error];
NSURL *flagFolderUrl = [rootUrl URLByAppendingPathComponent:@"ropsten_flag"];
if(![fileManager fileExistsAtPath:flagFolderUrl.path]){
NSLog(@"remove lightchaindata");
NSURL *absLightChainDataUrl = [absTestnetFolderName URLByAppendingPathComponent:@"StatusIM/lightchaindata"];
if([fileManager fileExistsAtPath:absLightChainDataUrl.path]) {
[fileManager removeItemAtPath:absLightChainDataUrl.path
error:nil];
}
[fileManager createDirectoryAtPath:flagFolderUrl.path
withIntermediateDirectories:NO
attributes:nil
error:&error];
}
NSLog(@"after remove lightchaindata");
NSString *keystore = @"keystore";
NSURL *absTestnetKeystoreUrl = [absTestnetFolderName URLByAppendingPathComponent:keystore];
NSURL *absKeystoreUrl = [rootUrl URLByAppendingPathComponent:keystore];
if([fileManager fileExistsAtPath:absTestnetKeystoreUrl.path]){
NSLog(@"copy keystore");
[fileManager copyItemAtPath:absTestnetKeystoreUrl.path toPath:absKeystoreUrl.path error:nil];
[fileManager removeItemAtPath:absTestnetKeystoreUrl.path error:nil];
}
NSLog(@"after lightChainData");
NSLog(@"preconfig: %@", config);
NSData *configData = [config dataUsingEncoding:NSUTF8StringEncoding];
NSDictionary *configJSON = [NSJSONSerialization JSONObjectWithData:configData options:NSJSONReadingMutableContainers error:nil];
NSString *relativeDataDir = [configJSON objectForKey:@"DataDir"];
NSString *absDataDir = [rootUrl.path stringByAppendingString:relativeDataDir];
NSURL *absDataDirUrl = [NSURL fileURLWithPath:absDataDir];
NSString *keystoreDir = [@"/keystore/" stringByAppendingString:keyUID];
[configJSON setValue:keystoreDir forKey:@"KeyStoreDir"];
[configJSON setValue:@"" forKey:@"LogDir"];
[configJSON setValue:@"geth.log" forKey:@"LogFile"];
NSString *resultingConfig = [configJSON bv_jsonStringWithPrettyPrint:NO];
NSLog(@"node config %@", resultingConfig);
if(![fileManager fileExistsAtPath:absDataDir]) {
[fileManager createDirectoryAtPath:absDataDir
withIntermediateDirectories:YES attributes:nil error:nil];
}
NSLog(@"logUrlPath %@ rootDir %@", @"geth.log", rootUrl.path);
NSURL *absLogUrl = [absDataDirUrl URLByAppendingPathComponent:@"geth.log"];
if(![fileManager fileExistsAtPath:absLogUrl.path]) {
NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
[dict setObject:[NSNumber numberWithInt:511] forKey:NSFilePosixPermissions];
[fileManager createFileAtPath:absLogUrl.path contents:nil attributes:dict];
}
return resultingConfig;
}
RCT_EXPORT_METHOD(prepareDirAndUpdateConfig:(NSString *)keyUID
config:(NSString *)config
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"PrepareDirAndUpdateConfig() method called");
#endif
NSString *updatedConfig = [self prepareDirAndUpdateConfig:config
withKeyUID:keyUID];
callback(@[updatedConfig]);
}
RCT_EXPORT_METHOD(saveAccountAndLogin:(NSString *)multiaccountData
password:(NSString *)password
settings:(NSString *)settings
config:(NSString *)config
accountsData:(NSString *)accountsData) {
#if DEBUG
NSLog(@"SaveAccountAndLogin() method called");
#endif
[self getExportDbFilePath];
NSString *keyUID = [self getKeyUID:multiaccountData];
NSString *finalConfig = [self prepareDirAndUpdateConfig:config
withKeyUID:keyUID];
NSString *result = StatusgoSaveAccountAndLogin(multiaccountData, password, settings, finalConfig, accountsData);
NSLog(@"%@", result);
}
RCT_EXPORT_METHOD(saveAccountAndLoginWithKeycard:(NSString *)multiaccountData
password:(NSString *)password
settings:(NSString *)settings
config:(NSString *)config
accountsData:(NSString *)accountsData
chatKey:(NSString *)chatKey) {
#if DEBUG
NSLog(@"SaveAccountAndLoginWithKeycard() method called");
#endif
[self getExportDbFilePath];
NSString *keyUID = [self getKeyUID:multiaccountData];
NSString *finalConfig = [self prepareDirAndUpdateConfig:config
withKeyUID:keyUID];
NSString *result = StatusgoSaveAccountAndLoginWithKeycard(multiaccountData, password, settings, finalConfig, accountsData, chatKey);
NSLog(@"%@", result);
}
- (NSString *) getExportDbFilePath {
NSString *filePath = [NSTemporaryDirectory() stringByAppendingPathComponent:@"export.db"];
NSFileManager *fileManager = [NSFileManager defaultManager];
if ([fileManager fileExistsAtPath:filePath]) {
[fileManager removeItemAtPath:filePath error:nil];
}
return filePath;
}
- (NSURL *) getKeyStoreDir:(NSString *)keyUID {
NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *rootUrl =[[fileManager
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
lastObject];
NSURL *oldKeystoreDir = [rootUrl URLByAppendingPathComponent:@"keystore"];
NSURL *multiaccountKeystoreDir = [oldKeystoreDir URLByAppendingPathComponent:keyUID];
return multiaccountKeystoreDir;
}
- (void) migrateKeystore:(NSString *)accountData
password:(NSString *)password {
NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *rootUrl =[[fileManager
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
lastObject];
NSString *keyUID = [self getKeyUID:accountData];
NSURL *oldKeystoreDir = [rootUrl URLByAppendingPathComponent:@"keystore"];
NSURL *multiaccountKeystoreDir = [self getKeyStoreDir:keyUID];
NSArray *keys = [fileManager contentsOfDirectoryAtPath:multiaccountKeystoreDir.path error:nil];
if (keys.count == 0) {
NSString *migrationResult = StatusgoMigrateKeyStoreDir(accountData, password, oldKeystoreDir.path, multiaccountKeystoreDir.path);
NSLog(@"keystore migration result %@", migrationResult);
NSString *initKeystoreResult = StatusgoInitKeystore(multiaccountKeystoreDir.path);
NSLog(@"InitKeyStore result %@", initKeystoreResult);
}
}
RCT_EXPORT_METHOD(login:(NSString *)accountData
password:(NSString *)password) {
#if DEBUG
NSLog(@"Login() method called");
#endif
[self getExportDbFilePath];
[self migrateKeystore:accountData password:password];
NSString *result = StatusgoLogin(accountData, password);
NSLog(@"%@", result);
}
RCT_EXPORT_METHOD(loginWithConfig:(NSString *)accountData
password:(NSString *)password
configJSON:(NSString *)configJSON) {
#if DEBUG
NSLog(@"LoginWithConfig() method called");
#endif
[self getExportDbFilePath];
[self migrateKeystore:accountData password:password];
NSString *result = StatusgoLoginWithConfig(accountData, password, configJSON);
NSLog(@"%@", result);
}
RCT_EXPORT_METHOD(loginAccount:(NSString *)request) {
#if DEBUG
NSLog(@"LoginAccount() method called");
#endif
NSString *result = StatusgoLoginAccount(request);
NSLog(@"%@", result);
}
RCT_EXPORT_METHOD(loginWithKeycard:(NSString *)accountData
password:(NSString *)password
chatKey:(NSString *)chatKey
nodeConfigJSON:(NSString *)nodeConfigJSON) {
#if DEBUG
NSLog(@"LoginWithKeycard() method called");
#endif
[self getExportDbFilePath];
[self migrateKeystore:accountData password:password];
NSString *result = StatusgoLoginWithKeycard(accountData, password, chatKey, nodeConfigJSON);
NSLog(@"%@", result);
}
RCT_EXPORT_METHOD(logout) {
#if DEBUG
NSLog(@"Logout() method called");
#endif
NSString *result = StatusgoLogout();
NSLog(@"%@", result);
}
RCT_EXPORT_METHOD(openAccounts:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"OpenAccounts() method called");
#endif
NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *rootUrl =[[fileManager
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
lastObject];
NSString *result = StatusgoOpenAccounts(rootUrl.path);
callback(@[result]);
}
RCT_EXPORT_METHOD(verify:(NSString *)address
password:(NSString *)password
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"VerifyAccountPassword() method called");
#endif
NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *rootUrl =[[fileManager
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
lastObject];
NSURL *absKeystoreUrl = [rootUrl URLByAppendingPathComponent:@"keystore"];
NSString *result = StatusgoVerifyAccountPassword(absKeystoreUrl.path, address, password);
callback(@[result]);
}
RCT_EXPORT_METHOD(verifyDatabasePassword:(NSString *)keyUID
password:(NSString *)password
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"VerifyDatabasePassword() method called");
#endif
NSString *result = StatusgoVerifyDatabasePassword(keyUID, password);
callback(@[result]);
}
RCT_EXPORT_METHOD(reEncryptDbAndKeystore:(NSString *)keyUID
currentPassword:(NSString *)currentPassword
newPassword:(NSString *)newPassword
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"reEncryptDbAndKeystore() method called");
#endif
// changes password and re-encrypts keystore
NSString *result = StatusgoChangeDatabasePassword(keyUID, currentPassword, newPassword);
callback(@[result]);
}
RCT_EXPORT_METHOD(convertToKeycardAccount:(NSString *)keyUID
accountData:(NSString *)accountData
settings:(NSString *)settings
keycardUID:(NSString *)keycardUID
currentPassword:(NSString *)currentPassword
newPassword:(NSString *)newPassword
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"convertToKeycardAccount() method called");
#endif
NSURL *multiaccountKeystoreDir = [self getKeyStoreDir:keyUID];
StatusgoInitKeystore(multiaccountKeystoreDir.path);
NSString *result = StatusgoConvertToKeycardAccount(accountData, settings, keycardUID, currentPassword, newPassword);
callback(@[result]);
}
#pragma mark - SendTransaction
RCT_EXPORT_METHOD(sendTransaction:(NSString *)txArgsJSON
password:(NSString *)password
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"SendTransaction() method called");
#endif
NSString *result = StatusgoSendTransaction(txArgsJSON, password);
callback(@[result]);
}
#pragma mark - SignMessage
RCT_EXPORT_METHOD(signMessage:(NSString *)message
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"SignMessage() method called");
#endif
NSString *result = StatusgoSignMessage(message);
callback(@[result]);
}
#pragma mark - Recover
RCT_EXPORT_METHOD(recover:(NSString *)message
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"Recover() method called");
#endif
NSString *result = StatusgoRecover(message);
callback(@[result]);
}
#pragma mark - SignTypedData
RCT_EXPORT_METHOD(signTypedData:(NSString *)data
account:(NSString *)account
password:(NSString *)password
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"SignTypedData() method called");
#endif
NSString *result = StatusgoSignTypedData(data, account, password);
callback(@[result]);
}
#pragma mark - SignTypedDataV4
RCT_EXPORT_METHOD(signTypedDataV4:(NSString *)data
account:(NSString *)account
password:(NSString *)password
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"SignTypedDataV4() method called");
#endif
NSString *result = StatusgoSignTypedDataV4(data, account, password);
callback(@[result]);
}
#pragma mark - SignGroupMembership
RCT_EXPORT_METHOD(signGroupMembership:(NSString *)content
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"SignGroupMembership() method called");
#endif
NSString *result = StatusgoSignGroupMembership(content);
callback(@[result]);
}
#pragma mark - ExtractGroupMembershipSignatures
RCT_EXPORT_METHOD(extractGroupMembershipSignatures:(NSString *)content
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"ExtractGroupMembershipSignatures() method called");
#endif
NSString *result = StatusgoExtractGroupMembershipSignatures(content);
callback(@[result]);
}
#pragma mark - GetNodeConfig
RCT_EXPORT_METHOD(getNodeConfig:(RCTResponseSenderBlock)callback) {
@@ -827,202 +156,14 @@ RCT_EXPORT_METHOD(getNodeConfig:(RCTResponseSenderBlock)callback) {
callback(@[result]);
}
#pragma mark - only android methods
RCT_EXPORT_METHOD(setAdjustResize) {
#if DEBUG
NSLog(@"setAdjustResize() works only on Android");
#endif
}
RCT_EXPORT_METHOD(setAdjustPan) {
#if DEBUG
NSLog(@"setAdjustPan() works only on Android");
#endif
}
RCT_EXPORT_METHOD(setSoftInputMode: (NSInteger) i) {
#if DEBUG
NSLog(@"setSoftInputMode() works only on Android");
#endif
}
RCT_EXPORT_METHOD(clearCookies) {
NSHTTPCookie *cookie;
NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
for (cookie in [storage cookies]) {
[storage deleteCookie:cookie];
}
}
RCT_EXPORT_METHOD(clearStorageAPIs) {
[[NSURLCache sharedURLCache] removeAllCachedResponses];
NSString *path = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) lastObject];
NSArray *array = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:path error:nil];
for (NSString *string in array) {
NSLog(@"Removing %@", [path stringByAppendingPathComponent:string]);
if ([[string pathExtension] isEqualToString:@"localstorage"])
[[NSFileManager defaultManager] removeItemAtPath:[path stringByAppendingPathComponent:string] error:nil];
}
}
RCT_EXPORT_METHOD(callRPC:(NSString *)payload
callback:(RCTResponseSenderBlock)callback) {
dispatch_async( dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSString *result = StatusgoCallRPC(payload);
dispatch_async(dispatch_get_main_queue(), ^{
callback(@[result]);
});
});
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(keystoreDir) {
NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *rootUrl =[[fileManager
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
lastObject];
NSURL *commonKeystoreDir = [rootUrl URLByAppendingPathComponent:@"keystore"];
return commonKeystoreDir.path;
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(backupDisabledDataDir) {
NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *rootUrl =[[fileManager
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
lastObject];
return rootUrl.path;
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(logFileDirectory) {
NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *rootUrl =[[fileManager
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
lastObject];
return rootUrl.path;
}
RCT_EXPORT_METHOD(initLogging:(BOOL)enabled
mobileSystem:(BOOL)mobileSystem
logLevel:(NSString *)logLevel
callback:(RCTResponseSenderBlock)callback)
{
NSString *logDirectory = [self logFileDirectory];
NSString *logFilePath = [logDirectory stringByAppendingPathComponent:@"geth.log"];
NSMutableDictionary *jsonConfig = [NSMutableDictionary dictionary];
jsonConfig[@"Enabled"] = @(enabled);
jsonConfig[@"MobileSystem"] = @(mobileSystem);
jsonConfig[@"Level"] = logLevel;
jsonConfig[@"File"] = logFilePath;
NSError *error = nil;
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:jsonConfig options:0 error:&error];
if (error) {
// Handle JSON serialization error
callback(@[error.localizedDescription]);
return;
}
NSString *config = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
// Call your native logging initialization method here
NSString *initResult = StatusgoInitLogging(config);
callback(@[initResult]);
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(encodeTransfer:(NSString *)to
value:(NSString *)value) {
return StatusgoEncodeTransfer(to,value);
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(encodeFunctionCall:(NSString *)method
paramsJSON:(NSString *)paramsJSON) {
return StatusgoEncodeFunctionCall(method,paramsJSON);
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(decodeParameters:(NSString *)decodeParamJSON) {
return StatusgoDecodeParameters(decodeParamJSON);
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(hexToNumber:(NSString *)hex) {
return StatusgoHexToNumber(hex);
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(numberToHex:(NSString *)numString) {
return StatusgoNumberToHex(numString);
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(sha3:(NSString *)str) {
return StatusgoSha3(str);
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(utf8ToHex:(NSString *)str) {
return StatusgoUtf8ToHex(str);
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(hexToUtf8:(NSString *)str) {
return StatusgoHexToUtf8(str);
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(checkAddressChecksum:(NSString *)address) {
return StatusgoCheckAddressChecksum(address);
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(isAddress:(NSString *)address) {
return StatusgoIsAddress(address);
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(toChecksumAddress:(NSString *)address) {
return StatusgoToChecksumAddress(address);
}
RCT_EXPORT_METHOD(validateMnemonic:(NSString *)seed
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"validateMnemonic() method called");
#endif
NSString *result = StatusgoValidateMnemonic(seed);
callback(@[result]);
}
RCT_EXPORT_METHOD(createAccountAndLogin:(NSString *)request) {
#if DEBUG
NSLog(@"createAccountAndLogin() method called");
#endif
StatusgoCreateAccountAndLogin(request);
}
RCT_EXPORT_METHOD(restoreAccountAndLogin:(NSString *)request) {
#if DEBUG
NSLog(@"restoreAccountAndLogin() method called");
#endif
StatusgoRestoreAccountAndLogin(request);
}
RCT_EXPORT_METHOD(callPrivateRPC:(NSString *)payload
callback:(RCTResponseSenderBlock)callback) {
dispatch_async( dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSString *result = StatusgoCallPrivateRPC(payload);
dispatch_async(dispatch_get_main_queue(), ^{
callback(@[result]);
});
});
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(fleets) {
return StatusgoFleets();
}
RCT_EXPORT_METHOD(closeApplication) {
exit(0);
}
RCT_EXPORT_METHOD(connectionChange:(NSString *)type
isExpensive:(BOOL)isExpensive) {
#if DEBUG
@@ -1038,13 +179,6 @@ RCT_EXPORT_METHOD(appStateChange:(NSString *)type) {
StatusgoAppStateChange(type);
}
RCT_EXPORT_METHOD(stopLocalNotifications) {
#if DEBUG
NSLog(@"StopLocalNotifications() method called");
#endif
StatusgoStopLocalNotifications();
}
RCT_EXPORT_METHOD(startLocalNotifications) {
#if DEBUG
NSLog(@"StartLocalNotifications() method called");
@@ -1052,50 +186,6 @@ RCT_EXPORT_METHOD(startLocalNotifications) {
StatusgoStartLocalNotifications();
}
RCT_EXPORT_METHOD(exportUnencryptedDatabase:(NSString *)accountData
password:(NSString *)password
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"exportUnencryptedDatabase() method called");
#endif
NSString *filePath = [self getExportDbFilePath];
StatusgoExportUnencryptedDatabase(accountData, password, filePath);
callback(@[filePath]);
}
RCT_EXPORT_METHOD(importUnencryptedDatabase:(NSString *)accountData
password:(NSString *)password) {
#if DEBUG
NSLog(@"importUnencryptedDatabase() method called");
#endif
"";
}
RCT_EXPORT_METHOD(setBlankPreviewFlag:(BOOL *)newValue)
{
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
[userDefaults setBool:newValue forKey:@"BLANK_PREVIEW"];
[userDefaults synchronize];
}
RCT_EXPORT_METHOD(activateKeepAwake)
{
dispatch_async(dispatch_get_main_queue(), ^{
[[UIApplication sharedApplication] setIdleTimerDisabled:YES];
});
}
RCT_EXPORT_METHOD(deactivateKeepAwake)
{
dispatch_async(dispatch_get_main_queue(), ^{
[[UIApplication sharedApplication] setIdleTimerDisabled:NO];
});
}
#pragma mark - deviceinfo
- (bool) is24Hour
@@ -1126,7 +216,7 @@ RCT_EXPORT_METHOD(deactivateKeepAwake)
- (NSString*) deviceName
{
return [[UIDevice currentDevice] name];;
return [[UIDevice currentDevice] name];
}
- (NSDictionary *)constantsToExport
@@ -3,13 +3,20 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
206C9F3E1D474E910063E3E6 /* RCTStatus.h in Copy Files */ = {isa = PBXBuildFile; fileRef = 206C9F3D1D474E910063E3E6 /* RCTStatus.h */; };
206C9F401D474E910063E3E6 /* RCTStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 206C9F3F1D474E910063E3E6 /* RCTStatus.m */; };
CE4E31B11D86951A0033ED64 /* Statusgo.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE4E31B01D86951A0033ED64 /* Statusgo.xcframework */; };
E92244EB2B485F2400915F4C /* UIHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = E92244E92B485F2400915F4C /* UIHelper.m */; };
E967A3AC2B47BD5A00FB19B2 /* Utils.m in Sources */ = {isa = PBXBuildFile; fileRef = E967A3AB2B47BD5A00FB19B2 /* Utils.m */; };
E9BEF3602B470BF1001F6755 /* NetworkManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E9BEF35E2B470BF1001F6755 /* NetworkManager.m */; };
E9C33AA62B4828A60074B1C5 /* DatabaseManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E9C33AA52B4828A60074B1C5 /* DatabaseManager.m */; };
E9DB08932B4858B400F51053 /* LogManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E9DB08912B4858B400F51053 /* LogManager.m */; };
E9F5C3322B483B6C001A7F40 /* EncryptionUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = E9F5C3312B483B6C001A7F40 /* EncryptionUtils.m */; };
E9FC4ED12B47EEFF00E834DB /* AccountManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E9FC4ECF2B47EEFF00E834DB /* AccountManager.m */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
@@ -31,6 +38,20 @@
206C9F3D1D474E910063E3E6 /* RCTStatus.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RCTStatus.h; sourceTree = "<group>"; };
206C9F3F1D474E910063E3E6 /* RCTStatus.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RCTStatus.m; sourceTree = "<group>"; };
CE4E31B01D86951A0033ED64 /* Statusgo.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = Statusgo.xcframework; sourceTree = "<group>"; };
E92244E92B485F2400915F4C /* UIHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIHelper.m; sourceTree = "<group>"; };
E92244EA2B485F2400915F4C /* UIHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIHelper.h; sourceTree = "<group>"; };
E967A3AA2B47BD5A00FB19B2 /* Utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Utils.h; sourceTree = "<group>"; };
E967A3AB2B47BD5A00FB19B2 /* Utils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Utils.m; sourceTree = "<group>"; };
E9BEF35E2B470BF1001F6755 /* NetworkManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NetworkManager.m; sourceTree = "<group>"; };
E9BEF35F2B470BF1001F6755 /* NetworkManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkManager.h; sourceTree = "<group>"; };
E9C33AA42B4828A60074B1C5 /* DatabaseManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DatabaseManager.h; sourceTree = "<group>"; };
E9C33AA52B4828A60074B1C5 /* DatabaseManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DatabaseManager.m; sourceTree = "<group>"; };
E9DB08912B4858B400F51053 /* LogManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LogManager.m; sourceTree = "<group>"; };
E9DB08922B4858B400F51053 /* LogManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LogManager.h; sourceTree = "<group>"; };
E9F5C3302B483B6C001A7F40 /* EncryptionUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EncryptionUtils.h; sourceTree = "<group>"; };
E9F5C3312B483B6C001A7F40 /* EncryptionUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EncryptionUtils.m; sourceTree = "<group>"; };
E9FC4ECF2B47EEFF00E834DB /* AccountManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AccountManager.m; sourceTree = "<group>"; };
E9FC4ED02B47EEFF00E834DB /* AccountManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccountManager.h; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -65,6 +86,20 @@
206C9F3C1D474E910063E3E6 /* Status */ = {
isa = PBXGroup;
children = (
E92244EA2B485F2400915F4C /* UIHelper.h */,
E92244E92B485F2400915F4C /* UIHelper.m */,
E9DB08922B4858B400F51053 /* LogManager.h */,
E9DB08912B4858B400F51053 /* LogManager.m */,
E9F5C3302B483B6C001A7F40 /* EncryptionUtils.h */,
E9F5C3312B483B6C001A7F40 /* EncryptionUtils.m */,
E9C33AA42B4828A60074B1C5 /* DatabaseManager.h */,
E9C33AA52B4828A60074B1C5 /* DatabaseManager.m */,
E9FC4ED02B47EEFF00E834DB /* AccountManager.h */,
E9FC4ECF2B47EEFF00E834DB /* AccountManager.m */,
E967A3AA2B47BD5A00FB19B2 /* Utils.h */,
E967A3AB2B47BD5A00FB19B2 /* Utils.m */,
E9BEF35F2B470BF1001F6755 /* NetworkManager.h */,
E9BEF35E2B470BF1001F6755 /* NetworkManager.m */,
206C9F3D1D474E910063E3E6 /* RCTStatus.h */,
206C9F3F1D474E910063E3E6 /* RCTStatus.m */,
);
@@ -127,7 +162,14 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
E9DB08932B4858B400F51053 /* LogManager.m in Sources */,
E9F5C3322B483B6C001A7F40 /* EncryptionUtils.m in Sources */,
E967A3AC2B47BD5A00FB19B2 /* Utils.m in Sources */,
E92244EB2B485F2400915F4C /* UIHelper.m in Sources */,
E9BEF3602B470BF1001F6755 /* NetworkManager.m in Sources */,
206C9F401D474E910063E3E6 /* RCTStatus.m in Sources */,
E9C33AA62B4828A60074B1C5 /* DatabaseManager.m in Sources */,
E9FC4ED12B47EEFF00E834DB /* AccountManager.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -0,0 +1,8 @@
#import <sys/utsname.h>
#import <Foundation/Foundation.h>
#import <React/RCTBridgeModule.h>
#import "RCTLog.h"
@interface UIHelper : NSObject <RCTBridgeModule>
@end
@@ -0,0 +1,39 @@
#import "UIHelper.h"
#import "React/RCTBridge.h"
#import "React/RCTEventDispatcher.h"
@implementation UIHelper
RCT_EXPORT_MODULE();
#pragma mark - only android methods
RCT_EXPORT_METHOD(setSoftInputMode: (NSInteger) i) {
#if DEBUG
NSLog(@"setSoftInputMode() works only on Android");
#endif
}
RCT_EXPORT_METHOD(clearCookies) {
NSHTTPCookie *cookie;
NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
for (cookie in [storage cookies]) {
[storage deleteCookie:cookie];
}
}
RCT_EXPORT_METHOD(clearStorageAPIs) {
[[NSURLCache sharedURLCache] removeAllCachedResponses];
NSString *path = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) lastObject];
NSArray *array = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:path error:nil];
for (NSString *string in array) {
NSLog(@"Removing %@", [path stringByAppendingPathComponent:string]);
if ([[string pathExtension] isEqualToString:@"localstorage"])
[[NSFileManager defaultManager] removeItemAtPath:[path stringByAppendingPathComponent:string] error:nil];
}
}
@end
@@ -0,0 +1,16 @@
#import <sys/utsname.h>
#import <Foundation/Foundation.h>
#import <React/RCTBridgeModule.h>
#import "Statusgo.h"
#import "RCTLog.h"
@interface Utils : NSObject <RCTBridgeModule>
+ (NSString *)jsonStringWithPrettyPrint:(BOOL)prettyPrint fromDictionary:(NSDictionary *)dictionary;
+ (NSString *)jsonStringWithPrettyPrint:(BOOL)prettyPrint fromArray:(NSArray *)array;
+ (NSURL *)getKeyStoreDirForKeyUID:(NSString *)keyUID;
+ (NSString *)getExportDbFilePath;
+ (NSString *)getKeyUID:(NSString *)jsonString;
+ (void)migrateKeystore:(NSString *)accountData password:(NSString *)password;
@end
@@ -0,0 +1,128 @@
#import "Utils.h"
#import "React/RCTBridge.h"
#import "React/RCTEventDispatcher.h"
#import "Statusgo.h"
#import "Utils.h"
@implementation Utils
RCT_EXPORT_MODULE();
+ (NSString *)jsonStringWithPrettyPrint:(BOOL)prettyPrint fromDictionary:(NSDictionary *)dictionary {
NSError *error;
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dictionary
options:(NSJSONWritingOptions)(prettyPrint ? NSJSONWritingPrettyPrinted : 0)
error:&error];
if (!jsonData) {
NSLog(@"jsonStringWithPrettyPrint: error: %@", error.localizedDescription);
return @"{}";
} else {
return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
}
}
+ (NSString *)jsonStringWithPrettyPrint:(BOOL)prettyPrint fromArray:(NSArray *)array {
NSError *error;
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:array
options:(NSJSONWritingOptions)(prettyPrint ? NSJSONWritingPrettyPrinted : 0)
error:&error];
if (!jsonData) {
NSLog(@"jsonStringWithPrettyPrint: error: %@", error.localizedDescription);
return @"[]";
} else {
return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
}
}
+ (NSURL *)getKeyStoreDirForKeyUID:(NSString *)keyUID {
NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *rootUrl = [[fileManager URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask] lastObject];
NSURL *oldKeystoreDir = [rootUrl URLByAppendingPathComponent:@"keystore"];
NSURL *multiaccountKeystoreDir = [oldKeystoreDir URLByAppendingPathComponent:keyUID];
return multiaccountKeystoreDir;
}
+ (NSString *) getKeyUID:(NSString *)jsonString {
NSData *data = [jsonString dataUsingEncoding:NSUTF8StringEncoding];
NSDictionary *json = [NSJSONSerialization
JSONObjectWithData:data
options:NSJSONReadingMutableContainers
error:nil];
return [json valueForKey:@"key-uid"];
}
+ (NSString *) getExportDbFilePath {
NSString *filePath = [NSTemporaryDirectory() stringByAppendingPathComponent:@"export.db"];
NSFileManager *fileManager = [NSFileManager defaultManager];
if ([fileManager fileExistsAtPath:filePath]) {
[fileManager removeItemAtPath:filePath error:nil];
}
return filePath;
}
+ (void) migrateKeystore:(NSString *)accountData
password:(NSString *)password {
NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *rootUrl =[[fileManager
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
lastObject];
NSURL *keyUID = [self getKeyStoreDirForKeyUID:accountData];
NSURL *oldKeystoreDir = [rootUrl URLByAppendingPathComponent:@"keystore"];
NSURL *multiaccountKeystoreDir = [self getKeyStoreDirForKeyUID:keyUID.path];
NSArray *keys = [fileManager contentsOfDirectoryAtPath:multiaccountKeystoreDir.path error:nil];
if (keys.count == 0) {
NSString *migrationResult = StatusgoMigrateKeyStoreDir(accountData, password, oldKeystoreDir.path, multiaccountKeystoreDir.path);
NSLog(@"keystore migration result %@", migrationResult);
NSString *initKeystoreResult = StatusgoInitKeystore(multiaccountKeystoreDir.path);
NSLog(@"InitKeyStore result %@", initKeystoreResult);
}
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(backupDisabledDataDir) {
NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *rootUrl =[[fileManager
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
lastObject];
return rootUrl.path;
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(keystoreDir) {
NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *rootUrl =[[fileManager
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
lastObject];
NSURL *commonKeystoreDir = [rootUrl URLByAppendingPathComponent:@"keystore"];
return commonKeystoreDir.path;
}
RCT_EXPORT_METHOD(validateMnemonic:(NSString *)seed
callback:(RCTResponseSenderBlock)callback) {
#if DEBUG
NSLog(@"validateMnemonic() method called");
#endif
NSString *result = StatusgoValidateMnemonic(seed);
callback(@[result]);
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(checkAddressChecksum:(NSString *)address) {
return StatusgoCheckAddressChecksum(address);
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(toChecksumAddress:(NSString *)address) {
return StatusgoToChecksumAddress(address);
}
@end
@@ -298,6 +298,7 @@ void _MultiAccountStoreAccount(const FunctionCallbackInfo<Value>& args) {
delete c;
}
void _InitKeystore(const FunctionCallbackInfo<Value>& args) {
Isolate* isolate = args.GetIsolate();
Local<Context> context = isolate->GetCurrentContext();
@@ -562,6 +563,17 @@ void _CheckAddressChecksum(const FunctionCallbackInfo<Value>& args) {
}
void _Fleets(const FunctionCallbackInfo<Value>& args) {
Isolate* isolate = args.GetIsolate();
// Call exported Go function, which returns a C string
char *c = Fleets();
Local<String> ret = String::NewFromUtf8(isolate, c).ToLocalChecked();
args.GetReturnValue().Set(ret);
delete c;
}
void _IsAddress(const FunctionCallbackInfo<Value>& args) {
Isolate* isolate = args.GetIsolate();
Local<Context> context = isolate->GetCurrentContext();
@@ -1888,6 +1900,7 @@ void init(Local<Object> exports) {
NODE_SET_METHOD(exports, "multiAccountStoreDerivedAccounts", _MultiAccountStoreDerivedAccounts);
NODE_SET_METHOD(exports, "multiAccountStoreAccount", _MultiAccountStoreAccount);
NODE_SET_METHOD(exports, "initKeystore", _InitKeystore);
NODE_SET_METHOD(exports, "fleets", _Fleets);
NODE_SET_METHOD(exports, "stopCPUProfiling", _StopCPUProfiling);
NODE_SET_METHOD(exports, "encodeTransfer", _EncodeTransfer);
NODE_SET_METHOD(exports, "encodeFunctionCall", _EncodeFunctionCall);
+18
View File
@@ -602,6 +602,15 @@
}
},
{
"path": "nubank/matcher-combinators/3.8.8/matcher-combinators-3.8.8",
"host": "https://repo.clojars.org",
"jar": {
"sha1": "4c94bd510f0c18a20191e46dd6becedebc640bbd",
"sha256": "0wpla2hx0s4mda58ndyd8938zmnz1gyhgfr6pzfphy27xfbvsssl"
}
},
{
"path": "org/apache/ant/ant/1.10.11/ant-1.10.11",
"host": "https://repo1.maven.org/maven2",
@@ -746,6 +755,15 @@
}
},
{
"path": "org/clojure/math.combinatorics/0.2.0/math.combinatorics-0.2.0",
"host": "https://repo1.maven.org/maven2",
"jar": {
"sha1": "aa95d25ea98bfe1152ea540f6e58a303c8cacc86",
"sha256": "0qvdsr5ryjmrpz622ivpyq5aayn42y4bk531vbasyj2yj7gcg35h"
}
},
{
"path": "org/clojure/spec.alpha/0.3.218/spec.alpha-0.3.218",
"host": "https://repo1.maven.org/maven2",
+2
View File
@@ -65,6 +65,7 @@ net/cgrand/macrovich/0.2.1/macrovich-0.2.1.jar
net/java/dev/jna/jna/5.12.1/jna-5.12.1.jar
nrepl/bencode/1.1.0/bencode-1.1.0.jar
nrepl/nrepl/1.0.0/nrepl-1.0.0.jar
nubank/matcher-combinators/3.8.8/matcher-combinators-3.8.8.jar
org/apache/ant/ant/1.10.11/ant-1.10.11.jar
org/apache/ant/ant-launcher/1.10.11/ant-launcher-1.10.11.jar
org/babashka/sci/0.7.38/sci-0.7.38.jar
@@ -81,6 +82,7 @@ org/clojure/data.json/2.4.0/data.json-2.4.0.jar
org/clojure/data.priority-map/1.1.0/data.priority-map-1.1.0.jar
org/clojure/google-closure-library/0.0-20230227-c7c0a541/google-closure-library-0.0-20230227-c7c0a541.jar
org/clojure/google-closure-library-third-party/0.0-20230227-c7c0a541/google-closure-library-third-party-0.0-20230227-c7c0a541.jar
org/clojure/math.combinatorics/0.2.0/math.combinatorics-0.2.0.jar
org/clojure/spec.alpha/0.3.218/spec.alpha-0.3.218.jar
org/clojure/test.check/1.1.1/test.check-1.1.1.jar
org/clojure/tools.analyzer/1.1.0/tools.analyzer-1.1.0.jar
+3174 -1447
View File
File diff suppressed because it is too large Load Diff
+228 -112
View File
@@ -1,21 +1,30 @@
androidx.activity:activity:1.0.0
androidx.activity:activity:1.0.0-rc01
androidx.activity:activity:1.2.4
androidx.annotation:annotation-experimental:1.1.0
androidx.annotation:annotation:1.0.0
androidx.annotation:annotation:1.1.0
androidx.annotation:annotation:1.2.0
androidx.annotation:annotation:1.3.0
androidx.appcompat:appcompat-resources:1.1.0-rc01
androidx.appcompat:appcompat-resources:1.2.0
androidx.appcompat:appcompat-resources:1.3.1
androidx.appcompat:appcompat-resources:1.4.1
androidx.appcompat:appcompat-resources:1.4.2
androidx.appcompat:appcompat:1.0.0
androidx.appcompat:appcompat:1.1.0-rc01
androidx.appcompat:appcompat:1.2.0
androidx.appcompat:appcompat:1.3.1
androidx.appcompat:appcompat:1.4.1
androidx.appcompat:appcompat:1.4.2
androidx.arch.core:core-common:2.0.0
androidx.arch.core:core-common:2.1.0
androidx.arch.core:core-common:2.1.0-rc01
androidx.arch.core:core-runtime:2.0.0
androidx.arch.core:core-runtime:2.1.0
androidx.asynclayoutinflater:asynclayoutinflater:1.0.0
androidx.autofill:autofill:1.1.0
androidx.biometric:biometric:1.1.0
androidx.camera:camera-camera2:1.1.0
androidx.camera:camera-core:1.1.0
androidx.camera:camera-lifecycle:1.1.0
@@ -24,13 +33,16 @@ androidx.cardview:cardview:1.0.0
androidx.collection:collection:1.0.0
androidx.collection:collection:1.1.0
androidx.concurrent:concurrent-futures:1.0.0
androidx.concurrent:concurrent-futures:1.1.0
androidx.constraintlayout:constraintlayout-solver:2.0.4
androidx.constraintlayout:constraintlayout:2.0.4
androidx.coordinatorlayout:coordinatorlayout:1.0.0
androidx.coordinatorlayout:coordinatorlayout:1.1.0
androidx.core:core-ktx:1.6.0
androidx.core:core-splashscreen:1.0.0
androidx.core:core:1.0.0
androidx.core:core:1.1.0
androidx.core:core:1.1.0-rc01
androidx.core:core:1.2.0
androidx.core:core:1.6.0
androidx.core:core:1.7.0
@@ -40,16 +52,18 @@ androidx.databinding:databinding-common:3.2.1
androidx.databinding:databinding-common:3.3.1
androidx.databinding:databinding-common:3.5.4
androidx.databinding:databinding-common:4.1.0
androidx.databinding:databinding-common:7.0.4
androidx.databinding:databinding-common:7.2.1
androidx.databinding:databinding-common:7.2.2
androidx.databinding:databinding-common:7.3.0
androidx.databinding:databinding-common:7.3.1
androidx.databinding:databinding-common:7.4.2
androidx.databinding:databinding-compiler-common:3.2.1
androidx.databinding:databinding-compiler-common:3.3.1
androidx.databinding:databinding-compiler-common:3.5.4
androidx.databinding:databinding-compiler-common:4.1.0
androidx.databinding:databinding-compiler-common:7.0.4
androidx.databinding:databinding-compiler-common:7.2.1
androidx.databinding:databinding-compiler-common:7.2.2
androidx.databinding:databinding-compiler-common:7.3.0
androidx.databinding:databinding-compiler-common:7.3.1
androidx.databinding:databinding-compiler-common:7.4.2
androidx.documentfile:documentfile:1.0.0
androidx.drawerlayout:drawerlayout:1.0.0
androidx.emoji2:emoji2-views-helper:1.0.0
@@ -61,6 +75,7 @@ androidx.exifinterface:exifinterface:1.2.0
androidx.exifinterface:exifinterface:1.3.2
androidx.fragment:fragment:1.0.0
androidx.fragment:fragment:1.1.0
androidx.fragment:fragment:1.1.0-rc01
androidx.fragment:fragment:1.3.6
androidx.interpolator:interpolator:1.0.0
androidx.legacy:legacy-support-core-ui:1.0.0
@@ -68,6 +83,7 @@ androidx.legacy:legacy-support-core-utils:1.0.0
androidx.legacy:legacy-support-v4:1.0.0
androidx.lifecycle:lifecycle-common:2.0.0
androidx.lifecycle:lifecycle-common:2.1.0
androidx.lifecycle:lifecycle-common:2.1.0-rc01
androidx.lifecycle:lifecycle-common:2.3.1
androidx.lifecycle:lifecycle-common:2.4.0
androidx.lifecycle:lifecycle-livedata-core:2.0.0
@@ -78,11 +94,13 @@ androidx.lifecycle:lifecycle-livedata:2.1.0
androidx.lifecycle:lifecycle-process:2.4.0
androidx.lifecycle:lifecycle-runtime:2.0.0
androidx.lifecycle:lifecycle-runtime:2.1.0
androidx.lifecycle:lifecycle-runtime:2.1.0-rc01
androidx.lifecycle:lifecycle-runtime:2.3.1
androidx.lifecycle:lifecycle-runtime:2.4.0
androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1
androidx.lifecycle:lifecycle-viewmodel:2.0.0
androidx.lifecycle:lifecycle-viewmodel:2.1.0
androidx.lifecycle:lifecycle-viewmodel:2.1.0-rc01
androidx.lifecycle:lifecycle-viewmodel:2.3.1
androidx.loader:loader:1.0.0
androidx.localbroadcastmanager:localbroadcastmanager:1.0.0
@@ -93,18 +111,32 @@ androidx.recyclerview:recyclerview:1.0.0
androidx.recyclerview:recyclerview:1.1.0
androidx.resourceinspection:resourceinspection-annotation:1.0.0
androidx.savedstate:savedstate:1.0.0
androidx.savedstate:savedstate:1.0.0-rc01
androidx.savedstate:savedstate:1.1.0
androidx.slidingpanelayout:slidingpanelayout:1.0.0
androidx.startup:startup-runtime:1.0.0
androidx.swiperefreshlayout:swiperefreshlayout:1.0.0
androidx.swiperefreshlayout:swiperefreshlayout:1.1.0
androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02
androidx.tracing:tracing:1.0.0
androidx.test.ext:junit:1.1.4-alpha05
androidx.test.services:storage:1.4.2-alpha02
androidx.test:annotation:1.0.0
androidx.test:core:1.4.1-alpha05
androidx.test:monitor:1.6.0-alpha02
androidx.test:runner:1.5.0-alpha02
androidx.tracing:tracing:1.1.0
androidx.transition:transition:1.1.0
androidx.transition:transition:1.2.0
androidx.transition:transition:1.2.0-rc01
androidx.vectordrawable:vectordrawable-animated:1.0.0
androidx.vectordrawable:vectordrawable-animated:1.1.0
androidx.vectordrawable:vectordrawable-animated:1.1.0-rc01
androidx.vectordrawable:vectordrawable:1.0.0
androidx.vectordrawable:vectordrawable:1.1.0
androidx.vectordrawable:vectordrawable:1.1.0-rc01
androidx.versionedparcelable:versionedparcelable:1.0.0
androidx.versionedparcelable:versionedparcelable:1.1.0
androidx.versionedparcelable:versionedparcelable:1.1.0-rc01
androidx.versionedparcelable:versionedparcelable:1.1.1
androidx.viewpager2:viewpager2:1.0.0
androidx.viewpager:viewpager:1.0.0
@@ -117,10 +149,12 @@ commons-codec:commons-codec:1.11
commons-io:commons-io:2.4
commons-logging:commons-logging:1.1.1
commons-logging:commons-logging:1.2
com.adarshr:gradle-test-logger-plugin:2.0.0
com.adobe.xmp:xmpcore:6.1.11
com.afollestad.material-dialogs:commons:0.9.6.0
com.afollestad.material-dialogs:core:0.9.6.0
com.airbnb.android:lottie:3.4.4
com.almworks.sqlite4java:sqlite4java:1.0.392
com.android.databinding:baseLibrary:1.0-rc5
com.android.databinding:baseLibrary:3.0.0
com.android.databinding:baseLibrary:3.0.1
@@ -128,9 +162,10 @@ com.android.databinding:baseLibrary:3.2.1
com.android.databinding:baseLibrary:3.3.1
com.android.databinding:baseLibrary:3.5.4
com.android.databinding:baseLibrary:4.1.0
com.android.databinding:baseLibrary:7.0.4
com.android.databinding:baseLibrary:7.2.1
com.android.databinding:baseLibrary:7.2.2
com.android.databinding:baseLibrary:7.3.0
com.android.databinding:baseLibrary:7.3.1
com.android.databinding:baseLibrary:7.4.2
com.android.databinding:compilerCommon:1.0-rc5
com.android.databinding:compilerCommon:3.0.0
com.android.databinding:compilerCommon:3.0.1
@@ -138,36 +173,40 @@ com.android.tools.analytics-library:crash:26.2.1
com.android.tools.analytics-library:crash:26.3.1
com.android.tools.analytics-library:crash:26.5.4
com.android.tools.analytics-library:crash:27.1.0
com.android.tools.analytics-library:crash:30.0.4
com.android.tools.analytics-library:crash:30.2.1
com.android.tools.analytics-library:crash:30.2.2
com.android.tools.analytics-library:crash:30.3.0
com.android.tools.analytics-library:crash:30.3.1
com.android.tools.analytics-library:crash:30.4.2
com.android.tools.analytics-library:protos:26.0.0
com.android.tools.analytics-library:protos:26.0.1
com.android.tools.analytics-library:protos:26.2.1
com.android.tools.analytics-library:protos:26.3.1
com.android.tools.analytics-library:protos:26.5.4
com.android.tools.analytics-library:protos:27.1.0
com.android.tools.analytics-library:protos:30.0.4
com.android.tools.analytics-library:protos:30.2.1
com.android.tools.analytics-library:protos:30.2.2
com.android.tools.analytics-library:protos:30.3.0
com.android.tools.analytics-library:protos:30.3.1
com.android.tools.analytics-library:protos:30.4.2
com.android.tools.analytics-library:shared:26.0.0
com.android.tools.analytics-library:shared:26.0.1
com.android.tools.analytics-library:shared:26.2.1
com.android.tools.analytics-library:shared:26.3.1
com.android.tools.analytics-library:shared:26.5.4
com.android.tools.analytics-library:shared:27.1.0
com.android.tools.analytics-library:shared:30.0.4
com.android.tools.analytics-library:shared:30.2.1
com.android.tools.analytics-library:shared:30.2.2
com.android.tools.analytics-library:shared:30.3.0
com.android.tools.analytics-library:shared:30.3.1
com.android.tools.analytics-library:shared:30.4.2
com.android.tools.analytics-library:tracker:26.0.0
com.android.tools.analytics-library:tracker:26.0.1
com.android.tools.analytics-library:tracker:26.2.1
com.android.tools.analytics-library:tracker:26.3.1
com.android.tools.analytics-library:tracker:26.5.4
com.android.tools.analytics-library:tracker:27.1.0
com.android.tools.analytics-library:tracker:30.0.4
com.android.tools.analytics-library:tracker:30.2.1
com.android.tools.analytics-library:tracker:30.2.2
com.android.tools.analytics-library:tracker:30.3.0
com.android.tools.analytics-library:tracker:30.3.1
com.android.tools.analytics-library:tracker:30.4.2
com.android.tools.build.jetifier:jetifier-core:1.0.0-alpha10
com.android.tools.build.jetifier:jetifier-core:1.0.0-beta02
com.android.tools.build.jetifier:jetifier-core:1.0.0-beta04
@@ -181,30 +220,33 @@ com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta10
com.android.tools.build:aapt2-proto:0.3.1
com.android.tools.build:aapt2-proto:0.4.0
com.android.tools.build:aapt2-proto:4.1.0-6503028
com.android.tools.build:aapt2-proto:7.0.4-7396180
com.android.tools.build:aapt2-proto:7.2.1-7984345
com.android.tools.build:aapt2-proto:7.2.2-7984345
com.android.tools.build:aapt2-proto:7.3.0-8691043
com.android.tools.build:aapt2-proto:7.3.1-8691043
com.android.tools.build:aapt2-proto:7.4.2-8841542
com.android.tools.build:aaptcompiler:4.1.0
com.android.tools.build:aaptcompiler:7.0.4
com.android.tools.build:aaptcompiler:7.2.1
com.android.tools.build:aaptcompiler:7.2.2
com.android.tools.build:aaptcompiler:7.3.0
com.android.tools.build:aaptcompiler:7.3.1
com.android.tools.build:aaptcompiler:7.4.2
com.android.tools.build:apksig:3.0.0
com.android.tools.build:apksig:3.0.1
com.android.tools.build:apksig:3.2.1
com.android.tools.build:apksig:3.3.1
com.android.tools.build:apksig:3.5.4
com.android.tools.build:apksig:4.1.0
com.android.tools.build:apksig:7.0.4
com.android.tools.build:apksig:7.2.1
com.android.tools.build:apksig:7.2.2
com.android.tools.build:apksig:7.3.0
com.android.tools.build:apksig:7.3.1
com.android.tools.build:apksig:7.4.2
com.android.tools.build:apkzlib:3.2.1
com.android.tools.build:apkzlib:3.3.1
com.android.tools.build:apkzlib:3.5.4
com.android.tools.build:apkzlib:4.1.0
com.android.tools.build:apkzlib:7.0.4
com.android.tools.build:apkzlib:7.2.1
com.android.tools.build:apkzlib:7.2.2
com.android.tools.build:apkzlib:7.3.0
com.android.tools.build:builder-model:1.1.3
com.android.tools.build:apkzlib:7.3.1
com.android.tools.build:apkzlib:7.4.2
com.android.tools.build:builder-model:1.3.1
com.android.tools.build:builder-model:1.5.0
com.android.tools.build:builder-model:3.0.0
@@ -213,10 +255,10 @@ com.android.tools.build:builder-model:3.2.1
com.android.tools.build:builder-model:3.3.1
com.android.tools.build:builder-model:3.5.4
com.android.tools.build:builder-model:4.1.0
com.android.tools.build:builder-model:7.0.4
com.android.tools.build:builder-model:7.2.1
com.android.tools.build:builder-model:7.2.2
com.android.tools.build:builder-model:7.3.0
com.android.tools.build:builder-test-api:1.1.3
com.android.tools.build:builder-model:7.3.1
com.android.tools.build:builder-model:7.4.2
com.android.tools.build:builder-test-api:1.3.1
com.android.tools.build:builder-test-api:1.5.0
com.android.tools.build:builder-test-api:3.0.0
@@ -225,10 +267,10 @@ com.android.tools.build:builder-test-api:3.2.1
com.android.tools.build:builder-test-api:3.3.1
com.android.tools.build:builder-test-api:3.5.4
com.android.tools.build:builder-test-api:4.1.0
com.android.tools.build:builder-test-api:7.0.4
com.android.tools.build:builder-test-api:7.2.1
com.android.tools.build:builder-test-api:7.2.2
com.android.tools.build:builder-test-api:7.3.0
com.android.tools.build:builder:1.1.3
com.android.tools.build:builder-test-api:7.3.1
com.android.tools.build:builder-test-api:7.4.2
com.android.tools.build:builder:1.3.1
com.android.tools.build:builder:1.5.0
com.android.tools.build:builder:3.0.0
@@ -237,30 +279,33 @@ com.android.tools.build:builder:3.2.1
com.android.tools.build:builder:3.3.1
com.android.tools.build:builder:3.5.4
com.android.tools.build:builder:4.1.0
com.android.tools.build:builder:7.0.4
com.android.tools.build:builder:7.2.1
com.android.tools.build:builder:7.2.2
com.android.tools.build:builder:7.3.0
com.android.tools.build:builder:7.3.1
com.android.tools.build:builder:7.4.2
com.android.tools.build:bundletool:0.5.0
com.android.tools.build:bundletool:0.6.0
com.android.tools.build:bundletool:0.9.0
com.android.tools.build:bundletool:0.14.0
com.android.tools.build:bundletool:1.6.0
com.android.tools.build:bundletool:1.8.2
com.android.tools.build:bundletool:1.9.0
com.android.tools.build:bundletool:1.11.4
com.android.tools.build:gradle-api:3.0.0
com.android.tools.build:gradle-api:3.0.1
com.android.tools.build:gradle-api:3.2.1
com.android.tools.build:gradle-api:3.3.1
com.android.tools.build:gradle-api:3.5.4
com.android.tools.build:gradle-api:4.1.0
com.android.tools.build:gradle-api:7.0.4
com.android.tools.build:gradle-api:7.2.1
com.android.tools.build:gradle-api:7.2.2
com.android.tools.build:gradle-api:7.3.0
com.android.tools.build:gradle-core:1.1.3
com.android.tools.build:gradle-api:7.3.1
com.android.tools.build:gradle-api:7.4.2
com.android.tools.build:gradle-core:1.3.1
com.android.tools.build:gradle-core:1.5.0
com.android.tools.build:gradle-core:3.0.0
com.android.tools.build:gradle-core:3.0.1
com.android.tools.build:gradle:1.1.3
com.android.tools.build:gradle-settings-api:7.4.2
com.android.tools.build:gradle:1.3.1
com.android.tools.build:gradle:1.5.0
com.android.tools.build:gradle:3.0.0
@@ -269,10 +314,9 @@ com.android.tools.build:gradle:3.2.1
com.android.tools.build:gradle:3.3.1
com.android.tools.build:gradle:3.5.4
com.android.tools.build:gradle:4.1.0
com.android.tools.build:gradle:7.0.4
com.android.tools.build:gradle:7.2.1
com.android.tools.build:gradle:7.2.2
com.android.tools.build:gradle:7.3.0
com.android.tools.build:manifest-merger:24.1.3
com.android.tools.build:gradle:7.3.1
com.android.tools.build:manifest-merger:24.3.1
com.android.tools.build:manifest-merger:24.5.0
com.android.tools.build:manifest-merger:26.0.0
@@ -281,12 +325,12 @@ com.android.tools.build:manifest-merger:26.2.1
com.android.tools.build:manifest-merger:26.3.1
com.android.tools.build:manifest-merger:26.5.4
com.android.tools.build:manifest-merger:27.1.0
com.android.tools.build:manifest-merger:30.0.4
com.android.tools.build:manifest-merger:30.2.1
com.android.tools.build:manifest-merger:30.2.2
com.android.tools.build:manifest-merger:30.3.0
com.android.tools.build:manifest-merger:30.3.1
com.android.tools.build:manifest-merger:30.4.2
com.android.tools.build:transform-api:1.5.0
com.android.tools.build:transform-api:2.0.0-deprecated-use-gradle-api
com.android.tools.ddms:ddmlib:24.1.3
com.android.tools.ddms:ddmlib:24.3.1
com.android.tools.ddms:ddmlib:24.5.0
com.android.tools.ddms:ddmlib:26.0.0
@@ -295,9 +339,10 @@ com.android.tools.ddms:ddmlib:26.2.1
com.android.tools.ddms:ddmlib:26.3.1
com.android.tools.ddms:ddmlib:26.5.4
com.android.tools.ddms:ddmlib:27.1.0
com.android.tools.ddms:ddmlib:30.0.4
com.android.tools.ddms:ddmlib:30.2.1
com.android.tools.ddms:ddmlib:30.2.2
com.android.tools.ddms:ddmlib:30.3.0
com.android.tools.ddms:ddmlib:30.3.1
com.android.tools.ddms:ddmlib:30.4.2
com.android.tools.external.com-intellij:intellij-core:26.0.0
com.android.tools.external.com-intellij:intellij-core:26.0.1
com.android.tools.external.lombok:lombok-ast:0.2.3
@@ -305,7 +350,6 @@ com.android.tools.external.org-jetbrains:uast:26.0.0
com.android.tools.external.org-jetbrains:uast:26.0.1
com.android.tools.jack:jack-api:0.9.0
com.android.tools.jill:jill-api:0.9.0
com.android.tools.layoutlib:layoutlib-api:24.1.3
com.android.tools.layoutlib:layoutlib-api:24.3.1
com.android.tools.layoutlib:layoutlib-api:24.5.0
com.android.tools.layoutlib:layoutlib-api:26.0.0
@@ -314,15 +358,14 @@ com.android.tools.layoutlib:layoutlib-api:26.2.1
com.android.tools.layoutlib:layoutlib-api:26.3.1
com.android.tools.layoutlib:layoutlib-api:26.5.4
com.android.tools.layoutlib:layoutlib-api:27.1.0
com.android.tools.layoutlib:layoutlib-api:30.0.4
com.android.tools.layoutlib:layoutlib-api:30.2.1
com.android.tools.layoutlib:layoutlib-api:30.2.2
com.android.tools.layoutlib:layoutlib-api:30.3.0
com.android.tools.lint:lint-api:24.1.3
com.android.tools.layoutlib:layoutlib-api:30.3.1
com.android.tools.layoutlib:layoutlib-api:30.4.2
com.android.tools.lint:lint-api:24.3.1
com.android.tools.lint:lint-api:24.5.0
com.android.tools.lint:lint-api:26.0.0
com.android.tools.lint:lint-api:26.0.1
com.android.tools.lint:lint-checks:24.1.3
com.android.tools.lint:lint-checks:24.3.1
com.android.tools.lint:lint-checks:24.5.0
com.android.tools.lint:lint-checks:26.0.0
@@ -332,36 +375,38 @@ com.android.tools.lint:lint-gradle-api:26.3.1
com.android.tools.lint:lint-gradle-api:26.5.4
com.android.tools.lint:lint-gradle-api:27.1.0
com.android.tools.lint:lint-model:27.1.0
com.android.tools.lint:lint-model:30.0.4
com.android.tools.lint:lint-model:30.2.1
com.android.tools.lint:lint-model:30.2.2
com.android.tools.lint:lint-model:30.3.0
com.android.tools.lint:lint-model:30.3.1
com.android.tools.lint:lint-model:30.4.2
com.android.tools.lint:lint-typedef-remover:30.2.1
com.android.tools.lint:lint-typedef-remover:30.2.2
com.android.tools.lint:lint-typedef-remover:30.3.0
com.android.tools.lint:lint:24.1.3
com.android.tools.lint:lint-typedef-remover:30.3.1
com.android.tools.lint:lint-typedef-remover:30.4.2
com.android.tools.lint:lint:24.3.1
com.android.tools.lint:lint:24.5.0
com.android.tools.lint:lint:26.0.0
com.android.tools.lint:lint:26.0.1
com.android.tools.utp:android-device-provider-ddmlib-proto:30.2.1
com.android.tools.utp:android-device-provider-ddmlib-proto:30.2.2
com.android.tools.utp:android-device-provider-ddmlib-proto:30.3.0
com.android.tools.utp:android-device-provider-ddmlib-proto:30.3.1
com.android.tools.utp:android-device-provider-ddmlib-proto:30.4.2
com.android.tools.utp:android-device-provider-gradle-proto:30.0.4
com.android.tools.utp:android-device-provider-gradle-proto:30.2.1
com.android.tools.utp:android-device-provider-gradle-proto:30.2.2
com.android.tools.utp:android-device-provider-gradle-proto:30.3.0
com.android.tools.utp:android-device-provider-gradle-proto:30.3.1
com.android.tools.utp:android-device-provider-gradle-proto:30.4.2
com.android.tools.utp:android-test-plugin-host-additional-test-output-proto:30.2.1
com.android.tools.utp:android-test-plugin-host-additional-test-output-proto:30.2.2
com.android.tools.utp:android-test-plugin-host-additional-test-output-proto:30.3.0
com.android.tools.utp:android-test-plugin-host-additional-test-output-proto:30.3.1
com.android.tools.utp:android-test-plugin-host-additional-test-output-proto:30.4.2
com.android.tools.utp:android-test-plugin-host-coverage-proto:30.2.1
com.android.tools.utp:android-test-plugin-host-coverage-proto:30.2.2
com.android.tools.utp:android-test-plugin-host-coverage-proto:30.3.0
com.android.tools.utp:android-test-plugin-host-coverage-proto:30.3.1
com.android.tools.utp:android-test-plugin-host-coverage-proto:30.4.2
com.android.tools.utp:android-test-plugin-host-retention-proto:30.0.4
com.android.tools.utp:android-test-plugin-host-retention-proto:30.2.1
com.android.tools.utp:android-test-plugin-host-retention-proto:30.2.2
com.android.tools.utp:android-test-plugin-host-retention-proto:30.3.0
com.android.tools.utp:android-test-plugin-host-retention-proto:30.3.1
com.android.tools.utp:android-test-plugin-host-retention-proto:30.4.2
com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.0.4
com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.2.1
com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.2.2
com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.3.0
com.android.tools:annotations:24.1.3
com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.3.1
com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.4.2
com.android.tools:annotations:24.3.1
com.android.tools:annotations:24.5.0
com.android.tools:annotations:26.0.0
@@ -370,10 +415,10 @@ com.android.tools:annotations:26.2.1
com.android.tools:annotations:26.3.1
com.android.tools:annotations:26.5.4
com.android.tools:annotations:27.1.0
com.android.tools:annotations:30.0.4
com.android.tools:annotations:30.2.1
com.android.tools:annotations:30.2.2
com.android.tools:annotations:30.3.0
com.android.tools:common:24.1.3
com.android.tools:annotations:30.3.1
com.android.tools:annotations:30.4.2
com.android.tools:common:24.3.1
com.android.tools:common:24.5.0
com.android.tools:common:26.0.0
@@ -382,10 +427,10 @@ com.android.tools:common:26.2.1
com.android.tools:common:26.3.1
com.android.tools:common:26.5.4
com.android.tools:common:27.1.0
com.android.tools:common:30.0.4
com.android.tools:common:30.2.1
com.android.tools:common:30.2.2
com.android.tools:common:30.3.0
com.android.tools:dvlib:24.1.3
com.android.tools:common:30.3.1
com.android.tools:common:30.4.2
com.android.tools:dvlib:24.3.1
com.android.tools:dvlib:24.5.0
com.android.tools:dvlib:26.0.0
@@ -394,19 +439,20 @@ com.android.tools:dvlib:26.2.1
com.android.tools:dvlib:26.3.1
com.android.tools:dvlib:26.5.4
com.android.tools:dvlib:27.1.0
com.android.tools:dvlib:30.0.4
com.android.tools:dvlib:30.2.1
com.android.tools:dvlib:30.2.2
com.android.tools:dvlib:30.3.0
com.android.tools:dvlib:30.3.1
com.android.tools:dvlib:30.4.2
com.android.tools:repository:26.0.0
com.android.tools:repository:26.0.1
com.android.tools:repository:26.2.1
com.android.tools:repository:26.3.1
com.android.tools:repository:26.5.4
com.android.tools:repository:27.1.0
com.android.tools:repository:30.0.4
com.android.tools:repository:30.2.1
com.android.tools:repository:30.2.2
com.android.tools:repository:30.3.0
com.android.tools:sdklib:24.1.3
com.android.tools:repository:30.3.1
com.android.tools:repository:30.4.2
com.android.tools:sdklib:24.3.1
com.android.tools:sdklib:24.5.0
com.android.tools:sdklib:26.0.0
@@ -415,10 +461,10 @@ com.android.tools:sdklib:26.2.1
com.android.tools:sdklib:26.3.1
com.android.tools:sdklib:26.5.4
com.android.tools:sdklib:27.1.0
com.android.tools:sdklib:30.0.4
com.android.tools:sdklib:30.2.1
com.android.tools:sdklib:30.2.2
com.android.tools:sdklib:30.3.0
com.android.tools:sdk-common:24.1.3
com.android.tools:sdklib:30.3.1
com.android.tools:sdklib:30.4.2
com.android.tools:sdk-common:24.3.1
com.android.tools:sdk-common:24.5.0
com.android.tools:sdk-common:26.0.0
@@ -427,17 +473,20 @@ com.android.tools:sdk-common:26.2.1
com.android.tools:sdk-common:26.3.1
com.android.tools:sdk-common:26.5.4
com.android.tools:sdk-common:27.1.0
com.android.tools:sdk-common:30.0.4
com.android.tools:sdk-common:30.2.1
com.android.tools:sdk-common:30.2.2
com.android.tools:sdk-common:30.3.0
com.android.tools:sdk-common:30.3.1
com.android.tools:sdk-common:30.4.2
com.android:signflinger:4.1.0
com.android:signflinger:7.0.4
com.android:signflinger:7.2.1
com.android:signflinger:7.2.2
com.android:signflinger:7.3.0
com.android:signflinger:7.3.1
com.android:signflinger:7.4.2
com.android:zipflinger:4.1.0
com.android:zipflinger:7.0.4
com.android:zipflinger:7.2.1
com.android:zipflinger:7.2.2
com.android:zipflinger:7.3.0
com.android:zipflinger:7.3.1
com.android:zipflinger:7.4.2
com.diffplug.durian:durian-collect:1.2.0
com.diffplug.durian:durian-core:1.2.0
com.diffplug.durian:durian-io:1.2.0
@@ -446,7 +495,7 @@ com.diffplug.spotless:spotless-lib:2.30.0
com.diffplug.spotless:spotless-plugin-gradle:6.11.0
com.drewnoakes:metadata-extractor:2.18.0
com.facebook.conceal:conceal:1.1.3
com.facebook.fbjni:fbjni-java-only:0.2.2
com.facebook.fbjni:fbjni:0.3.0
com.facebook.fresco:animated-base:2.5.0
com.facebook.fresco:animated-drawable:2.5.0
com.facebook.fresco:animated-gif:2.5.0
@@ -466,9 +515,11 @@ com.facebook.fresco:nativeimagetranscoder:2.5.0
com.facebook.fresco:soloader:2.5.0
com.facebook.fresco:ui-common:2.5.0
com.facebook.infer.annotation:infer-annotation:0.18.0
com.facebook.soloader:annotation:0.10.3
com.facebook.soloader:nativeloader:0.10.3
com.facebook.soloader:soloader:0.10.3
com.facebook.react:hermes-android:0.72.5
com.facebook.react:react-android:0.72.5
com.facebook.soloader:annotation:0.10.5
com.facebook.soloader:nativeloader:0.10.5
com.facebook.soloader:soloader:0.10.5
com.facebook.yoga:proguard-annotations:1.19.0
com.fasterxml.jackson.core:jackson-annotations:2.11.1
com.fasterxml.jackson.core:jackson-core:2.11.1
@@ -510,6 +561,7 @@ com.google.api.grpc:proto-google-common-protos:1.12.0
com.google.api.grpc:proto-google-common-protos:2.0.1
com.google.auto.value:auto-value-annotations:1.6.2
com.google.auto.value:auto-value-annotations:1.6.3
com.google.auto.value:auto-value-annotations:1.7.4
com.google.auto.value:auto-value:1.5.2
com.google.code.findbugs:jsr305:1.3.9
com.google.code.findbugs:jsr305:3.0.2
@@ -528,6 +580,7 @@ com.google.errorprone:error_prone_annotations:2.3.2
com.google.errorprone:error_prone_annotations:2.3.4
com.google.errorprone:error_prone_annotations:2.4.0
com.google.errorprone:error_prone_annotations:2.7.1
com.google.errorprone:error_prone_annotations:2.9.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
@@ -553,6 +606,7 @@ 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.protobuf:protobuf-java-util:3.4.0
com.google.protobuf:protobuf-java-util:3.10.0
com.google.protobuf:protobuf-java-util:3.17.2
@@ -560,13 +614,18 @@ com.google.protobuf:protobuf-java:3.0.0
com.google.protobuf:protobuf-java:3.4.0
com.google.protobuf:protobuf-java:3.10.0
com.google.protobuf:protobuf-java:3.17.2
com.google.testing.platform:core-proto:0.0.8-alpha04
com.google.testing.platform:core-proto:0.0.8-alpha07
com.google.testing.platform:core-proto:0.0.8-alpha08
com.google.test.platform:core-proto:0.0.2-dev
com.ibm.icu:icu4j:53.1
com.intellij:annotations:12.0
com.parse.bolts:bolts-tasks:1.4.0
com.squareup.okhttp3:okhttp-tls:4.9.2
com.squareup.okhttp3:okhttp-urlconnection:4.9.2
com.squareup.okhttp3:okhttp:4.9.2
com.squareup.okio:okio-metadata:2.8.0
com.squareup.okio:okio:2.8.0
com.squareup.okio:okio:2.9.0
com.squareup:javapoet:1.8.0
com.squareup:javapoet:1.10.0
@@ -634,16 +693,16 @@ junit:junit:4.12
junit:junit:4.13.2
me.zhanghai.android.materialprogressbar:library:1.4.2
net.bytebuddy:byte-buddy-agent:1.11.13
net.bytebuddy:byte-buddy-agent:1.11.19
net.bytebuddy:byte-buddy:1.11.13
net.bytebuddy:byte-buddy:1.11.19
net.java.dev.jna:jna-platform:5.6.0
net.java.dev.jna:jna:5.6.0
net.sf.jopt-simple:jopt-simple:4.9
net.sf.kxml:kxml2:2.3.0
net.sf.proguard:proguard-base:5.1
net.sf.proguard:proguard-base:5.2.1
net.sf.proguard:proguard-base:5.3.3
net.sf.proguard:proguard-base:6.0.3
net.sf.proguard:proguard-gradle:5.1
net.sf.proguard:proguard-gradle:5.2.1
net.sf.proguard:proguard-gradle:5.3.3
net.sf.proguard:proguard-gradle:6.0.3
@@ -680,6 +739,7 @@ org.bouncycastle:bcprov-jdk15on:1.48
org.bouncycastle:bcprov-jdk15on:1.56
org.bouncycastle:bcprov-jdk15on:1.60
org.bouncycastle:bcprov-jdk15on:1.67
org.bouncycastle:bcprov-jdk15on:1.68
org.checkerframework:checker-qual:2.5.2
org.checkerframework:checker-qual:2.8.1
org.checkerframework:checker-qual:2.11.1
@@ -693,10 +753,10 @@ org.codehaus.mojo:animal-sniffer-annotations:1.18
org.codehaus.mojo:animal-sniffer-annotations:1.19
org.codehaus.woodstox:stax2-api:4.2.1
org.conscrypt:conscrypt-android:2.0.0
org.eclipse.jdt.core.compiler:ecj:4.4
org.eclipse.jdt.core.compiler:ecj:4.4.2
org.eclipse.jdt.core.compiler:ecj:4.6.1
org.eclipse.jgit:org.eclipse.jgit:5.13.1.202206130422-r
org.fusesource.jansi:jansi:1.18
org.glassfish.jaxb:jaxb-core:2.2.11
org.glassfish.jaxb:jaxb-runtime:2.2.11
org.glassfish.jaxb:jaxb-runtime:2.3.1
@@ -705,12 +765,13 @@ org.glassfish.jaxb:txw2:2.2.11
org.glassfish.jaxb:txw2:2.3.1
org.glassfish.jaxb:txw2:2.3.2
org.hamcrest:hamcrest-core:1.3
org.jacoco:org.jacoco.agent:0.8.7
org.jacoco:org.jacoco.ant:0.8.7
org.hamcrest:hamcrest:2.2
org.jacoco:org.jacoco.agent:0.8.8
org.jacoco:org.jacoco.ant:0.8.8
org.jacoco:org.jacoco.core:0.7.4.201502262128
org.jacoco:org.jacoco.core:0.8.7
org.jacoco:org.jacoco.core:0.8.8
org.jacoco:org.jacoco.report:0.7.4.201502262128
org.jacoco:org.jacoco.report:0.8.7
org.jacoco:org.jacoco.report:0.8.8
org.jdom:jdom2:2.0.6
org.jetbrains.dokka:dokka-core:1.4.32
org.jetbrains.intellij.deps:trove4j:1.0.20181211
@@ -722,68 +783,98 @@ org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.0
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.2
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2
org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.6.20
org.jetbrains.kotlin:kotlin-android-extensions:1.6.20
org.jetbrains.kotlin:kotlin-android-extensions:1.9.0
org.jetbrains.kotlin:kotlin-annotations-jvm:1.3.72
org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.6.20
org.jetbrains.kotlin:kotlin-build-common:1.6.20
org.jetbrains.kotlin:kotlin-build-tools-api:1.9.0
org.jetbrains.kotlin:kotlin-build-tools-impl:1.9.0
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.6.20
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.9.0
org.jetbrains.kotlin:kotlin-compiler-runner:1.6.20
org.jetbrains.kotlin:kotlin-compiler-runner:1.9.0
org.jetbrains.kotlin:kotlin-daemon-client:1.6.20
org.jetbrains.kotlin:kotlin-daemon-client:1.9.0
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.6.20
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.9.0
org.jetbrains.kotlin:kotlin-gradle-plugins-bom:1.9.0
org.jetbrains.kotlin:kotlin-gradle-plugin-annotations:1.9.0
org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.6.20
org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.9.0
org.jetbrains.kotlin:kotlin-gradle-plugin-idea-proto:1.9.0
org.jetbrains.kotlin:kotlin-gradle-plugin-idea:1.9.0
org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.6.20
org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.9.0
org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.20
org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0
org.jetbrains.kotlin:kotlin-klib-commonizer-api:1.6.20
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:1.6.20
org.jetbrains.kotlin:kotlin-klib-commonizer-api:1.9.0
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:1.9.0
org.jetbrains.kotlin:kotlin-native-utils:1.6.20
org.jetbrains.kotlin:kotlin-native-utils:1.9.0
org.jetbrains.kotlin:kotlin-project-model:1.6.20
org.jetbrains.kotlin:kotlin-project-model:1.9.0
org.jetbrains.kotlin:kotlin-reflect:1.1.3-2
org.jetbrains.kotlin:kotlin-reflect:1.2.0
org.jetbrains.kotlin:kotlin-reflect:1.3.20
org.jetbrains.kotlin:kotlin-reflect:1.3.50
org.jetbrains.kotlin:kotlin-reflect:1.3.72
org.jetbrains.kotlin:kotlin-reflect:1.4.32
org.jetbrains.kotlin:kotlin-reflect:1.5.31
org.jetbrains.kotlin:kotlin-reflect:1.6.20
org.jetbrains.kotlin:kotlin-reflect:1.6.10
org.jetbrains.kotlin:kotlin-reflect:1.7.10
org.jetbrains.kotlin:kotlin-scripting-common:1.6.20
org.jetbrains.kotlin:kotlin-scripting-common:1.9.0
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.6.20
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.9.0
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.6.20
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.9.0
org.jetbrains.kotlin:kotlin-scripting-jvm:1.6.20
org.jetbrains.kotlin:kotlin-script-runtime:1.6.20
org.jetbrains.kotlin:kotlin-scripting-jvm:1.9.0
org.jetbrains.kotlin:kotlin-script-runtime:1.9.0
org.jetbrains.kotlin:kotlin-stdlib-common:1.2.71
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.20
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.50
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.72
org.jetbrains.kotlin:kotlin-stdlib-common:1.4.32
org.jetbrains.kotlin:kotlin-stdlib-common:1.5.31
org.jetbrains.kotlin:kotlin-stdlib-common:1.6.10
org.jetbrains.kotlin:kotlin-stdlib-common:1.6.20
org.jetbrains.kotlin:kotlin-stdlib-common:1.6.21
org.jetbrains.kotlin:kotlin-stdlib-common:1.7.22
org.jetbrains.kotlin:kotlin-stdlib-common:1.9.0
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.71
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.20
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.50
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.32
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.10
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.20
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.22
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.0
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.2.71
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.20
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.50
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.72
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.32
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.20
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.22
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.0
org.jetbrains.kotlin:kotlin-stdlib:1.1.3-2
org.jetbrains.kotlin:kotlin-stdlib:1.2.71
org.jetbrains.kotlin:kotlin-stdlib:1.3.20
org.jetbrains.kotlin:kotlin-stdlib:1.3.50
org.jetbrains.kotlin:kotlin-stdlib:1.3.72
org.jetbrains.kotlin:kotlin-stdlib:1.4.32
org.jetbrains.kotlin:kotlin-stdlib:1.5.31
org.jetbrains.kotlin:kotlin-stdlib:1.6.10
org.jetbrains.kotlin:kotlin-stdlib:1.6.20
org.jetbrains.kotlin:kotlin-stdlib:1.6.21
org.jetbrains.kotlin:kotlin-stdlib:1.7.22
org.jetbrains.kotlin:kotlin-stdlib:1.9.0
org.jetbrains.kotlin:kotlin-tooling-core:1.9.0
org.jetbrains.kotlin:kotlin-tooling-metadata:1.6.20
org.jetbrains.kotlin:kotlin-util-io:1.6.20
org.jetbrains.kotlin:kotlin-util-io:1.9.0
org.jetbrains.kotlin:kotlin-util-klib:1.6.20
org.jetbrains.kotlin:kotlin-util-klib:1.9.0
org.jetbrains.trove4j:trove4j:20160824
org.jetbrains:annotations:13.0
org.jetbrains:markdown-jvm:0.2.1
@@ -794,37 +885,62 @@ org.jvnet.staxex:stax-ex:1.7.7
org.jvnet.staxex:stax-ex:1.8
org.jvnet.staxex:stax-ex:1.8.1
org.mockito:mockito-core:3.12.4
org.mockito:mockito-core:4.0.0
org.mockito:mockito-inline:4.0.0
org.objenesis:objenesis:3.2
org.ow2.asm:asm-analysis:5.0.3
org.ow2.asm:asm-analysis:5.1
org.ow2.asm:asm-analysis:6.0
org.ow2.asm:asm-analysis:7.0
org.ow2.asm:asm-analysis:9.1
org.ow2.asm:asm-analysis:9.2
org.ow2.asm:asm-commons:5.1
org.ow2.asm:asm-commons:6.0
org.ow2.asm:asm-commons:7.0
org.ow2.asm:asm-commons:9.1
org.ow2.asm:asm-commons:9.2
org.ow2.asm:asm-debug-all:5.0.1
org.ow2.asm:asm-tree:5.0.3
org.ow2.asm:asm-tree:5.1
org.ow2.asm:asm-tree:6.0
org.ow2.asm:asm-tree:7.0
org.ow2.asm:asm-tree:9.1
org.ow2.asm:asm-tree:9.2
org.ow2.asm:asm-util:5.1
org.ow2.asm:asm-util:6.0
org.ow2.asm:asm-util:7.0
org.ow2.asm:asm-util:9.1
org.ow2.asm:asm-util:9.2
org.ow2.asm:asm:5.0.3
org.ow2.asm:asm:5.1
org.ow2.asm:asm:6.0
org.ow2.asm:asm:7.0
org.ow2.asm:asm:9.1
org.ow2.asm:asm:9.2
org.robolectric:annotations:4.7.3
org.robolectric:junit:4.7.3
org.robolectric:nativeruntime:4.7.3
org.robolectric:pluginapi:4.7.3
org.robolectric:plugins-maven-dependency-resolver:4.7.3
org.robolectric:resources:4.7.3
org.robolectric:robolectric:4.7.3
org.robolectric:sandbox:4.7.3
org.robolectric:shadowapi:4.7.3
org.robolectric:shadows-framework:4.7.3
org.robolectric:utils-reflector:4.7.3
org.robolectric:utils:4.7.3
org.slf4j:slf4j-api:1.7.30
org.tensorflow:tensorflow-lite-metadata:0.1.0-rc1
org.tensorflow:tensorflow-lite-metadata:0.1.0-rc2
xerces:xercesImpl:2.12.0
xml-apis:xml-apis:1.4.01
org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.6.10
com.android.tools.build:gradle:1.3.1
com.squareup.okio:okio:1.13.0
com.squareup.okio:okio:1.15.0
com.squareup.okhttp3:okhttp:3.12.1
org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.7.22
com.android.tools.lint:lint-gradle:30.4.2
com.android.tools.build:gradle:7.4.2
com.android.tools.build:aapt2:7.4.2-8841542
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2
com.android.tools.lint:lint-gradle:30.2.2
com.android.tools.build:gradle:7.0.4
org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.9.0
+268 -167
View File
File diff suppressed because it is too large Load Diff
+9 -3
View File
@@ -42,10 +42,16 @@ function gen_deps_list() {
# https://github.com/status-im/status-mobile/issues/15447
function add_deps_hack() {
echo -n \
'org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.6.10
'com.android.tools.build:gradle:1.3.1
com.squareup.okio:okio:1.13.0
com.squareup.okio:okio:1.15.0
com.squareup.okhttp3:okhttp:3.12.1
org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.7.22
com.android.tools.lint:lint-gradle:30.4.2
com.android.tools.build:gradle:7.4.2
com.android.tools.build:aapt2:7.4.2-8841542
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2
com.android.tools.lint:lint-gradle:30.2.2
com.android.tools.build:gradle:7.0.4' \
org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.9.0' \
>> "${DEPS_LIST}"
}
+3 -2
View File
@@ -25,8 +25,9 @@ function findPackage(line, regex) {
# Lines after configuration name list packages
for (getline line; line != ""; getline line) {
# React Native is provided by node_modules
if (line ~ "com.facebook.react:(react-native|hermes-engine)") { continue }
# JavaScript Core (JSC) is provided by node_modules
if (line ~ "org.webkit:android-jsc") { continue }
# Example: +--- org.jetbrains.kotlin:kotlin-stdlib:1.3.50
if (findPackage(line, "--- ([^ :]+):([^ :]+):([^ :]+)$")) {
+1 -1
View File
@@ -4,8 +4,8 @@ react-native-background-timer
react-native-blob-util
react-native-blur
react-native-camera-kit
react-native-camera-roll_camera-roll
react-native-community_audio-toolkit
react-native-community_cameraroll
react-native-community_clipboard
react-native-community_masked-view
react-native-community_netinfo
+35 -40
View File
@@ -10,10 +10,10 @@ stdenv.mkDerivation {
"unpackPhase"
"patchGradlePhase"
"patchBuildIdPhase"
"patchHermesPhase"
"patchJavaPhase"
"patchReactNativePhase"
"patchPodPhase"
"patchKeyChainPhase"
"patchGlogPhase"
"patchBoostPodSpec"
"patchReactAndroidPhase"
"installPhase"
];
@@ -49,24 +49,12 @@ stdenv.mkDerivation {
${patchMavenSources} $modBuildGradle
done
'';
# Do not add a BuildId to the generated libraries, for reproducibility
patchBuildIdPhase = ''
substituteInPlace ./node_modules/react-native/ReactAndroid/src/main/jni/Application.mk --replace \
'-Wl,--build-id' \
'-Wl,--build-id=none'
'';
# Fix bugs in Hermes usage:
# https://github.com/facebook/react-native/issues/25601#issuecomment-510856047
# - Make PR builds also count as release builds
# - Fix issue where hermes command is being called with same input/output file
patchHermesPhase = ''
substituteInPlace ./node_modules/react-native/react.gradle --replace \
'targetName.toLowerCase().contains("release")' \
'!targetName.toLowerCase().contains("debug")'
'';
# Patch Java files in modules which are not yet ported to AndroidX
patchJavaPhase = ''
${nodejs}/bin/node ./node_modules/jetifier/bin/jetify
substituteInPlace ./node_modules/react-native/ReactAndroid/src/main/jni/CMakeLists.txt --replace \
'-Wl,--build-id' \
'-Wl,--build-id=none'
'';
installPhase = ''
@@ -74,28 +62,35 @@ stdenv.mkDerivation {
cp -R node_modules $out/
'';
# Fix glog configuration issue in react-native:
# https://github.com/facebook/react-native/issues/33966
# TODO: remove this patch when we reach react-native 0.71.4
patchReactNativePhase = ''
substituteInPlace ./node_modules/react-native/scripts/ios-configure-glog.sh --replace \
'sed -i' \
'sed -i.bak -e'
substituteInPlace ./node_modules/react-native/scripts/ios-configure-glog.sh --replace \
'src/glog/logging.h.in' \
'src/glog/logging.h.in && rm src/glog/logging.h.in.bak'
substituteInPlace ./node_modules/react-native/scripts/ios-configure-glog.sh --replace \
'src/config.h.in' \
'src/config.h.in && rm src/config.h.in.bak'
# Remove gradle-test-logger-plugin:
# https://github.com/oblador/react-native-keychain/issues/595
# TODO: remove this patch when we this library fixes above issue
patchKeyChainPhase = ''
sed -i -e '/classpath/d' \
-e '/apply plugin: "com\.adarshr\.test-logger"/d' \
./node_modules/react-native-keychain/android/build.gradle
'';
# Fix pod issue in react-native 0.67.5:
# https://stackoverflow.com/questions/71248072/no-member-named-cancelbuttontintcolor-in-jsnativeactionsheetmanagerspecsh
# TODO: remove this patch when maybe after 0.68.5
patchPodPhase = ''
substituteInPlace ./node_modules/react-native/React/CoreModules/RCTActionSheetManager.mm --replace \
'[RCTConvert UIColor:options.cancelButtonTintColor() ? @(*options.cancelButtonTintColor()) : nil];' \
'[RCTConvert UIColor:options.tintColor() ? @(*options.tintColor()) : nil];'
# Fix pod issue after upgrading to MacOS Sonoma and Xcode 15
# https://github.com/status-im/status-mobile/issues/17682
patchGlogPhase = ''
substituteInPlace ./node_modules/react-native/scripts/ios-configure-glog.sh \
--replace 'export CC="' '#export CC="' \
--replace 'export CXX="' '#export CXX="'
'';
# to fix pod checksum issue : https://github.com/facebook/react-native/issues/42180
# TODO remove this patch after upgrading to react-native 0.73.2
patchBoostPodSpec = ''
substituteInPlace ./node_modules/react-native/third-party-podspecs/boost.podspec \
--replace 'https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2' \
'https://sourceforge.net/projects/boost/files/boost/1.76.0/boost_1_76_0.tar.bz2' \
'';
patchReactAndroidPhase = ''
substituteInPlace ./node_modules/react-native/ReactAndroid/hermes-engine/build.gradle \
--replace 'src("https://github.com/facebook/hermes/tarball/''${hermesVersion}")' \
'src("https://github.com/siddarthkay/hermes/tarball/bump-max-native-stack-depth")' \
'';
# The ELF types are incompatible with the host platform, so let's not even try
+1 -1
View File
@@ -3,6 +3,6 @@ name: default: let
logEnvOverride = value:
builtins.trace "getEnvWithDefault ${name} (default: ${toString default}): ${value}" value;
in
if envOverride != ""
if envOverride != "" && envOverride != default
then logEnvOverride envOverride
else default
+3 -3
View File
@@ -35,9 +35,9 @@ let
envFileName =
if androidAbiInclude == "x86" then ".env.e2e"
else if (elem buildType ["release" "nightly"]) then ".env.${buildType}"
else if (elem buildType ["pr" "manual"]) then ".env.jenkins"
if (elem androidAbiInclude ["x86" "x86_64" "x86;x86_64"]) then ".env.e2e"
else if (elem buildType ["release" "nightly"]) then ".env.${buildType}"
else if (elem buildType ["pr" "manual"]) then ".env.jenkins"
else ".env";
# There are only two types of Gradle build targets: pr and release
+1
View File
@@ -21,6 +21,7 @@ in {
xcodeWrapper watchman procps
flock # used in nix/scripts/node_modules.sh
ios-deploy # used in 'make run-ios-device'
xcbeautify # used in 'make run-ios'
];
# WARNING: Executes shellHook in reverse order.
+4 -2
View File
@@ -63,16 +63,17 @@ in {
};
# Package version adjustments
gradle = super.gradle_7;
gradle = super.gradle_8;
nodejs = super.nodejs-18_x;
ruby = super.ruby_3_1;
yarn = super.yarn.override { nodejs = super.nodejs-18_x; };
openjdk = super.openjdk11_headless;
xcodeWrapper = super.xcodeenv.composeXcodeWrapper {
version = "14.0";
version = "15.0";
allowHigher = true;
};
go = super.go_1_19;
clang = super.clang_15;
buildGoPackage = super.buildGo119Package;
buildGoModule = super.buildGo119Module;
gomobile = (super.gomobile.overrideAttrs (old: {
@@ -95,4 +96,5 @@ in {
aapt2 = callPackage ./pkgs/aapt2 { };
patchMavenSources = callPackage ./pkgs/patch-maven-srcs { };
goMavenResolver = callPackage ./pkgs/go-maven-resolver { };
xcbeautify = callPackage ./pkgs/xcbeautify { };
}
+6 -6
View File
@@ -10,7 +10,7 @@ let
pname = "aapt2";
# Warning: This must be the same as gradlePluginVersion android/gradle.properties
version = "7.2.2-7984345";
version = "7.4.2-8841542";
pkgPath = "com/android/tools/build/aapt2";
repoUrl = "https://dl.google.com/dl/android/maven2";
@@ -29,20 +29,20 @@ let
jar = fetchurl {
url = "${repoUrl}/${pkgPath}/${version}/${filenames.jar}";
sha256 = getAttr platform {
linux = "sha256-BKtK5f7lxp0YdQU4AFGL933vjEAykQ1RiKpDwfc32oI=";
osx = "sha256-OORgWnGQS0GwqZrSg8sFQb4FM23hrYHwmarcYd8EO/0=";
linux = "sha256-bHKE8i7QbE0UFgn1TW4gzPj7MBV7t/PVo+Txd6jW0wE=";
osx = "sha256-Gmm9dnu2+OccqfqsUiKeanc4FNNkk7lCO0YAoxACjl0=";
};
};
sha = fetchurl {
url = "${repoUrl}/${pkgPath}/${version}/${filenames.jar}.sha1";
sha256 = getAttr platform {
linux = "sha256-4F4REWQLj8hdnh1tIwRVgdWJjUBhvvINP56nIscwePA=";
osx = "sha256-n0jFUphzlFnNacolbXoNmNHs/hXfktVpYRlJ1JW9ukU=";
linux = "sha256-mSbHKU3snj5NTg3MN37pmVnVnYRKI9yoMVNJGuUXTso=";
osx = "sha256-V/t81ELdzRFoMPSD8wSgbtdQgmUkkOdqRu2iqKIeNVg=";
};
};
pom = fetchurl {
url = "${repoUrl}/${pkgPath}/${version}/${filenames.pom}";
sha256 = "sha256-XWEn9Zvxv0hgYU2yUSlZ4OiguZy1bz+Gh0wRrm4d9GQ=";
sha256 = "sha256-9gY2kGJqgVcd1T3UOzYM+xoPug/eGBRUF+cA6Fu9ZRw=";
};
};
+4 -4
View File
@@ -14,10 +14,10 @@ androidenv.composeAndroidPackages {
cmdLineToolsVersion = "9.0";
toolsVersion = "26.1.1";
platformToolsVersion = "33.0.3";
buildToolsVersions = [ "31.0.0" ];
platformVersions = [ "31" ];
cmakeVersions = [ "3.18.1" ];
ndkVersion = "22.1.7171670";
buildToolsVersions = [ "33.0.0" ];
platformVersions = [ "33" ];
cmakeVersions = [ "3.22.1" ];
ndkVersion = "25.2.9519653";
includeNDK = true;
includeExtras = [
"extras;android;m2repository"

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