HomePhabricator

[Cashtab] Handle multiple token types on token action screen

Description

[Cashtab] Handle multiple token types on token action screen

Summary:
The send-token page was built to only send SLP1 fungible tokens. We will add support for all eCash tokens. So, we need a way to show the user what kind of token this is and control the available actions based on the type.

Add this functionality.

We add mocks and test to ETokens/ because the plan is to migrate the send-tokens/ route and screen to a token-actions/ route and screen, to be handled in a later diff.

Summary of changes

  • Add an icon on the token page a user can click to get more info about the type of token
  • conditionally render token actions depending on the token type (for now, it's just all or nothing; we do not render actions if cashtab does not yet support this type of token)
  • confirm expected behavior with new tests and mocks (we have to update the mocks in SendToken since they were stubs, and now that we conditionally render on token type, we need to know the token type)

Test Plan: npm test

Reviewers: #bitcoin_abc, emack

Reviewed By: #bitcoin_abc, emack

Subscribers: emack

Differential Revision: https://reviews.bitcoinabc.org/D15967

Details

Provenance
bytesofmanAuthored on Apr 12 2024, 17:21
bytesofmanPushed on Apr 16 2024, 03:09
Reviewer
Restricted Project
Differential Revision
D15967: [Cashtab] Handle multiple token types on token action screen
Parents
rABCd502a7dfe0e2: [Cashtab] Add function to generate target outputs for an slpv1 nft parent mint…
Branches
Unknown
Tags
Unknown