Page MenuHomePhabricator

[Cashtab] [Chronik] [Tx Gen] Token transaction refactor - part 2 sendToken
ClosedPublic

Authored by emack on Oct 19 2022, 13:30.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Project
Summary

Depends on D12299

As per T2503

Refactor the sendToken function to utilize the newly landed generateTxInput & generateTxOutput utility functions, as well as the new approach of signing input UTXOs, building tx and broadcasting via the chronik client.

At this point in the diff still avoid burning tokens because that's still being broadcasted via bch-api, which will confuse chronik and result in 'Invalid SLP burns' errors when trying to create another token.

Test Plan

npm start
send an existing token and verify tx on explorer (fee, token change, xec change...etc)
send a newly created token and verify tx on explorer (fee, token change, xec change...etc)
send max balance of token and verify tx on explorer there are no token change outputs

Diff Detail