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

Bobtimus should dictate asset IDs #203

Open
bonomat opened this issue Jul 31, 2021 · 0 comments
Open

Bobtimus should dictate asset IDs #203

bonomat opened this issue Jul 31, 2021 · 0 comments

Comments

@bonomat
Copy link
Member

bonomat commented Jul 31, 2021

At the moment bobtimus as well as the wallet have their own asset configurations. Especially in dev mode this leads to problems because each tool needs to be compiled/configured with the same asset ID.

The actual problem is that the wallet assumes to know the asset ID when executing certain actions.
E.g.

  • for our atomic swaps we have an SSE endpoint which returns bid/ask prices for usdt/btc implying the asset IDs
  • in the wallet we have makeSellCreateSwapPayload/makeBuyCreateSwapPayload and makeLoanRequestPayload. Each imply to know about the asset IDs.

Imho a better architecture would be to let bobtimus dictate the asset IDs. When forwarded to the wallet the wallet can then reason about these IDs.
In fact, it should use the pre-configured asset IDs for displaying purposes.
For example, if the user clicks on swap in Waves, the wallet pops up and the user needs to confirm.
Here the wallet should either display the asset ticker (LBTC/LUSDT) for known asset IDs or the asset ID itself.

In production, the wallet can retrieve asset tickers from blockstream's registry and in devmode we could either pre-configure it or provide an additional endpoint to bobtimus.

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

1 participant