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

Fix: Reject the sign request when cancelling the authentication method + fix cookies issue #16091

Merged
merged 2 commits into from
Aug 13, 2024

Conversation

alexjba
Copy link
Contributor

@alexjba alexjba commented Aug 13, 2024

What does the PR do

closes #16088
+Fixing the shared cookies issues on WalletConnect

Affected areas

WalletConnect

Architecture compliance

  • I am familiar with the application architecture and agreed good practices.
    My PR is consistent with this document: Architecture guidelines

Screenshot of functionality (including design for comparison)

  • I've checked the design and this PR matches it

Impact on end user

What is the impact of these changes on the end user (before/after behaviour)

The dApp flow is completed even when the authentication fails.
Each user profile will use its own cookies for WC

How to test

  1. Start a sign flow and reach the password input stage in Status
  2. Hit cancel or X button.
  3. The sign request should be explicitly rejected and the dApp is informed

Risk

Described potential risks and worst case scenarios.

Tick one:

  • Low risk: 2 devs MUST perform testing as specified above and attach their results as comments to this PR before merging.
  • High risk: QA team MUST perform additional testing in the specified affected areas before merging.

… for each account

WalletConnect cannot operate on shared cookies in between accounts. This commit will split the cookies and cache in different folders with the user public key as folder name.
@alexjba
Copy link
Contributor Author

alexjba commented Aug 13, 2024

@virginiabalducci This PR should also fix the shared cookies issue!

@status-im-auto
Copy link
Member

status-im-auto commented Aug 13, 2024

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 452bebe #1 2024-08-13 10:43:45 ~6 min macos/aarch64 🍎dmg
✔️ 452bebe #1 2024-08-13 10:44:14 ~6 min tests/nim 📄log
452bebe #1 2024-08-13 10:50:44 ~13 min tests/ui 📄log
✔️ 452bebe #1 2024-08-13 10:52:43 ~15 min linux-nix/x86_64 📦tgz
✔️ 452bebe #1 2024-08-13 10:53:39 ~16 min linux/x86_64 📦tgz
✔️ 452bebe #1 2024-08-13 10:54:20 ~17 min macos/x86_64 🍎dmg
✔️ 452bebe #1 2024-08-13 11:11:24 ~34 min windows/x86_64 💿exe
✔️ 452bebe #2 2024-08-13 12:18:00 ~13 min tests/ui 📄log

@alexjba
Copy link
Contributor Author

alexjba commented Aug 13, 2024

@caybro @Khushboo-dev-cpp This one is failing again 🙈

[2024-08-13T10:49:42.242Z] 3: FAIL!  : QmlTests::SwapInputPanel::test_input_greater_than_max_balance() Compared values are not the same
[2024-08-13T10:49:42.242Z] 3:    Actual   (): 0
[2024-08-13T10:49:42.242Z] 3:    Expected (): 5.42
[2024-08-13T10:49:42.242Z] 3:    Loc: [/home/jenkins/workspace/s_linux_x86_64_tests-ui_PR-16091/storybook/qmlTests/tests/tst_SwapInputPanel.qml(433)]

@@ -114,6 +114,7 @@ SQUtils.QObject {
if (session === null)
return
root.displayToastMessage(qsTr("Failed to authenticate %1 from %2").arg(methodStr).arg(session.peer.metadata.url), true)
root.sessionRequestResult(request, false /*isSuccessful*/)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexjba this is nice, but can we do the same if the user cancels the "Sign" request? That happens before the authentication popup is run.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do. We reject any sign request if the sign modal is closed in any other way except when hitting Sign

@caybro
Copy link
Member

caybro commented Aug 13, 2024

@caybro @Khushboo-dev-cpp This one is failing again 🙈

[2024-08-13T10:49:42.242Z] 3: FAIL!  : QmlTests::SwapInputPanel::test_input_greater_than_max_balance() Compared values are not the same
[2024-08-13T10:49:42.242Z] 3:    Actual   (): 0
[2024-08-13T10:49:42.242Z] 3:    Expected (): 5.42
[2024-08-13T10:49:42.242Z] 3:    Loc: [/home/jenkins/workspace/s_linux_x86_64_tests-ui_PR-16091/storybook/qmlTests/tests/tst_SwapInputPanel.qml(433)]

Yeah, this one tends to fail from time to time, I'll look into that. But I was never able to reproduce it locally, it's just on CI :/

@Khushboo-dev-cpp
Copy link
Contributor

Khushboo-dev-cpp commented Aug 13, 2024

@caybro @Khushboo-dev-cpp This one is failing again 🙈

[2024-08-13T10:49:42.242Z] 3: FAIL!  : QmlTests::SwapInputPanel::test_input_greater_than_max_balance() Compared values are not the same
[2024-08-13T10:49:42.242Z] 3:    Actual   (): 0
[2024-08-13T10:49:42.242Z] 3:    Expected (): 5.42
[2024-08-13T10:49:42.242Z] 3:    Loc: [/home/jenkins/workspace/s_linux_x86_64_tests-ui_PR-16091/storybook/qmlTests/tests/tst_SwapInputPanel.qml(433)]

Yeah, this one tends to fail from time to time, I'll look into that. But I was never able to reproduce it locally, it's just on CI :/

Ive noticed too! def needs to be looked at...
For me it doesn't fail locally either!

Copy link

@virginiabalducci virginiabalducci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this with different accounts and looks good on my end!

@alexjba alexjba merged commit de91650 into master Aug 13, 2024
8 checks passed
@alexjba alexjba deleted the fix/WC-cookies branch August 13, 2024 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants