Page MenuHomePhabricator

[Cashtab] Upgrade existing token page to show trading info and display tokens the user does not hold
AbandonedPublic

Authored by bytesofman on Fri, Oct 25, 19:44.

Details

Reviewers
emack
Group Reviewers
Restricted Project
Summary

Cashtab's "token" page used to be only for sending tokens. Gradually we expanded token actions. Now there is a good deal of complicated logic to handle the different actions that are available for different tokens.

Not to worry, we have much more complicated actions to add.

It makes sense to support a single screen that loads based on a tokenId. The tokenId is the "contract address" of eCash, and we want users to be able to share tokenIds with each other to see specific info (and orderbook) for a given tokenId.

The feature will need to be slightly different for different token types. Because this diff is already large, add support for SLP1 only.

  • User can visit a token/<tokenId> page and load info about the token if they have no token balance and token is not in cache (works for any token)
  • User can see active offers for SLP1 tokens
  • User can see a notice that it is blacklisted (and no active offers) if this is the case
Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Branch
token-landing-page
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 30919
Build 61341: Build Diffcashtab-tests
Build 61340: arc lint + arc unit

Event Timeline

rebase, remove debug logs, remove unrelated changes

rebase, update logic in token landing page for rebase

margin for info box, only load orderbook for SLP fungible tokens

bytesofman edited the summary of this revision. (Show Details)
emack requested changes to this revision.Tue, Oct 29, 12:45
emack added a subscriber: emack.

More than half the diff seems to be linting changes. Can you touch it and lint in a separate diff and then rebase this one?

This revision now requires changes to proceed.Tue, Oct 29, 12:45

image.png (1×329 px, 60 KB)

This is pretty unsightly - can you separate the orderbook in its own Buy Alita toggle?

Will make some smaller diffs that build up to this

  • Support tokenId not in wallet
  • Show (better looking) orderbook if SLP1