Commit Graph

9829 Commits

Author SHA1 Message Date
Yevheniia Berdnyk 136c3c0032
e2e: fixed KeyError for missed SauceLabs session id 2024-06-26 00:03:50 +03:00
Tetiana Churikova a92b50afea
.github: add default prio label for bug (#20557) 2024-06-25 17:35:08 +02:00
Jamie Caprani fd3a21a320
fix(wallet): native share should point to opensea link (#20222) 2024-06-25 07:56:11 -07:00
Lungu Cristian f93e372d18
Add data-item to `quo/category` (#20542)
* feat: added data-item to category quo component

* feat: session proposal with data-item & category

* test: category with data-items

* chore: removed unnecessary ->

* fix: trailing newline
2024-06-25 15:35:45 +03:00
Parvesh Monu 0ed39a42ef
fix "Remove from contacts" is available when the user is not your contact (#20541) 2024-06-25 13:48:53 +05:30
yqrashawn ead51b7e7c
feat: simplification of onboarding intro view (#20386)
* feat: simplification of onboarding intro view

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

* feat: new onboarding illustration

* fix: add accessibility label

* fix: wrong navigation stack

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

* e2e: updated sign in

* fix: onboarding nav stack after flow change

---------

Signed-off-by: yqrashawn <namy.19@gmail.com>
Co-authored-by: Yevheniia Berdnyk <ie.berdnyk@gmail.com>
2024-06-25 11:03:10 +08:00
Icaro Motta 9481890624
fix(profile)_: Truncate profile name in settings screen (#20483)
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.
2024-06-24 20:08:23 -03:00
Icaro Motta 419e84db08
chore(tests)_: Make bignumber instances test friendly (#20535)
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"))}}}
2024-06-24 15:56:55 -03:00
Icaro Motta 66785d01ec
chore(perf)_: Use optimized endpoint to get communities (#20481)
Adapts the client code to use the new optimized endpoint to get communities with
images pointing to the media server. Related status-go PR
https://github.com/status-im/status-go/pull/5336.
2024-06-24 09:45:03 -03:00
Andrea Maria Piana 1cc4807336 chore_: add make targets for tail/pull geth.log 2024-06-24 11:19:23 +01:00
Parvesh Monu 141252e5a0
fix no request for permission for push notifications when you enable them in app settings (#20531) 2024-06-24 15:12:03 +05:30
Yevheniia Berdnyk 9d825ee04e
e2e: update for wallet users and community links test 2024-06-21 18:25:49 +03:00
Mohamed Javid fb84f105db
chore(wallet): refactor keypairs data in app-db (#20469)
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>
2024-06-21 20:47:26 +05:30
flexsurfer f509d132f3
Allow non admin to add members to group chats #20396 (#20428) 2024-06-21 15:49:20 +02:00
Parvesh Monu 5ee5d70567
Show correct drawer message for pending community request (#20485) 2024-06-21 17:20:20 +05:30
Jakub Sokołowski b5a09a334a Include process of status-go PR
Define a process for status-go PR as more of those are expected to be
opened by the Waku team.

Specify that testing is mandatory before merge
2024-06-21 07:46:16 +01:00
Ulises Manuel 1e703cdc81
feat(wallet): Remove non-operable accounts from account switcher (#20457)
* feat(wallet): Remove non-operable accounts from account switcher

* Remove non-operable accounts in the From page
2024-06-20 17:14:26 -06:00
John Ngei fbc9b59a5e
chore: remove identifiers screens so users are navigated straight to enable notifications during onboarding (#20506) 2024-06-21 00:38:02 +02:00
Jamie Caprani 4e8f4698a6
chore(wallet): add missing keypair to wallet home cards (#20455) 2024-06-20 22:37:49 +02:00
Ulises Manuel 68b3bb3089
fix(wallet): Solve multiple bugs in the collectible detail page (#20281)
* Add background color to collectibles

* Fix header text animation in unsupported collectibles

* Fix header height and animation color

* Fix image not showing when it's `nil` or `""`

* Add missing border to expanded-collectible
2024-06-19 11:38:14 -06:00
Ulises Manuel f192648518
feat(wallet): Add account name, emoji and color validation (#20422)
* Fix extra `0` in create/edit account title input

* Validate name, color and emoji in account creation/edition screen

* Refactor sub

* Fix button disabled condition and placeholder
2024-06-19 11:25:46 -06:00
Shivek Khurana e9f98fcf85
💾 Persist Wallet Connect sessions (#20351)
* 💾 Add persist WC session events

*  Persistence works

- Also moved closing of modal to approval stage
2024-06-19 15:55:38 +05:30
yqrashawn f133cd3d5d
chore: backupDisabledDataDir -> rootDataDir (#20425)
Signed-off-by: yqrashawn <namy.19@gmail.com>
2024-06-19 15:21:09 +08:00
Volodymyr Kozieiev f761d87b2a
Long tap on route to lock value sent from this network (#20413) 2024-06-18 15:42:29 +01:00
Icaro Motta 24b77811d8
fix(profile)_: Fallback to old profile name after migration from v1 (#20412)
This is a byproduct of the investigation on issue
https://github.com/status-im/status-mobile/issues/20203, more specifically, to
double-check if v1 users have their display names shown correctly.

Closes https://github.com/status-im/status-mobile/issues/20203

This is the scenario used to reproduce the bugs this PR is solving:

1. Alice creates an account in v1 (branch release/1.20.x).
2. Alice had 1 friend to chat with, Carol.
3. Alice sends and receives at least one message from Carol.
4. Alice installs the new app (latest develop branch suffices).
5. Alice login and try to edit her profile, but her 3-word name is not displayed
   in the Settings > Edit Profile screen, nor in the Settings > Edit profile >
   Name input field.
6. Alice also opens her chat with Carol, but her name appears as a public key
   instead of her 3-word name she identifies herself with.

The solution presented here is to just fallback to Alice's 3-word name (name
field in the profile/contact app-db instance).

Areas that may be impacted

- Edit profile name.
- Name displayed in chats from the perspective of the sender who migrated from
  v1.

Steps to test

In order to test this PR, it's necessary to migrate from v1 to v2 using two
separate builds. The v1 build can be obtained in PR
https://github.com/status-im/status-mobile/pull/20123. v2 build can be any one
from develop from today, for example.
2024-06-17 18:25:05 -03:00
Alexander d2f67ef46c
Update `quo/data-item` to show accounts and networks as preview (#20382)
* Update `quo/data-item` to show accounts and networks as preview

* Podfile.lock change reverted
2024-06-17 09:37:35 +02:00
Yevheniia Berdnyk 88b97d1151
e2e: update for wallet tests 2024-06-14 18:28:55 +03:00
Omar Basem 6a3794f380
fix(wallet): Wallet Home jumping (#20347) 2024-06-14 07:07:00 -07:00
Mohamed Javid 686f6bdf5e
fix(wallet): saved addresses - navigation on save and ens fixes (#20462)
This commit:
- fixes addresses are displayed without truncation
- fixes network preference (advanced icon) shown for ENS
- fixes navigation on adding a new saved address

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2024-06-14 17:06:44 +05:30
John Ngei 8b424b0669
fix scroll to index error when swtiching tab on the messaging screen (#20407) 2024-06-14 12:37:11 +02:00
Mohsen 24068dad5c
[#20405] feat: make partially operable key pair to be fully operable (#20433) 2024-06-14 12:25:44 +03:00
Icaro Motta 96d98c62ed
chore(tests)_: Facilitate writing event tests (#20424)
Introduces a new macro deftest-event to facilitate writing tests for event
handlers. Motivation came from the _problem of having to always extract event
handlers as vars in order to test them_.

Although the implementation of deftest-sub and deftest-event are similar,
deftest-sub is critically important because it guarantees changes in one
subscription can be caught by tests from all other related subscriptions in the
graph (reference: PR https://github.com/status-im/status-mobile/pull/14472).

This is not the case for the new deftest-event macro. deftest-event is
essentially a way of make testing events less ceremonial by not requiring event
handlers to be extracted to vars. But there are a few other small benefits:

- The macro uses re-frame and "finds" the event handler by computing the
  interceptor chain (except :do-fx), so in a way, the tests are covering a bit
  more ground.
- Slightly easier way to find event tests in the repo since you can just find
  references to deftest-event.
- Possibly slightly easier to maintain by devs because now event tests and sub
  tests are written in a similar fashion.
- Less code diff. Whether an event has a test or not, there's no var to
  add/remove.
- The dispatch function provided by the macro makes reading the tests easier
  over time. For example, when we read subscription tests, the Act section of
  the test is always the same (rf/sub [sub-name]). Similarly for events, the
  Act section is always (dispatch [event-id arg1 arg2]).
- Makes the re-frame code look more idiomatic because it's more common to define
  handlers as anonymous functions.

Downside: deftest-sub and deftest-event are relatively complicated macros.

Note: The test suite runs just as fast and clj-kondo can lint code within the
macro just as well.

Before:

```clojure
(deftest process-account-from-signal-test
  (testing "process account from signal"
    (let [cofx             {:db {:wallet {:accounts {}}}}
          effects          (events/process-account-from-signal cofx [raw-account])
          expected-effects {:db {:wallet {:accounts {address account}}}
                            :fx [[:dispatch [:wallet/get-wallet-token-for-account address]]
                                 [:dispatch
                                  [:wallet/request-new-collectibles-for-account-from-signal address]]
                                 [:dispatch [:wallet/check-recent-history-for-account address]]]}]
      (is (match? expected-effects effects)))))
```

After

```clojure
(h/deftest-event :wallet/process-account-from-signal
  [event-id dispatch]
  (let [expected-effects
        {:db {:wallet {:accounts {address account}}}
         :fx [[:dispatch [:wallet/get-wallet-token-for-account address]]
              [:dispatch [:wallet/request-new-collectibles-for-account-from-signal address]]
              [:dispatch [:wallet/check-recent-history-for-account address]]]}]
    (reset! rf-db/app-db {:wallet {:accounts {}}})
    (is (match? expected-effects (dispatch [event-id raw-account])))))
```
2024-06-13 22:03:02 -03:00
Ulises Manuel 435bf3dbd5
feat(wallet): Fix bugs in the bridge flow and add missing entry points (#20197)
* Fix "Bridge to" screen not showing

* Fix "Unkown flow" alert in bridge flow

* Fix warnings in transaction confirmation page

* Fix missing images and strings while bridging in transaction confirmation page

* Fix stale data shown for an instant in the suggested routes component

* Add support for bridge flow started in the wallet home screen

* Fix fetch-activities event
2024-06-13 10:32:34 -06:00
Parvesh Monu 26c4a736ad
fix group Image can't be set up during group creation (#20451) 2024-06-13 20:31:24 +05:30
Mohamed Javid aff4eb89cd
feat(wallet): implement search in saved addresses list (#20443)
This commit adds a feature to search through the saved addresses list by name, address, ENS and chain names.

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2024-06-13 19:28:41 +05:30
flexsurfer 60b3d01ceb
use-safe-unmount for hot reload (#20450) 2024-06-13 15:23:01 +02:00
Sean Hagstrom dc335cc333
chore: Revise code for wallet settings (#20439)
* fix: use correct error message when displaying seed phrase as incorrect

* tidy: cleanup naming of events and effects

* tweak: show incorrect-seed-phrase error for any import error

* fix: show correct error message for incorrect private key

* chore: move import-private-key and import-seed-phrase namespaces

* chore: move encrypted-qr namespace

* chore: move scan-qr namespace

* tidy: rename key-pair to keypair inside for wallet settings

* tweak: use :open-modal navigation instead of :navigate-to-within-stack

* tweak: rename screen for importing missing key-pair by seed-phrase

* tidy: refactor code
2024-06-13 14:13:26 +01:00
mmilad75 e0c7ecc6df
No routes found error is displayed in case asset value is within max amount but not enough balance for fee #20148 (#20272) 2024-06-13 14:41:06 +02:00
mmilad75 d33648917a
The network marks are not shown on the 'send to' page for accounts #19545 (#20365) 2024-06-13 14:19:19 +02:00
Parvesh Monu 5f7d7254e7
fix bottom message hidden behind composer with minimised keyboard when replying to message (#20371) 2024-06-13 16:48:21 +05:30
Parvesh Monu df939bf85f
fix inability to move cursor to next line in bio field (#20403) 2024-06-13 13:56:33 +05:30
yqrashawn 874906b11f
fix: face id toggle respect system face id permission (#20227)
Signed-off-by: yqrashawn <namy.19@gmail.com>
2024-06-13 09:28:07 +08:00
Ulises Manuel 799bd1d4dc
fix(wallet): Multiple activity tab fixes (#20367)
* Add missing circle in wallet-activity component

* Move activity calculations to subscription and fix wrong data

* Fetch activities when visiting an account
2024-06-12 14:37:06 -06:00
Parvesh Monu 256c9f7b10
fix wrong community logo position when scrolling down the channel list (#20408) 2024-06-12 22:50:07 +05:30
Jamie Caprani 60e1783b36
chore(wallet): show activity tab after sending a transaction 2024-06-12 08:36:30 -07:00
Mohamed Javid 3208ec1b28
feat(wallet): display saved addresses in send flow (#20418)
This commit adds a feature to display saved addresses in the send flow

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2024-06-12 19:38:17 +05:30
Parvesh Monu 8f75761ae9
fix continue button partially hidden on the Change password screen (#20409) 2024-06-12 18:29:28 +05:30
Mohsen af07205f20
[#19737] feat: edit a saved address (#20398) 2024-06-12 12:55:38 +03:00
Siddarth Kumar 672358fbce
deps: bump react-native-linear-gradient library (#20329)
`react-native-linear-gradient` library has to be upgraded to `3.0.0-alpha.1` for new architecture support on `Android`.
2024-06-12 13:43:26 +05:30
Ajay Sivan 255ba9a862
Move buy assets recurrent tab out of feature flag (#20319) 2024-06-11 09:18:12 -07:00