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

Improve deposit page for coins or tokens on multiple blockchains #3400

Open
abitmore opened this issue Oct 21, 2021 · 6 comments
Open

Improve deposit page for coins or tokens on multiple blockchains #3400

abitmore opened this issue Oct 21, 2021 · 6 comments

Comments

@abitmore
Copy link
Member

abitmore commented Oct 21, 2021

Is your feature request related to a problem? Please describe.

Tokens like USDT now natively on multiple blockchains. Many other exchanges support deposits on multiple chains. It is good for bitshares-ui to support multiple chains too.

The deposit page of a modern exchange looks like:
image

As of writing, on bitshares-ui, when depositing USDT, the deposit page looks like:
image

The legacy deposit page looks like:
image

And actually the XBTS.io exchange does support multiple chains on their own website:
image

image

image

Describe the solution you'd like
Add a drop-down list on the deposit page so that users can choose to deposit on which chain.
Gateway API changes:

  • return a list of supported chains when querying a coin/token.
  • when querying for deposit address
    • if chain name is specified, return deposit address of the specified chain
    • if chain name is not specified (this need to be kept for backward compatibility), ideally we need to know which chain it is on

Describe alternatives you've considered
/

Additional context

"Improve deposit page to support showing the Blockchain name of deposit address hence some coins or tokens names can co-exist over multiple blockchains"

@ioBanker
Copy link
Member

This would require some little work over Gateway API data of coin with adding flag in case coin can exist over multiple blockchains so a 3rd dropdown list at UI will appear when the flag is enabled, it might look like this:

image

@sschiessl-bcp
Copy link
Contributor

This would require some little work over Gateway API data of coin with adding flag in case coin can exist over multiple blockchains so a 3rd dropdown list at UI will appear when the flag is enabled, it might look like this:

image

All the data required is already existing in the current configuration, the wallet of a token is the target blockchain.

@abitmore
Copy link
Member Author

We need to replace "native" in the description to the real name of the blockchain or protocol, and additional info when applicable. For example, for USDT, we need to show contract address since there are multiple contracts.
An easier solution is to fetch the whole description from the gateway via an API call.

@abitmore
Copy link
Member Author

All the data required is already existing in the current configuration, the wallet of a token is the target blockchain.

The Address Generator API need to accept the wallet type as input. https://github.com/bitshares/bitshares-ui/wiki/Gateway-Integration-Requirements#5-address-generator

@sschiessl-bcp
Copy link
Contributor

sschiessl-bcp commented Oct 27, 2021

What I was trying to say, which goes in hand with what you say, that this is only frontend work pretty much since the current gateway configurations already contain the information. The gateway would then provide two configurations for the same token, with the sole difference that the wallet differs for both (e.g. USDT on ethereum or tron)

@sschiessl-bcp
Copy link
Contributor

@xiangxn are you familiar with gateway code? I did similar work in a fork, I could contribute here.

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

3 participants