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

feat: multiple network/bridge support ? #6

Open
paouvrard opened this issue Mar 7, 2021 · 2 comments
Open

feat: multiple network/bridge support ? #6

paouvrard opened this issue Mar 7, 2021 · 2 comments
Labels
enhancement New feature or request P2

Comments

@paouvrard
Copy link
Member

Moving the discussion here from #4 (review) and #4 (comment)

Dapps may want to connect to different bridges simultaneously and record bridge transfers of different bridges on the same URL.
The current lib design assumes that dapps like https://github.com/near/rainbow-bridge-frontend will be connecting to a single bridge per URL (rinkeby.bridge.near.org for example) and uses process.env to access bridge contract addresses (process.env.ethLockerAddress for example). Transfers recorded in localStorage do not contain information about token connectors, bridges or networks.

@mfornet
Copy link
Contributor

mfornet commented Mar 8, 2021

I don't think accessing several bridges simultaneously will be needed soon, so this is no high priority.

However the current design is very error prone for developers that switch between network only for testing (which should be common).

@paouvrard
Copy link
Member Author

Note: when testing, switching bridge/network is done via process.env and when testing a localhost dapp, different instances for different bridges can be tested on different ports so that transfers of different bridges don't conflict.

@alexauroradev alexauroradev added enhancement New feature or request P2 labels Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P2
Projects
None yet
Development

No branches or pull requests

3 participants