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

await channelProvider.mountWalletComponent(...) never returns #2

Open
xklob opened this issue Sep 16, 2020 · 1 comment
Open

await channelProvider.mountWalletComponent(...) never returns #2

xklob opened this issue Sep 16, 2020 · 1 comment

Comments

@xklob
Copy link

xklob commented Sep 16, 2020

Scope: mounting the x-state wallet as per the instructions in the quick start - dapp section

Summary: Mounting the wallet component as per the instructions, even without the trailing slash as described in issue statechannels/statechannels#2563 , never returns if called with await

Steps to reproduce the behavior:

  1. Create a simple app following the instructions as per the quick start. **Make sure that the trailing slash is removed in the url for the x-state wallet. (see channelProvider.mountWalletComponent(...) fails if there is a trailing slash on the url statechannels#2563)
  2. Bundle/webpack/etc and serve a compiled simple app with a button to enable the wallet. Run on port 80 to avoid CORS issues.

Because the await statement never returns, my code never gets to the second line below to enable() the channel provider:

  await window.channelProvider.mountWalletComponent('https://xstate-wallet.statechannels.org')
  await window.channelProvider.enable()

Note that I can still enable the channel provider in the browser by using the console and running the command:
window.channelProvider.enable()

@geoknee
Copy link
Contributor

geoknee commented Sep 17, 2020

Hi @ditchfieldcaleb thanks for posting this issue!

Could you please try the updated xstate-wallet url as per statechannels/statechannels#2560 , and let me know if you fare any better? I suspect the issue is that the iframe-channel-provider is "ahead" of the wallet you are pointing at, and there have been breaking changes.

@andrewgordstewart andrewgordstewart transferred this issue from statechannels/statechannels Jan 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants