Commit Graph

351 Commits

Author SHA1 Message Date
Mohsen 389a730eff
[#19946] feat: add key pair QR code view (#20073) 2024-05-20 19:35:51 +03:00
Siddarth Kumar cb9a620f40
fix: hack fix for contract tests on MacOS (#19965)
fixes #19802

Contract Tests are failing with missing symbols runtime error on `MacOS` after `golang` version was upgraded to 1.20
A simple hack fix such a case is to use `go 1.19` only to build the status-go library that is used specifically for these integration tests.
Its ugly but it works and unblocks devs from running tests locally.

- execute `make test-contract` on MacOS and it should not fail.

not needed since this impacts only the integration tests.

- macOS

status: ready
2024-05-10 17:58:49 +05:30
Siddarth Kumar a68b2f357d
fix: node-pre-gyp warning (#19960)
## Summary

any `yarn` command calls `node-pre-gyp rebuild` which prints out this warning message :

```
make[1]: Entering directory '/Users/siddarthkumar/code/experiments/status-mobile/build'
  CXX(target) Release/obj.target/status_nodejs_addon/modules/react-native-status/nodejs/status.o
../modules/react-native-status/nodejs/status.cpp:1153:11: warning: ignoring return value of function
declared with 'warn_unused_result' attribute [-Wunused-result]
          func->Call(isolate->GetCurrentContext(), v8::Null(isolate), argc, argv);
          ^~~~ ~~~~~~~~~~~~~
1 warning generated.
```

This happens due to return value of `func->Call` here :
52a6f5c17d/modules/react-native-status/nodejs/status.cpp (L1153)
not being used.
Which is not a huge red flag but produces a warning which is not nice when looking at logs and can be sometimes misleading for other devs.

This commit fixes that warning by assigning return value of that function and checking if its empty or not.

## Testing notes
not needed since this impacts only the integration tests.

## Platforms
- macOS

status: ready
2024-05-10 17:06:45 +05:30
frank ce3d32dc0a
refactor(local pair sync)_: move partial config to backend (#19753)
cba3ac57...90b18d4f
2024-04-25 12:13:52 +08:00
Siddarth Kumar 9db49b8ca0
move rn-mail code to our native modules (#19760)
In this commit we nuke the unmaintained library `react-native-mail` and move over the logic to our native modules.
This also helps to fix `make nix-update-gradle` which would fail because of that library.

- Android
- iOS

status: ready
2024-04-24 11:55:40 +02:00
Icaro Motta 01a503f3bf
Log signals from the Clojure layer instead of native code (#19683)
We log the entire signal data when it arrives from status-go in the native
layer, where our Clojure logging mechanism is unavailable. Sometimes, the
developer may not want that much noise during development, e.g. when managing
integration or contract tests.

This commit removes the native calls to log signals and adds a timbre
(log/debug ...) call in the event handler :signals/signal-received. We know
timbre will elide log calls at compile time given the minimum log level set,
therefore, we don't need to worry about performance because we will log signals
at the debug level only.
2024-04-23 09:53:07 -03:00
Siddarth Kumar f6a433c818
kotlinify account, database, Log & Network Manager (#19426)
parent issue: https://github.com/status-im/status-mobile/issues/18310

This commit converts the following `Java` files to `Kotlin` :

- modules/react-native-status/android/src/main/java/im/status/ethereum/module/AccountManager.java
- modules/react-native-status/android/src/main/java/im/status/ethereum/module/DatabaseManager.java
- modules/react-native-status/android/src/main/java/im/status/ethereum/module/LogManager.java
- modules/react-native-status/android/src/main/java/im/status/ethereum/module/NetworkManager.java


status: ready
2024-04-10 20:32:56 +05:30
Siddarth Kumar 55a182f430
kotlinify parts of status module, package & Utils (#19408)
parent issue: https://github.com/status-im/status-mobile/issues/18310

This commit converts the following `Java` files to `Kotlin` :

- modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.java
- modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusPackage.java
- modules/react-native-status/android/src/main/java/im/status/ethereum/module/Utils.java

This commit converts Java code to `Kotlin` which involves a helper function that is used to execute `statusgo` methods.
It may impact everything or nothing.

- Android
2024-04-08 22:46:01 +05:30
Siddarth Kumar a716f4e435
upgrade `react-native` to 0.73.5 (#18563)
fixes #18291

## Summary
Changes worth mentioning are :
- More hacks/patches
- Force app to use `Java 17` everywhere to compile `kotlin,java`
- `gems` were upgraded after a long time
- `aapt2` was bumped to `8.1.1`
- `metro` is now at `0.80.4`
- `xcbeautify` was bumped to `1.4.0`
- `@react-native-community/clipboard` lib was replaced with `@react-native-clipboard/clipboard`
- `react-native-dialogs` lib was upgraded to `1.1.2`
- `react-native-gesture-handler` lib was upgraded to `2.14.1`
- `react-native-navigation` was upgraded to `7.37.2`

## Platforms
- Android
- iOS
2024-03-22 19:51:44 +05:30
Flavio Fraschetti 0828e9aa55
Fraschetti/18343 - Add contract test for wallet_getDerivedAddresses and move legacy code
Add contract test for wallet_getDerivedAddresses and move legacy code
2024-03-12 13:21:23 -03:00
Omar Basem 28f43acb83
feat: new keypair: mnemonic, address, KP name screen (#18790)
feat: new keypair: mnemonic, address, KP name screen (#18790)
2024-02-21 15:53:14 +04:00
Alexander 49567596da
General QR code scanner flow (#18677)
* QR scanner

* More options for QR

* Router fixes

* Updates for `on-qr-code-scanned`

* Update for communities

* Updates

* Scan profile path

* More fixes

* Last fixes for scanning

* Fixes

* Fixes

* Fixes

* Test fixes

* Fixes

* Updated Utils.m

* Test fix
2024-02-16 12:06:28 +01: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
Omar Basem 0e4c1b3c17
refactor: kotlinify log (#18337)
refactor: kotlinify log
2024-01-10 09:05:35 +04:00
Omar Basem 3ff6013127
kotlinify thread pool (#18366)
chore: Kotlinify thread pool
2024-01-09 14:35:39 +04: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
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

90c31afe...1adcf02f
2023-12-20 13:04:29 +00:00
Alexander dc571b6067
Getting rid of status-im.multiaccounts.core + removing three word random names (#17384) 2023-11-06 14:38:14 +01:00
Andrea Maria Piana 155f57ca6b
Dont parse unused identicon 2023-09-06 14:09:37 +01:00
Siddarth Kumar ac3b3970f2
fix crash (#16812) 2023-07-28 21:10:12 +05:30
Siddarth Kumar 1c405d3ed9
chore: wire up `startSearchForLocalPairingPeers` (#16803)
This commit initialises the status-go method `startSearchForLocalPairingPeers` which in turn will produce logs that are important for peer discovery while local pairing and will produce logs important to detect local pairing crashes.
2023-07-28 15:22:58 +05:30
frank 02d45fa06f
discard backup message when recovering account (#16748)
* discard backup message when recovering account

* fix test failed

* update status-go-version.json
2023-07-25 15:03:57 +08:00
flexsurfer 4decba8d00
multiaccounts refactoring S3, refactor keychain and touchid, move and refactor create/recover/login profile (#16448)
* multiaccounts refactoring S3 E1, refactor keychain and touchid,simplify app init flow, refactor biometric flow
* S3 E2 move and refactor create/recover/login methods
2023-07-06 11:25:57 +02:00
Icaro Motta 19ca8e28a5
Lint and fix missing trailing newlines (#16445)
Apply the Clojure Style Guide recommendation to end files with proper lines
(having a trailing newline character). See
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
2023-07-04 19:40:13 +00:00
Roman Volosovskyi b953ddb5af
[#15944] Set installation name on account creation 2023-06-29 14:06:23 +02:00
frank db44ee67e6
init status-go logging once app start up (#16325)
4cc53630...7da1ed38
2023-06-22 07:45:55 +08:00
Andrea Maria Piana 66cd3edf7f
Use new login endpoint
47711c4f...47711c4f

This commit changes the login endpoint so that it uses LoginAccount.
The main difference is that is consistent with the two others we use for
creation/importing, and this will override the networks and use the
secrets provided.
2023-06-20 16:51:15 +01:00
Rahul Pratap c80992b6bf
Update prettier config for the project. (#16303)
* Update prettier config for the project.

* Add prettier to make lint-fix.
2023-06-19 19:09:12 +05:30
Mohamed Javid 2df1b46975
[iOS] Perform preflight check for local network permission (#16150)
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2023-06-09 15:55:15 +05:30
Mohamed Javid c5166ac48e
[Fix] Open app on push notification tap (#16136)
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2023-06-02 18:03:27 +05:30
frank c275205bed
Adapt to status-go backend changes for ConvertToKeycardAccount (#15846) 2023-05-09 20:51:08 +08:00
Siddarth Kumar 3bd4038089
Upgrade `react-native` from 0.63.3 to 0.67.5 (#15486)
* [IOS Only] react-native 0.63 to 0.67

* [Android Only] react-native 0.63 to 0.67

* bring back all the jenkinsfiles

* make auto-complete prop for text-input compatible

* [IOS Only] react-native 0.63 to 0.67

* [Android Only] react-native 0.63 to 0.67

* bring back all the jenkinsfiles

* nix: drop unnecessary set -x from status-go build

Signed-off-by: Jakub Sokołowski <jakub@status.im>

* add explicity implementation line for soloader

And add deleteDebugFilesForVariant fix for libhermes.

Signed-off-by: Jakub Sokołowski <jakub@status.im>

* use fast-image for link previews

* fix extra line in message composer on android

This elevation prop is un-necessary and causes an extra line to appear which looks like a border but its actually a shadow.

* don't use `fast-image` for url preview favicon

* fix audio record button interfering cancel android

This fix was not needed in react-native 0.63.4 but is needed after we upgraded to 0.67.5

* get rid of unused platform import

---------
Co-authored-by: Jakub Sokołowski <jakub@status.im>
2023-04-12 15:25:19 +05:30
Andrea Maria Piana f744d761c0
Set log directory correctly
bb6139ae...b38b3817
2023-03-30 13:54:29 +01:00
Jamie Caprani 2f19badc6c
Add seed phrase flow & customization color 2023-03-24 14:24:18 +00:00
frank 45da51bea6
changes corresponding to refactor of local pair of status-go (PR #3248) (#15412) 2023-03-23 20:23:26 +08:00
Jamie Caprani a502da6ea4
9c1c01c6...48eb7052 (#15401)
feat: add create profile to onboarding
2023-03-22 06:51:38 -07:00
Vitaliy Vlasov 9959d537f3
Emoji hash is now in settings
Signed-off-by: Vitaliy Vlasov <siphiuel@protonmail.com>
2023-03-06 13:27:15 +02:00
frank 900688dc15
feat: pass node config/kdf to status-go when local pairing (#15072)
4cc53630...8ff91ba0
2023-02-17 21:40:27 +08:00
Siddarth Kumar d1514ec52d
fetch emoji hash for profile (#14987)
* add emoji-hash to app-db post login
2023-02-10 16:32:46 +05:30
Roman Volosovskyi db417cb3a3
fix compatibility with ConvertToKeycardAccount after recent changes 2023-02-02 12:15:38 +01:00
Andrea Maria Piana 0fd2783774
Update status-go and temporary fix for keycard 2023-01-30 16:45:23 +00:00
Siddarth Kumar bb4a4207df
abstract running code in separate thread for native java modules (#14690)
This commit adds a new helper method `executeRunnableStatusGoMethod`
The helper method accepts arguments and calls the status go method in a new thread.
2023-01-05 14:42:39 +05:30
Siddarth Kumar ec15232af8
Make sure mobile understands community share link by Desktop (#14679)
* we are now able to navigate to desktop communities

b4bdfd3d...d2e95eee

In this commit we add support for various status-go methods in mobile :
- `multiformatSerializePublicKey`
- `multiformatDeserializePublicKey`
- `compressPublicKey`
- `decompressPublicKey`
- and my personal favourite `deserializeAndCompressKey`

When someone pastes a community joining share url into chat and taps on it, we check whether the community was generated on a desktop or mobile.
We need to do this because currently both the clients have different urls for joining a community.

Once we have identified that the url is generated via desktop we then convert that url to something that the mobile client is used to.
This enables the mobile client to view this community and interact with it.

However more work needs to be done in the future to ensure that mobile implements these compressed keys end to end, we need to get this feature in so that
by the time RC1 is released mobile client is able to join communities created by Desktop.
2023-01-04 18:24:11 +05:30
Siddarth Kumar 3fa6112669
PR for to ensure native modules are compiled with java version 8 (#14693)
* explicitly mentioning which version of java to use
* fix indentation of closing bracket
2023-01-03 21:30:34 +05:30
Siddarth Kumar 7b72391e60
remove comment blocks which are not useful (#14563)
Adding a series of // characters (i.e., a "comment bar") above every method in an Objective-C file would not provide any real benefit, and would in fact be redundant, as the method list in Xcode already serves as a visual separator for methods in a class.
The #pragma mark directive,  is a more concise and effective way to add separators and group related methods in a class. We should use #pragma mark to create a separator line and add a heading to describe the methods in a particular section.
2022-12-16 22:39:39 +05:30
Siddarth Kumar fc07fbf787
UI for mobile to mobile local pairing - updated (#14514)
* ui for local pairing

lint-fix

removed un-necessary +

addressing some of the feedback on PR

more feedback + removing feature toggle from ui

getting rid of comments/log messages over here

tidy up logs

fix typos and more i18n stuff

swap % with a named parameter

getting rid of global state + lint-fix

get rid of un-used function

icon guidelines and more kebab case stuff :>

moving stuff to events and utils namespace

:main-icons -> :i :)

address feedback and adhere to guidelines etc

fixed the :t/ qualification

moree feedback :-D

referring status-im.utils.security for now

adding "cs" to constants

make tests pass

re-frame to rf

addressing feedback

moving icons to icons2 & renaming stuff

trying to make this file the way it was before

missed out on updating these references

getting rid of the icons moved to icons2

This reverts commit be8552c0d3daaf7a7333cfeaf304d97c86d50d3e.

fixing mistakes

getting rid of the s

* this rename makes sense to me

* adding an alias to the view

* fixed broken up namespaces
2022-12-16 18:40:56 +05:30
frank 32d85d5059
Allow styling text in composer when selecting it with native actions (#14249) 2022-11-23 10:28:44 +08:00
frank 7ac2e1aa20
replace web3-utils methods usage by status-go (#13940)
Signed-off-by: frank <lovefree103@gmail.com>
2022-10-19 00:05:07 +08:00
Roman Volosovskyi 5f98e96d23
Use a single geth.log file for all networks on iOS 2022-10-09 16:09:18 +02:00
Roman Volosovskyi 8dd75205f3
[#14021] Add goerli geth.log to logs archive on iOS 2022-10-04 13:33:33 +02:00