[Cashtab] Advanced Tooling + Airdrop facility
Summary:
New 'Tools' screen proposed to house the following upcoming functions:
- T1984
- T1970
- T1717
- T2055
- T1992
- T2080
- T2017
T1984 (Airdrops) is the first cab off the rank and is included as part of this diff.
Tested across web and mobile devices.
Explainer video: T2185
Test Plan:
- npm start
- create a new eToken, send it to a bunch of addresses and note the Token ID
- navigate back and forth between the Tools screen and other existing screens to ensure no state-related errors
- navigate to Tools and expand the Airdrop section. Ensure the 'Calculate Airdrop', 'Copy to Send screen' and 'Copy to Clipboard' buttons are all disabled by default and the balance header is displayed.
- fill in the ID and airdrop total, ensuring that the 'Calculate Airdrop' button is only enabled once both fields have valid input
- fill in spaces/symbols/non-64 char string for the token ID and ensure a validation error is displayed and Airdrop button is disabled
- attempt to input alphanumeric figures or symbols for the dividend total and ensure input is prevented by the frontend validation
- Fill in with valid input for token ID and total airdrops, then click 'Calculate Pro-Rata Airdrop'.
- ensure the airdrop for each address is proportional to their holding of the eToken.
- if the airdrop for an address is too small resulting in sub-dust outputs, verify a soft error message is displayed notifying the user. This still allows the user to click on the now-enabled 'Copy to Clipboard' and Copy to Send screen' buttons. When clicking on the 'Copy to Send screen' button, ensure the Send screen validation picks up on the less than dust error as well.
- if the airdrop is adequately sized where all outputs are above dust, verify 'Copy to Clipboard' correctly copies the multiple recipient outputs.
- verify the 'Copy to Send screen' button routes the user to the Send screen with the sending mode defaulting to 'one to many' and the recipients field already populated.
- click send and verify a successful one to many transaction in explorer and the app's Tx History.
Reviewers: bytesofman, #bitcoin_abc
Reviewed By: bytesofman, #bitcoin_abc
Subscribers: aimal, Klakurka
Differential Revision: https://reviews.bitcoinabc.org/D10758