* [#20150] feat: wallet connect pairing via deep links
* [#20150] feat: redirect to the dapp after finish response
* [#20150] test: add tests for events and utils
* [#20150] fix: reviewer's feedback
This change attempts to fix the calendar component specs to avoid errors with finding multiple elements with the same text. Prior to this change it was possible for multiple elements to be found with the same number of the day, like "5", which caused the tests helpers to thrown an exception. Now the specs will use a different test helper to avoid the exceptions, and we've adjusted the test data to avoid duplicate day numbers too.
This commit fixes collectibles not fetched for new and recovered accounts until the user re-login.
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
This commit:
- fixes profile with ENS can edit their name
- fixes identicon ring is shown for the profile with ENS
- updates the profile URL for the profile with ENS
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
* wip, small renamings
* Added metamask regex
* Added tests for metamask conversion
* Add metamask address to shell scanner and wallet address scanner
* unify address functions usage
* address-related functions moved to a dedicated namespace
* minor fixes
* fix lint and tests
* review notes fixes
* return back function
* lint fix
* Support metamask addresses without suffix, prefixed `:ethereum`
This commit fixes the blank screen shown on pages with inputs focused when navigating back to that screen.
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
This commit removes passing random emoji on account creation for the default wallet account, as status-go will set this.
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
The issue occurred because we updated the theme value after setting the root
(not before), which caused the root to be initialized with the old theme value.
* Open metrics modal when changing metrics in settings
* Move privacy policy & terms of use components under `status-im.common`
* Add a link to the Privacy Policy in the metrics modal
* Update privacy policy and terms of use content
* Remove extra function wrapper
This commit:
- hides keypairs with empty origin in selection while creating an account
- hides remove account button for accounts with empty origin
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
We make the wallet closer to being offline-first, that is, once data is loaded,
going offline won’t cause unnecessary data re-fetches which currently cause all
balances and data to stay loading forever or eventually balances end up zeroed.
Areas that may be impacted: read-only data displayed in the wallet and editing
accounts.
Fixes https://github.com/status-im/status-mobile/issues/21066
This change changes the initial onboarding screen to require users to manually accept the terms-of-use and privacy-statement before continuing to onboard into the app.
---------
Co-authored-by: Yevheniia Berdnyk <ie.berdnyk@gmail.com>
* chore: add english translation for "Beta"
* tweak: add beta tags to communities and chat home screen titles
* fix: use smaller size for beta tags on chat and communities home screens
* chore(wallet): feature flag adding watch only accounts
* e2e: disabled test for watch-only accounts
---------
Co-authored-by: Yevheniia Berdnyk <ie.berdnyk@gmail.com>
* 📈 Capture onboarding funnel
* ⏩ Faster lookup
* ✅ Capture how many people enabled metrics
- It technically captures disabled too
- But we'll never know if someone disabled
- Because that info won't be transmitted
* ✏️ Fix tests
* 🧯 Fix lint
This commit uses "usd" currency as default for the fiat price calculation for the tokens.
Every currency has a different format - decimal which we need to rely on a separate RPC to fetch currency format and do the calculation. So, this PR will change to use usd as the default for v2.30.
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
* fix(wallet): fix bridge transactions
Signed-off-by: Brian Sztamfater <brian@status.im>
* add support for approve transactions
Signed-off-by: Brian Sztamfater <brian@status.im>
---------
Signed-off-by: Brian Sztamfater <brian@status.im>
* feat: removed wallet connect feature flag
* fix: show pending requests when logging out and in
* fix: don't show requests across (test/main)nets
* format: added env newlines
* fix: network state reset on network type change
* fix: reject typed-data if wrong chain-id
* chore: added logs for future debugging
* fix: create password for small screen
* feat: use floating button page
Signed-off-by: yqrashawn <namy.19@gmail.com>
* fix: use keyboard will show for ios
Signed-off-by: yqrashawn <namy.19@gmail.com>
* fix: safe area bottom on devices without physical home button
Signed-off-by: yqrashawn <namy.19@gmail.com>
* feat(create-password): tips and checkbox stick with confirm button
* fix: floating button blur after rebase
* fix(floating-button): absolute content avoid keyboard view
---------
Signed-off-by: yqrashawn <namy.19@gmail.com>
* 🥅 Filter connected dapps based on testnet mode
- Fixes#20794
* 🥅 Remove map, just filter
* 💿 Rebase
* ❌ Remove greedy fetch
* 🙅♀️ Properly reject proposals and requests
* 🎗️ Remove newline and move `set`
- `set` was applied at the wrong place here
* ✏️ Address review comments
* 👀 Read proposal to reject from state
* ◀️ Bring back network filtering
* 🧹 Cleanup
* ✏️ Move comment around
* 🎣 Use filter operable accounts helper
* ➕ Add back events deleted during rebase
* 🧰 Fix Issue 2, Testnet sessions not visible
* 🖊️ Fix lint
* 🔗 Make testnet filtering more explicit
* 🥢 Use union instead of two subsets call
* ✏️ Fix lint
* 🔇 Undo changes that creeped in an unrelated ns
* add v2 method
* rename v2 to get-suggested-route
* remove timestamp check on success
* handle async signal for suggestion
* fix stop get suggested routes
* address feedback
* rename get-suggest-route
* prefer lazy seq
* fix formatting
* update suggested routes success
* refactor get-in calls in start-get-suggested-routes
* move transformations to data store
* clean suggested routes immediately
* fix lint
* pass precision as ar
* change test name
* fix big number division error (issues 1,2)
* only trigger router fetch when there address (to/from)
* check response data for error response when routes received via signal
* update status-go
* fix: test failure
* update status go
* handle error message for generic errors
We do a few things to reduce the initial load and make the app more responsive
after login. The scenario we are covering is a user who joined communities with
a large number of members and/or which contain token-gated channels with many
members.
- Related to https://github.com/status-im/status-mobile/issues/20283
- Related to https://github.com/status-im/status-mobile/issues/20285
- Optimize how we convert a community from JS to CLJS. Community members and
chat members are no longer transformed to CLJS, they are kept as JS. Read more
details below.
- Delay processing lower-priority events by creating a third login phase. The
goal is to not put on the same queue we process communities less important
events, like fetching the count of unread notifications. Around 15 events
could be delayed without causing trouble (and this further prevent a big chain
of more events to be dispatched right after login).
- Tried to use re-frame's flush-dom metadata, but removed due to uncertainty,
check out the discussion:
https://github.com/status-im/status-mobile/pull/20729#discussion_r1683047969
Use re-frame’s support for the flush-dom metadata whenever a signal arrives.
According to the official documentation, this should tell re-frame to only
process the event after the UI has been updated. It’s hard to say if this
makes any difference, but the theory is sound.
- Reduce the amount of data returned to the subscription that renders a list of
communities. We were returning too much, like all members, chats, token
permissions, etc.
Other things I fixed or improved along the way:
- Because members are now stored as JS, I took the opportunity to fix how
members are sorted when they are listed.
- Removed a few unused subs.
- Configured oops to not throw during development (in production the behavior is
to never throw). This means oops is now safe to be used instead of interop
that can mysteriously fail in advanced compilation.
- Show compressed key instead of public key in member list for the account
currently logged in.
Technical details
The number one reason affecting the freeze after login was coming from
converting thousands of members inside communities and also because we were
doing it in an inefficient way using clojure.walk/stringify-keys. We shouldn't
also transform that much data on the client as the parent issue created by
flexsurfer correctly recommends. Ever since PR
https://github.com/status-im/status-mobile/pull/20414 was merged, status-go
doesn't return members in open channels, which greatly helps, for example, to
load the Status community. The problem still exists for communities with
token-gated channels with many members.
The current code in develop does something quite inefficient: it fetches the
communities, then transforms them recursively with js->clj and keywordizes keys,
then transforms again all the potentially thousands of member IDs back to
strings. This PR changes this. We now shallowly convert a community and ignore
members because they can grow too fast. From artificial benchmarks simulating
many members in token-gated channels, or communities with thousands of members,
the improvement is noticeable.
You will only really notice improvements if you have spectated or joined a
community with 1000+ members and/or a community with many token-gated channels,
each containing perhaps hundreds of members.
What's the ideal solution?
We should consider removing community members and channel members from the
community entity returned by status-go entirely. The members should be a
separate resource and paginated so that the client doesn't need to worry
about the number of members, for the most part.
This commit removes two toggles from legacy advanced settings
- "Testnet mode" - duplicate toggle as the user can switch to testnet from wallet settings
- "Enable Goerli as test network" - Goerli is depreciated and wallet services use Sepolia testnet as default.
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
This commit adds the beta info box with links to chain explorers to the activity tab in the wallet.
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
* feat: only initialize wc if internet online
* feat: no internet toast for session establishment
* feat: no internet banner on session requests
* feat: reloading walletconnect on connection change
* fix: re-initialize only when previously failed to
* fix: removed legacy net-info ns
* ref: renamed :network-status to :network/status
* ref: moved network subs to own "category"
* fix: device network fx args
* fix: tests & showing persisted dapps when offline
* fix: addressed review comments
* fix: rebase issues
* fix: linting
* fix: usage of web3-wallet (#20864)
* fix: moved networks to contextx and renaming
* ref: moved building supported namespaces into fx
Equality checks in tests using = give a bad experience by default on test
failures containing nested data structures. We use the cljs.test directive
match? from matcher-combinators library to help compare nested structures. The
problem with match? is that its default matcher for maps (embeds) can be too
permissive, and this causes surprises.
Here we upgrade matcher-combinators to latest, where a new matcher called
nested-equals is available. This matcher won't allow extra keys in maps. This
matcher eliminates the need for manually adding nested equals matchers as we
have to do currently.
- Upgrades matcher-combinators from 3.8.8 to 3.9.1 (latest as of 2024-07-19)
What changes?
When asserting in tests, we now have the option to use match-strict? or match?.
Both directives are available by integrating with cljs.test. The code
implementing the new match-strict? directive was 100% copied from the library
matcher-combinators because we need to wrap the expected value ourselves with
matcher-combinators.matchers/nested-equals. It's ugly code, but it's how we can
integrate with cljs.test/assert-expr.
This commit:
- prevents the user from saving their wallet address as the saved address
- fixes button not capturing taps when the keyboard is open in saved address flows
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
- Update tests
- Omit from page while sending a token in home page
- Hide send and bridge option for not owned tokens
- Fix subscription to return accounts owning an asset
Potentially a solution to https://github.com/status-im/status-mobile/issues/15706
- [x] Fixes swipe button on Android and iOS.
- [x] Performance: we now subscribe only to the minimum from each community.
This could be the reason the AC would lag as described in the parent
issue.
- [x] Performance: was able to use flex and removed swipe button height
calculation that was using `onLayout` and was causing a re-render.
- [x] Performance: reduced the initial number of items to render in the flatlist
from 10 to 7.
- [x] Performance: delay rendering the heavy list of notification components.
See in the video below how slow it is to open the AC with just 6
notifications and that the opening animation is never displayed. And then
check the improved version with the artificial delay provided by
`rn/delay-render`. By opening the AC first and animating, this gives the
user something to look for, and hopefully a few milliseconds more to think
the app is not stuck, which will be preciously used to render
notifications.
We refactor all views in the AC to:
- [x] Follow our newest standards with React hooks.
- [x] Removed prop-drilling by creating a separate React context to store the
current swipeable item (because we need to call `.close` on a `Gesture
Swipeable` instance whenever a new swipeable opens.
* Fix schema for networks in context-tags
* Fix wallet-activity component overflowing the activity tab
* Improve robustness of the activity tab fetching mechanism
* Handle `wallet-activity-filtering-entries-updated` signal
* Improve processing of data received for the activity tab
This commit add a confirmation for centralized metrics.
It is added in 3 places:
1) Onboarding -> Create new account
2) Onboarding -> Sync profile
3) On the accounts view if the user is upgrading
To test 1 & 2, you should just be able to do that on a newly installed
device.
To test 3, you will have to upgrade from a PR without this feature that
has at least an account. It should show the confirmation modal until you
either click on Not now or Share usage data.
The modal should also be added in settings, but I will do that as a
separate PR.
This commit removes the non-operable accounts in the "Addresses for permission" and "Airdrop address" selections while joining a community
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
Tabs "Open" and "Gated" in Discover communities screen were never implemented in
the code, they are dummies. We now hide them under the flag
config/show-not-implemented-features?, which is disabled for users.
Fixes: https://github.com/status-im/status-mobile/issues/20682
To avoid regressions and be quicker, I opted to not remove the "All" tab even
though is the only one shown now, as that would require me to check non-trivial
code due to the fact that the tabs can be sticky as the user scrolls.
Revamps the legacy "Privacy and security" screen to meet the new designs.
Fixes https://github.com/status-im/status-mobile/issues/20618
- Removed setting "Set dApp access permissions" (won't be used anymore).
- Removed setting "Display collectibles" (won't be used anymore).
- Removed setting "Chat link previews setting" (they already had no effect).
- Removed "Reset password setting". This setting is already supported in Profile
> Password > Change password.
- Removed "Delete my profile". Profile deletion is already supported in the
login screen.
- Moved setting "Show your profile picture" to Profile > Privacy and security.
- Moved setting "Accept new chats from <XYZ>" to "Allow new contact requests" in
Profile > Messages. Now it's just a toggle.
- Moved Block screenshots (Android) or Hide Preview (iOS) which are both
accessible in Profile > Privacy and security.
- Created function utils.navigation/navigate-back, but I only used this in 2
namespaces to keep the PR under scope.
Areas that may be impacted: old legacy settings that are still relevant.
This commit cleans the scanned QR address/result on the unmount of the add new saved address flow.
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
This commit:
- update the connection string validation method to use the method from status-go
- updates the error message if the user tries to scan a different key pair QR for importing a missing key pair
- updates the text for exporting an individual key pair
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
6e056348...1ef2434b
This commit adds support for pushing centralized metrics to mixpanel.
It uses an interceptor and only picks a few selected events to push
through.
In order to test:
1) Create an account in the app
2) Go to Settings->Privacy
3) Enable metrics
You should now see the events on the mixpanel dashboard (login with your
status-im account for access).
Only some example events are tracked, they are just for testing
* chore: remove identifiers screens so users are navigated straight to enable notifications during onboarding
* removed navigated back button from enable notification screen
* fix top margin
* e2e: updated sign in flow
* make lint-fix
---------
Co-authored-by: Yevheniia Berdnyk <ie.berdnyk@gmail.com>
* Add variant unknown variant for collectibles
* Fix blank collectibles listed
* Improve `expanded-collectible` animation and add support for different gradient-colors
* Make :wallet/collectible-details-owner subscription depend on `wallet/accounts` instead of `:wallet`
* Make collectible tabs component more flexible
* Remove now unused subscriptions
* Improve UX navigation to collectible detail page
* Pass the current collectible gradient-color when a collectible is pressed
* Fix tests
This change attempts to only to override the default `pointer-events` behaviour for the `quo/keypair` component when the component uses the `selector` action. Now when the `quo/keypair` component is rendered with a selector, only the top-level view of the component will be pressable. And when the `quo/keypair` component is rendered without a selector it will allow for the children of the component to be pressable too.
Removes code integrating with the signal wakuv2.peerstats. The response from
this signal is rather large and it can sometimes happen in short bursts.
- Fixes https://github.com/status-im/status-mobile/issues/20176
We were using it to keep track of the number of peers in real-time. We now only
fetch the peer count in two instances (synchronously inside rn/use-mount):
- When the user opens the legacy screen Settings > Advanced > Peers stats.
- When the user opens the visibility status dropdown in Settings, because the
peers count will be used when the user chooses "Offline" (status inactive).
Note: we don't send anymore the peers count when the user shakes the phone. We
assume this value is already available in :peers-summary (which will be shared
by the user).
status-go still publishes the signal, we just ignore it to remove the
performance overhead of transforming to cljs and mutating the app-db (thus
interrupting the queue from more important stuff).
Steps to test:
- Verify user can see peers count in Settings > Advanced > Peers stats
- Verify changing the visibility status of user Alice in the Settings screen
leads to the desired effect to the other party seeing Alice's visibility
status.
This commit adds syncing saved addresses across paired devices whenever a new saved address is added or an existing one is edited or removed.
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
Fixes the scroll behavior in a community channel member list. The problem was
that the code wasn't enforcing the correct height.
Partially solves https://github.com/status-im/status-mobile/issues/20514
Steps to test: Long press on any community channel and press View channel
members and details. The user should be able to correctly scroll throughout the
entire list of members.
BigNumber instances are not comparable to other data types, except numbers and
strings (supported directly by the library). This commit makes = safe on
bignumbers (no exceptions should be thrown), even when comparing a bignumber
with a nil value.
There's another important benefit from having a custom comparator: performance,
because re-frame will be able to correctly compare data with bignumbers and thus
reuse cached subscriptions and also Reagent will be able to skip processing when
props are equal.
The IComparable interface was not changed. Similarly to core CLJS data types,
sorting heterogeneous collections throws (ignore nils).
```clojure
;; This throws with message: cannot compare 10 to foo
(sort ["foo" 10])
```
We could make sorting work with heterogeneous collections, but then we would
need to extend many core data types to play nice with BigNumber and that sounds
more like a hack, and it's also not a problem we have nowadays.
* Fix color of non-selected keypairs
* Fix pressable area in keypairs
* Make validation more robust
* Make confirm button always pressable
* Fix wrong sentence in errors
* Solve account creation by fixing a memoized callback
* Improve logging
* tweak: use support blur colors for action drawer icons
* tweak: support blur colors for drawer-top icon
* tweak: support blur colors for account list inside keypair component
* tweak: use blur colors for missing-keypair bottom sheet actions
* feat: remove feature-flag for key-pairs and accounts inside wallet settings
* fix: ensure key-pairs-and-accounts settings are visible
* tweak: display key-pair rename screen as full-screen modal
* tweak: animate key-pair scanning screen as modal
* fix: do not allow user to rename key-pair to an existing key-pair name
* fix: ensure we visualise the validation error for key-pair name that is too long
* fix: ensure we can see the recovery-phrase suggestions when testnet-mode is active
* tweak: show recovery-phrase errors when keyboard is hidden
* fix: ensure we do not re-hash password
* fix: ensure we call `on-close` function when successfully handling biometrics auth
* fix: ensure we clear error states when editing the recovery-phrase input
* fix: use blur styles for standard authentication password input
* chore: add labels for qr validation
* tweak: handle display import-qr error and allow for re-scanning
* tweak: update blur background for all bottom-sheets
* chore: add feature-flag for import-all key-pairs button for missing key-pairs
* tidy: remove unused variable
* fix: ensure layout for android is correct when entering seed-phrase in testnet-mode
* fix: ensure we return the updated db when updating the db with backup key-pair
* tweak: coerce nil to empty string
* tweak: change validation error message for short key-pair name
* tweak: hide the options icon for the default key-pair inside key-pairs and accounts settings
* chore(wallet): make recent tab fullscreen for empty view
* chore(wallet): hide advanced button on send page
* chore(wallet): hide estimated fees when no routes found
* chore(wallet): update emoji icon to edit
* chore(wallet): update key pair placeholder to use keypair example
* chore(shell): feature flag saved address option in scanner
After migrating from v1 to v2, some user names may be too long to fit in some
devices in the "Settings > Edit Profile > Name" setting. The solution was to
truncate in the UI the name to the max valid length in v2, which is 20
characters.
Other small improvements:
- Don't use entire Clojure maps as the :key in React. This is known to be slow
because it's expensive for Clojure to generally transform a data structure
into its string representation.
- Don't find the last item of a list using last and an equality between two
maps. This will force each iteration to call last, which in turn will iterate
over the entire list of items (we can think of the Clojure lazy seq as a
linked list). Instead, we now cache the index outside the loop and do a number
comparison.
- Don't pass entire props to style functions when not needed because
destructuring has a cost. I wouldn't personally worry about this 99% of the
time, but when there's only argument like in this PR where we were passing a
single blur? argument, it's preferable to not use a map.
Solves a problem encountered in unit tests, where instances of BigNumber (used
in the utils.money namespace) can't be compared with = or match?
If you try the following code you will always get false because they're
different instances in memory.
(= (money/bignumber 0) (money/bignumber 0))
We now extend BigNumber (from lib bignumber.js) so that their instances are
comparable (e.g. necessary to sort) and understand equality.
We also extend BigNumber to work with the match? directive. For example, this is
the output of comparing a nested map containing bignumbers (colored in the
terminal):
(match? {:a {:b {:c (money/bignumber 42)}}}
{:a {:b {:c (money/bignumber 43)}}})
FAIL in (equivalence-test) (at cljs$test$run_block (status-mobile/target/test/cljs-runtime/cljs.test.js:366:13)
expected: (match? {:a {:b {:c (money/bignumber 42)}}} {:a {:b {:c (money/bignumber 43)}}})
actual: {:a
{:b {:c (mismatch (expected "42") (actual "43"))}}}
This commit refactors the keypairs data in app-db to save them by indexed by key-uid which will help to fetch, update, and delete easily instead of using filter and some methods every time we need to perform those operations.
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>