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: emit chainChanged first #2661

Merged
merged 2 commits into from
Oct 19, 2023
Merged

fix: emit chainChanged first #2661

merged 2 commits into from
Oct 19, 2023

Conversation

iamacook
Copy link
Member

What it solves

Resolves dApp chain alignment

How this PR fixes it

The chainChanged event is not emitted before the `accountsChanged event when updating a session.

How to test it

Connect to Aura Finance and observe the initial chain matching that of the Safe, as well as changing with Safe switches across chains.

Checklist

  • I've tested the branch on mobile 📱
  • I've documented how it affects the analytics (if at all) 📊
  • I've written a unit/e2e test for it (if applicable) 🧑‍💻

@iamacook iamacook self-assigned this Oct 19, 2023
@iamacook iamacook changed the title fix: emit first fix: emit chainChanged first Oct 19, 2023
@github-actions
Copy link

github-actions bot commented Oct 19, 2023

Branch preview

✅ Deploy successful!

https://wc_chain_alignment--walletweb.review-wallet-web.5afe.dev

@github-actions
Copy link

github-actions bot commented Oct 19, 2023

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@github-actions
Copy link

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
74.99% (-0.32% 🔻)
9298/12399
🔴 Branches
49.21% (-0.39% 🔻)
1894/3849
🔴 Functions
57.18% (-0.66% 🔻)
1378/2410
🟡 Lines
76.58% (-0.35% 🔻)
8409/10981
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴
... / WalletConnectWallet.ts
41.98% (-48.15% 🔻)
19.05% (-71.43% 🔻)
20% (-64% 🔻)
42.86% (-49.35% 🔻)
🟢
... / constants.ts
83.33% (-16.67% 🔻)
100% 100% 100%

Test suite run success

1026 tests passing in 141 suites.

Report generated by 🧪jest coverage report action from c47e37a

@@ -344,36 +344,36 @@ describe('WalletConnectWallet', () => {
expect(emitSessionEventSpy).toHaveBeenCalledTimes(2)
})

it('should call emitSessionEvent with the correct parameters', async () => {
it.only('should call emitSessionEvent with the correct parameters', async () => {
Copy link
Member

Choose a reason for hiding this comment

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

Don't forget the only.

Copy link
Member Author

Choose a reason for hiding this comment

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

Addressed in 09db2d4.

@iamacook iamacook merged commit 2bb0878 into nect Oct 19, 2023
7 of 9 checks passed
@iamacook iamacook deleted the wc-chain-alignment branch October 19, 2023 11:47
@github-actions github-actions bot locked and limited conversation to collaborators Oct 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants