Skip to content
This repository was archived by the owner on Nov 10, 2023. It is now read-only.

Conversation

@iamacook
Copy link
Contributor

What it solves

Resolves outdated pairing QR upon connection rejection.

How this PR fixes it

onDisconnect was only being called when the provider was connected. If the user rejects a pairing request, the provider was !connected and would therefore not reset the wallet, invalidating the QR code. The connected flag has been removed.

How to test it

  • Scan the pairing QR in the mobile app but reject the pairing request.
  • Observe the QR disappear, requesting regeneration.

@iamacook iamacook added the Bug 🐛 Something isn't working label Feb 23, 2022
@iamacook iamacook requested a review from usame-algan February 23, 2022 15:40
@iamacook iamacook self-assigned this Feb 23, 2022
@github-actions
Copy link

CLA Assistant Lite All Contributors have signed the CLA.

resetWalletState({ disconnected: true, walletName: PAIRING_MODULE_NAME })
}

provider.wc.on('disconnect', onDisconnect)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

When rejecting the pairing request, this fires.

Copy link
Member

Choose a reason for hiding this comment

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

Looks like I made a bug.

@github-actions
Copy link

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

Deployment links

🟠 Rinkeby Mainnet 🟣 Polygon 🟡 BSC Arbitrum 🟢 Gnosis Chain

Copy link
Contributor

@usame-algan usame-algan left a comment

Choose a reason for hiding this comment

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

LGTM!

@iamacook iamacook merged commit 7673752 into dev Feb 23, 2022
@iamacook iamacook deleted the disconnect-regen-qr branch February 23, 2022 15:48
@github-actions github-actions bot locked and limited conversation to collaborators Feb 23, 2022
@liliya-soroka
Copy link
Member

@iamacook , verified
can be included in release PR

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Bug 🐛 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants