Page MenuHomePhabricator

[Cashtab] Support minting additional NFT Parent tokens
ClosedPublic

Authored by bytesofman on Nov 7 2024, 04:34.

Details

Reviewers
emack
Group Reviewers
Restricted Project
Commits
rABC31c2a8e4b953: [Cashtab] Support minting additional NFT Parent tokens
Summary

Depends on D17091

We are currently rendering this method for NFT1 Parent tokens with mint batons, but it fails because we do not specify type.

It's a bug / oversight. Patch by passing the token protocol number, which is available from chronik utxo and is required input for the ecash-lib slp method.

Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Branch
slpv1-mint-more-nftparent
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 31055
Build 61612: Build Diffcashtab-tests
Build 61611: arc lint + arc unit

Event Timeline

bytesofman published this revision for review.Nov 7 2024, 04:40
emack requested changes to this revision.Nov 7 2024, 10:25
emack added a subscriber: emack.
emack added inline comments.
cashtab/src/components/Etokens/Token/index.js
1039

considering:

  • mintBatons are initialized to null as part of defaultUncachedTokenInfo
  • getMintBatons in slpv1 merely returns filtered matches

is there a check somewhere higher up in the flow that ensures mintBatons.length > 1 before you call index 0?

This revision now requires changes to proceed.Nov 7 2024, 10:25
bytesofman added inline comments.
cashtab/src/components/Etokens/Token/index.js
1039

It could probably be extended but

  • current behavior does not make this check; this diff is just moving mintBatons[0] from one location to another; in either case there will be an error thrown if we can't find it
  • the function is only accessible from the minting form, which is only rendered if mintBatons.length > 0

I don't think we should also include this type of improvement in this diff, if needed should be its own thing.

This revision is now accepted and ready to land.Nov 8 2024, 03:33