Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reject wallet-connect request by dragging the modal down (#20763) #20836

Merged
merged 2 commits into from
Jul 25, 2024

Conversation

alwx
Copy link
Contributor

@alwx alwx commented Jul 22, 2024

fixes #20763
fixes #20865

Platforms

  • Android
  • iOS

status: ready

@alwx alwx self-assigned this Jul 22, 2024
@status-im-auto
Copy link
Member

status-im-auto commented Jul 22, 2024

Jenkins Builds

Click to see older builds (45)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ e50569a #1 2024-07-22 09:39:59 ~4 min tests 📄log
✔️ e50569a #1 2024-07-22 09:42:58 ~7 min android-e2e 🤖apk 📲
✔️ e50569a #1 2024-07-22 09:43:23 ~8 min android 🤖apk 📲
✔️ e50569a #1 2024-07-22 09:44:32 ~9 min ios 📱ipa 📲
a8d1655 #2 2024-07-22 10:20:25 ~2 min tests 📄log
✔️ be359ed #3 2024-07-22 10:29:24 ~4 min tests 📄log
✔️ be359ed #3 2024-07-22 10:31:31 ~7 min android 🤖apk 📲
✔️ be359ed #3 2024-07-22 10:31:41 ~7 min android-e2e 🤖apk 📲
✔️ be359ed #3 2024-07-22 10:33:40 ~9 min ios 📱ipa 📲
✔️ d8baea0 #5 2024-07-22 13:20:34 ~4 min tests 📄log
✔️ d8baea0 #5 2024-07-22 13:22:33 ~6 min android 🤖apk 📲
✔️ d8baea0 #5 2024-07-22 13:23:56 ~7 min android-e2e 🤖apk 📲
✔️ d8baea0 #5 2024-07-22 13:26:50 ~10 min ios 📱ipa 📲
✔️ 58b8e9f #6 2024-07-23 09:40:28 ~3 min tests 📄log
✔️ 58b8e9f #6 2024-07-23 09:43:23 ~6 min android 🤖apk 📲
✔️ 58b8e9f #6 2024-07-23 09:43:41 ~7 min android-e2e 🤖apk 📲
✔️ 58b8e9f #6 2024-07-23 09:45:32 ~9 min ios 📱ipa 📲
✔️ d4cebd3 #8 2024-07-24 10:46:00 ~4 min tests 📄log
✔️ d4cebd3 #8 2024-07-24 10:48:22 ~6 min android 🤖apk 📲
✔️ d4cebd3 #8 2024-07-24 10:49:06 ~7 min android-e2e 🤖apk 📲
✔️ d4cebd3 #8 2024-07-24 10:50:28 ~8 min ios 📱ipa 📲
✔️ c02680d #9 2024-07-24 11:10:58 ~5 min tests 📄log
✔️ c02680d #9 2024-07-24 11:14:15 ~8 min android-e2e 🤖apk 📲
✔️ c02680d #9 2024-07-24 11:14:23 ~8 min android 🤖apk 📲
✔️ 3545d09 #11 2024-07-24 11:21:45 ~4 min tests 📄log
✔️ 3545d09 #11 2024-07-24 11:26:45 ~9 min ios 📱ipa 📲
✔️ 3545d09 #11 2024-07-24 11:26:54 ~10 min android-e2e 🤖apk 📲
✔️ 3545d09 #11 2024-07-24 11:26:54 ~10 min android 🤖apk 📲
✔️ 8e1c124 #12 2024-07-24 14:17:52 ~4 min tests 📄log
✔️ 8e1c124 #12 2024-07-24 14:19:19 ~6 min android-e2e 🤖apk 📲
✔️ 8e1c124 #12 2024-07-24 14:20:30 ~7 min android 🤖apk 📲
✔️ 8e1c124 #12 2024-07-24 14:22:49 ~9 min ios 📱ipa 📲
✔️ 155aaac #14 2024-07-24 16:57:03 ~4 min tests 📄log
✔️ 155aaac #14 2024-07-24 16:59:03 ~6 min android-e2e 🤖apk 📲
✔️ 155aaac #14 2024-07-24 17:00:36 ~8 min android 🤖apk 📲
✔️ 155aaac #14 2024-07-24 17:02:13 ~9 min ios 📱ipa 📲
✔️ 3d59d15 #15 2024-07-24 17:10:38 ~3 min tests 📄log
✔️ fd9979d #18 2024-07-24 17:16:51 ~4 min tests 📄log
✔️ fd9979d #18 2024-07-24 17:18:47 ~6 min android 🤖apk 📲
✔️ fd9979d #18 2024-07-24 17:19:04 ~6 min android-e2e 🤖apk 📲
✔️ fd9979d #18 2024-07-24 17:22:30 ~9 min ios 📱ipa 📲
✔️ 194c317 #19 2024-07-25 10:14:44 ~4 min tests 📄log
✔️ 194c317 #19 2024-07-25 10:16:52 ~6 min android 🤖apk 📲
✔️ 194c317 #19 2024-07-25 10:17:32 ~7 min android-e2e 🤖apk 📲
✔️ 194c317 #19 2024-07-25 10:19:14 ~9 min ios 📱ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 2dadd64 #20 2024-07-25 10:32:13 ~3 min tests 📄log
✔️ 2dadd64 #20 2024-07-25 10:35:22 ~7 min android-e2e 🤖apk 📲
✔️ 2dadd64 #20 2024-07-25 10:35:28 ~7 min android 🤖apk 📲
✔️ 2dadd64 #20 2024-07-25 10:37:39 ~9 min ios 📱ipa 📲
✔️ 5acdebd #21 2024-07-25 14:22:36 ~6 min tests 📄log
✔️ 5acdebd #21 2024-07-25 14:23:18 ~7 min android 🤖apk 📲
✔️ 5acdebd #21 2024-07-25 14:23:55 ~8 min android-e2e 🤖apk 📲
✔️ 5acdebd #21 2024-07-25 14:28:19 ~12 min ios 📱ipa 📲

@alwx alwx marked this pull request as draft July 22, 2024 10:53
@alwx alwx marked this pull request as ready for review July 22, 2024 13:15
@alwx alwx requested a review from clauxx July 22, 2024 13:15
@alwx
Copy link
Contributor Author

alwx commented Jul 22, 2024

@shivekkhurana @clauxx ready to be reviewed

@status-im-auto
Copy link
Member

71% of end-end tests have passed

Total executed tests: 7
Failed tests: 1
Expected to fail tests: 1
Passed tests: 5
IDs of failed tests: 727230 
IDs of expected to fail tests: 727232 

Failed tests (1)

Click to expand
  • Rerun failed tests

  • Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230

    Device 2: Find `Text` by `xpath`: `//android.view.ViewGroup[@content-desc='container']/android.widget.TextView[@text='Ether']/../android.widget.TextView[3]`
    Device 2: `Text` is `0.01389 ETH`

    critical/test_wallet.py:184: in test_wallet_send_asset_from_drawer
        self.errors.verify_no_errors()
    base_test_case.py:191: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Sender balance is not updated on Etherscan, it is 0.4843 but expected to be 0.4844
    



    Expected to fail tests (1)

    Click to expand

    Class TestWalletOneDevice:

    1. test_wallet_add_remove_watch_only_account, id: 727232

    Device 1: Find EditBox by accessibility id: add-address-to-watch
    Device 1: Type 0x8d2413447ff297d30bdc475f6d5cb00254685aae to EditBox

    critical/test_wallet.py:249: in test_wallet_add_remove_watch_only_account
        self.wallet_view.add_watch_only_account(address=address_to_watch, account_name=new_account_name)
    ../views/wallet_view.py:163: in add_watch_only_account
        self.account_has_activity_label.wait_for_visibility_of_element()
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 1: Text by accessibility id:`account-has-activity` is not found on the screen after wait_for_visibility_of_element 
    

    [[Missing networks in account address, https://github.com//issues/20166]]

    Device sessions

    Passed tests (5)

    Click to expand

    Class TestWalletOneDevice:

    1. test_wallet_add_remove_regular_account, id: 727231
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133
    Device sessions

    2. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    Class TestWalletMultipleDevice:

    1. test_wallet_send_eth, id: 727229

    @alwx alwx force-pushed the bugfix/20763 branch 2 times, most recently from d4cebd3 to c02680d Compare July 24, 2024 11:05
    @pavloburykh pavloburykh self-assigned this Jul 24, 2024
    @pavloburykh
    Copy link
    Contributor

    @alwx please take a look at the issues:

    ISSUE 1 Requests are not rejected neither by dragging the modal nor by closing it

    Test dApp used for testing https://react-app.walletconnect.com/

    Also can be reproduced on real dApps https://opensea.io/ and https://dydx.trade/DYDX. Some requests are triggered during connecting to those dApps.

    Steps:

    1. Connect to given dApp
    2. Trigger any request on dApp side
    3. Try to reject request in Status app by dragging the modal / closing it via [X] button / system back button
    4. See if request has been rejected on dApp's side

    Actual result: request is not rejected.

    requests_not_rejected.mp4

    @pavloburykh
    Copy link
    Contributor

    ISSUE 2 Wallet connect proposal is not rejected on some dApps' side

    For now I have found one example https://yearn.fi/

    Steps:

    1. Trigger wallet connect proposal with given dApp
    2. Decline proposal on Status app side
    3. See if proposal has been declined in https://yearn.fi/ side

    Actual result: nothing happens on sApp side, QR is still open.

    decline_proposal.mp4

    @alwx
    Copy link
    Contributor Author

    alwx commented Jul 24, 2024

    @pavloburykh ready to be checked again

    @pavloburykh
    Copy link
    Contributor

    pavloburykh commented Jul 24, 2024

    @alwx ISSUE 1 is fixed. ISSUE 2 still reproducible for me. Please take a look at some new issues.

    ISSUE 3 Top bar menu in not responding after closing request modal

    Steps:

    1. Connect to https://react-app.walletconnect.com/
    2. Trigger any request
    3. In Status: reject or sign the request
    4. Try to interact with top bar menu

    Actual result: top bar menu elements (i.e. profile, activity center, scanner) are not responding

    telegram-cloud-document-2-5262829113772628161.mp4

    @pavloburykh
    Copy link
    Contributor

    ISSUE 4 Password modal does not disappear after confirming the request

    1. Connect to https://react-app.walletconnect.com/
    2. Trigger any request
    3. In Status: sign the request
    4. See if password modal is closed

    Actual result: password modal does not disappear

    telegram-cloud-document-2-5262829113772628165.mp4

    @pavloburykh
    Copy link
    Contributor

    pavloburykh commented Jul 24, 2024

    ISSUE 5 New requests do not appear in Status app until relogin when previous request has been rejected

    Steps:

    1. Connect to https://react-app.walletconnect.com/
    2. Trigger any request
    3. In Status: reject the request
    4. Trigger another request
    5. See if request modal appears in Status app

    Actual result: new request does not appear until re-login

    request_not_appear.mp4

    @alwx alwx force-pushed the bugfix/20763 branch 2 times, most recently from 6f0be98 to fd9979d Compare July 24, 2024 17:12
    @clauxx
    Copy link
    Member

    clauxx commented Jul 24, 2024

    @alwx seems like all these issues may come from the modal being dismissed twice. I had the same issue in my previous PR. A quick fix could be to check if the modal-id is present in the atom before we dismiss the modal by id, but this could be the problem that I tried to explain with this approach, where some action may be triggered twice. It's possible this came from rebasing develop, but still it's a sign that we might have to rethink this later.

    @clauxx
    Copy link
    Member

    clauxx commented Jul 25, 2024

    @alwx I have a quick fix for issues 3 to 5 in this commit (branched off from this one). It's pretty ugly IMO, but at least it's only a few lines and will be easier to fix it properly later. What do you think?

    @pavloburykh about issue 2, I guess if there's a small number of dapps that don't react to our disconnect, there's not much we can do at the moment. Might be best to have a separate issue for it for the next milestone.

    @alwx
    Copy link
    Contributor Author

    alwx commented Jul 25, 2024

    Issue 4 was fixed yesterday; issue 3 and 5 are fixed now as well.
    In fact, you shouldn't be reproducing issue 2 as well, but if you can reproduce it consistently and only for certain apps then it's the problem of those apps.

    @mariia-skrypnyk
    Copy link

    Hey @alwx @alwx !

    Thanks for fixes.

    Issue 2 - still exist, will create separate issue.
    Issue 3 ✔️
    Issue 4 ✔️
    Issue 5 ✔️

    PR can be merged.

    @alwx alwx merged commit 15a4219 into develop Jul 25, 2024
    6 checks passed
    @alwx alwx deleted the bugfix/20763 branch July 25, 2024 14:51
    ilmotta pushed a commit that referenced this pull request Jul 28, 2024
    …0836)
    
    * Reject wallet-connect request by dragging the modal down (#20763)
    
    * Fix
    ilmotta added a commit that referenced this pull request Jul 30, 2024
    Revisions from develop:
    
    - 59ceddb develop origin/develop fix(wallet): fix bridge transactions (#20902)
    - 99ccbc3 Cover wallet send events with tests Part 2 #20411 #20533 (#20721)
    - 8c2d539 Enabling WalletConnect feature flag (#20906)
    - 67c83b1 fix(wallet): remove edit routes button in bridging (#20874)
    - 11a84ba feat(wallet): disable complex routing (#20901)
    - 1f5bb57 chore(wallet): disable bridging on unsupported tokens (#20846)
    - 4586f80 Add toggle in advanced settings for mobile data
    - 55c620e fix: create password for small screen (#20645)
    - 525609f Wallet Activity: transactions are not sorted by time #20808 (#20862)
    - 9065395 chore(settings): Disable telemetry option (#20881)
    - d27ab75 fix_:display group message using the new ui (#20787)
    - c6a1db6 ci: enable split apks & build only for arm64-v8a (#20683)
    - 73777e0 Ensure keycard account can send transaction after upgrading from v1 to v2 #20552 (#20845)
    - a6d3fc3 [#20524] fix: the missed keypairs are shown in the key pair list screen (#20888)
    - a671c70 fix broken screen and navigation when syncing fails (#20887)
    - a45991b 🥅 Filter connected dapps based on testnet mode, reject proposals and requests gracefully (#20799)
    - 2e9fa22 feat: wallet router v2 (#20631)
    - 737d8c4 rename sub to fix error when requesting to join community (#20868)
    - 3aa7e10 Sync process is blocked on Enabled notifications screen (#20883)
    - c1d2d44 perf: Fix app freeze after login (#20729)
    - 0fed811 e2e: updated testnet switching and added one test into smoke
    - 53c35cb fix(wallet): Linear gradient exception on invalid colors for watched account cards (#20854)
    - be82365 chore(settings)_: Remove testnet toggle from legacy advanced settings (#20875)
    - eae8a65 feat(wallet)_: Add beta info box in activity tab (#20873)
    - fe54a25 fix: not clearing network & web3-wallet on logout (#20886)
    - 15a4219 Reject wallet-connect request by dragging the modal down (#20763) (#20836)
    - 2ffbdac WalletConnect show expired toast (#20857)
    - 402eb83 fix Issue with scrolling WalletConnect transaction on Android (#20867)
    - ff88049 Fix WalletConnect header alignment on Android (#20860)
    - cee2124 WalletConnect no internet edge-cases (#20826)
    - 60ad7c8 chore(tests): New match-strict? cljs.test directive (#20825)
    - 4989c92 fix_: Adding own address as saved addresses (#20839)
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    Archived in project
    5 participants