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

Authenticate with service not always respecting correct method #1374

Closed
chasefleming opened this issue Aug 23, 2022 · 0 comments
Closed

Authenticate with service not always respecting correct method #1374

chasefleming opened this issue Aug 23, 2022 · 0 comments
Assignees
Labels
Bug Something isn't working Feedback

Comments

@chasefleming
Copy link
Member

chasefleming commented Aug 23, 2022

Problem

When passing a service into authenticate from the Discovery API, if the service method is "POP/RPC" or "TAB/RPC" it will still use "IFRAME/RPC" since that is the default config method. See the code below:

const isServiceMethodUnchangable = method =>
  ["EXT/RPC", "WC/RPC"].includes(method)

const discoveryWalletMethod = await config.first([
    "discovery.wallet.method",
    "discovery.wallet.method.default",
  ])

const method = isServiceMethodUnchangable(service?.method)
    ? service.method
    : discoveryWalletMethod || service.method
@chasefleming chasefleming added Bug Something isn't working Feedback labels Aug 23, 2022
@chasefleming chasefleming self-assigned this Aug 23, 2022
@chasefleming chasefleming moved this to 🆕 New in FCL 2022 Aug 23, 2022
chasefleming added a commit that referenced this issue Aug 23, 2022
chasefleming added a commit that referenced this issue Aug 25, 2022
* PKG -- [fcl] Respect service method for discovery

Addresses: #1374

* PKG -- [fcl] Add changeset

Co-authored-by: Chase Fleming <1666730+chasefleming@users.noreply.github.com>
justinbarry pushed a commit that referenced this issue Sep 6, 2022
* PKG -- [fcl] Respect service method for discovery

Addresses: #1374

* PKG -- [fcl] Add changeset

Co-authored-by: Chase Fleming <1666730+chasefleming@users.noreply.github.com>
huyndo pushed a commit that referenced this issue Sep 24, 2022
* PKG -- [fcl] Respect service method for discovery

Addresses: #1374

* PKG -- [fcl] Add changeset

Co-authored-by: Chase Fleming <1666730+chasefleming@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Feedback
Projects
No open projects
Status: 🆕 New
Development

No branches or pull requests

1 participant