Skip to content

feat: add Wallet Apps bridge adapter for iframe wallet mode#33

Open
marsiandeployer wants to merge 2 commits intoappsource:mainfrom
marsiandeployer:issue-32-wallet-apps-bridge
Open

feat: add Wallet Apps bridge adapter for iframe wallet mode#33
marsiandeployer wants to merge 2 commits intoappsource:mainfrom
marsiandeployer:issue-32-wallet-apps-bridge

Conversation

@marsiandeployer
Copy link

Summary

  • add wallet-apps-bridge-client.js (EIP-1193 provider bridge over postMessage)
  • inject bridge client in index.html before app bootstrap
  • add integration docs in README.md
  • enable allowAnyHostOrigin by default for faster QA across many wallet host domains
    • accepts https://*, http://localhost*, http://127.0.0.1*
    • can be restricted by setting window.SO_DefinanceBridgeConfig.allowAnyHostOrigin = false + allowedHostOrigins

Why

Needed for MultiCurrencyWallet #/apps embedded mode so DEX connect button uses host wallet via bridge.

Test

  • open with ?walletBridge=swaponline
  • verify window.ethereum.request({ method: "eth_requestAccounts" })
  • verify bridge works on different wallet host domains without allowlist edits

Related: swaponline/MultiCurrencyWallet#5268
Closes #32

@marsiandeployer
Copy link
Author

Update: for current development/testing we use https://dex.onout.org with this bridge-enabled build.

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

Successfully merging this pull request may close these issues.

[Wallet Apps Bridge][DEX mirror (appsource)] Add MCW #/apps iframe compatibility (EIP-1193, multi-domain, iOS/Android)

1 participant