Resolved the scrolling issue pertaining to community rules. Additionally, will ensure compatibility with iOS devices lacking safe-area-view in the follow-up.
Fixes
- 'Confirm changes' button unexpected enabled state
- The Confirm button remains enabled even after deselecting all addresses when the user has watch-only wallet accounts.
- Disable the Confirm button when the user deselects the accounts with the token required to join.
- Use community color for address checkbox
* 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
This commit fixes the broken wallet account emoji when syncing devices by adding a sanitization method for the wallet account emoji. The desktop can handle both variants (raw emoji and img tag); this PR adds the same for mobile.
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
This commit adds network filter UI in the Wallet home and account screens.
---------
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
c15f9e73...1ea2bd99
This PR reduces the amount of rendering in community overview.
It limits the amount of data is passed to components to the necessary,
and it creates functions on component initialization so that they won't
cause a re-render.
Performance of the header are very noticeably better on my local
environment, though on nightly builds is less noticeable.
It also removes data from `communities/communities id` as that cause a
re-render of any component subscribed to it.
c15f9e73...b7b7660a
There were a few issues with the permission screen:
1) Wrong permission was displayed when able to join
2) If not able to join, we were showing both admin/member permissions
3) Trailing zeros in token amount
* 🚟 Add schema batch 2
* ⏬ Add maybe and optionals
* 🧑⚖️ Make theme a required prop
* 🍙 Fix misplaced square brackets that broke spec
* 🎨 Assume default theme and fix tests
- Fixes#18734
* ⬆️ Update schema and rebase
* 🧪 Update tests
* 🆙 Update progress bar value to be string or int
* 🔩 Tighten schema
This commit fixes the edited wallet account name that persists in other account edit screens.
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
* register and basic imports for collectible tag component
* implement variations and design for collectible tag component
* Refined based on review feedback and implemented schema enhancements
This commit allows clearing the amount input (in the send flow) by long-pressing the delete key.
---------
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
Show "relevant tokens" in account selection step. Related status-go PR
https://github.com/status-im/status-go/pull/4631.
- Balances are fetched on the account selection screen. Assuming most users
won't care about selecting addresses, this eliminates unnecessary calls to get
balances, at the expense of refetching them every time the component is
mounted. I think for now this is acceptable.
- Relevant tokens is a terminology used in Figma, but more specifically, it
means "balances for all assets that have at least one Token Criteria
associated, and for a given address". Or, as I tried to give it a more
distinct name, "permissioned balances".
Areas that may be impacted: None because all affected code is behind a disabled
feature flag.
Fixes https://github.com/status-im/status-mobile/issues/18126
This commit adds a feature to display token prices for each token in the Wallet home and Account screens.
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
This commit fixes the scanned address not pasted/populated in the "Send to" input field.
---
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
This commit adds support for the Sepolia test network and Rarible collectible/collection provider.
---------
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
* Fix exception thrown re-frame don't have the subs' value ready
* Make Token malli schema more lenient
* Make `get-standard-crypto-format` able to work with `nil` values
* Refactor token screen to move subscriptions inside render function
* Make token input reactive to on-swap
* Remove `crypto-currency?` atom to properly react to state changes
* Fix component tests
fixes#18493
We enabled `hermes` for android in the `react-native` upgrade to `0.72.5`
Although things seemed fine but developers were seeing frequent crashes in their local environment.
After some investigation the crashes were traced to max native call stack depth in `hermes` engine.
Disabling `hermes` for local debug builds helps fix that issue.
This commit disables `hermes` by default with the help of a exporting an environment variable in the `make run-android` command.
It is annoying that this also modifies `android/gradle.properties` so we keep `hermesEnabled` as `false` there as well.
We also enable `hermes` when generating release builds so that we can take advantage of `hermes` engine in release builds.
We also add a log to print whether `hermes` is enabled or not. I think its helpful to have this so that we know whether `hermes` is enabled or not.
Token requirements that are not role permissions (currently channel permissions)
should not be displayed to the user while they see permissions to join.
Admin, Master, Owner or minted token permissions are not membership permissions,
but they still should be displayed so the user understand the role they will
assume after joining.
Co-authored-by: Icaro Motta <icaro.ldm@gmail.com>
- Hack fix
- Scroll on press breaks something with FlatList
- Which causes some items to not render
- Could be related to scroll view inside scroll view
- But fixing this bug by compromising the UX a tiny bit
* feat: added react-native-biometrics dependency
* chore: added malli schema to auth
* fix: malli schema
* feat: using react-native-biometrics
* fix: removed biometry not-enrolled error supression
* feat: added check for enabled biometric
* fix: biometrics error handling on ios
* chore: remove touch-id library
* chore: cleanup
* removed proj.list dep
* fix: gradle get_projects regex edge-case
Handles cases when the gradle project has a description, which shows up when running `gradle projects` as (`react-native-biometrics` - react-native-biometrics), breaking `make nix-update-gradle`. Here we're just adjusting the regex to ignore everything in the line after the closing (`).
* build: ran "make nix-update-gradle"
* chore: comment typo
* chore: replaced old lib in test mocks
* fix: addressed review comments
* fix: using event for standard-auth biometrics
* ref: using ex-cause for biometric error codes
* fix: removed promesa changes
* fix: auth slide biometric success not triggered
* feat: get revealed accounts for joined community
Signed-off-by: yqrashawn <namy.19@gmail.com>
* Show token requirements only when membership permissions are present.
- Add membership-permissions? to community state.
* feat: show highest permission role in overview and req to join
Signed-off-by: yqrashawn <namy.19@gmail.com>
* feat: get highest perm role in addr for perms
Signed-off-by: yqrashawn <namy.19@gmail.com>
* feat: ui for address for perm drawer
* test: unit test and spec for handle-community
Signed-off-by: yqrashawn <namy.19@gmail.com>
* fix: for #18581
* refactor: based on PR feedback
- move <-rpc to data store
- `role->translation-key`
- highest-permission-role-text -> highest-role-text
- filter out nils for handle community test
Signed-off-by: yqrashawn <namy.19@gmail.com>
---------
Signed-off-by: yqrashawn <namy.19@gmail.com>
Co-authored-by: Ajay Sivan <ajayesivan@gmail.com>
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>
This commit fixes the currency symbol not shown on the recovered profile.
--
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
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>
fix: composer space when expanding after re-entering
fix: composer bottom shadow and maximized state atom
fix: removing composer bottom gradient style changes
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.
* 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
* 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
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>
* 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
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>
* 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>
* 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
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.
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>
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
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>
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>
* 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
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>
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.