As per T2140:
Option to parse the recipient airdrop amounts and filter out drops which are below dust (5.5 XEC).
Details
- Reviewers
bytesofman - Group Reviewers
Restricted Project - Commits
- rABCb28ca29c09b4: [Cashtab] Airdrop Option - ignore airdrops below dust
Without ticking the 'ignore airdrops below min. payment dust' checkbox:
- calculate an airdrop with at least 1 sub-dust airdrop and ensure the 'At least one airdrop is below the...' alert is displayed
- calculate an airdrop with no sub-dust airdrops and ensure no such alert is displayed
Tick the 'ignore airdrops below min. payment dust' checkbox:
- calculate an airdrop with at least 1 sub-dust airdrop and ensure it is not in the payment output list of airdrops
- ensure this filtered payment output can be copied to clipboard
- ensure this filtered payment output can be sent to the Send screen, sent successfully and block explorer showing the correct outputs
- calculate an airdrop with no sub-dust airdrops and ensure no regression
Ensure no regression on routing from eToken Send screen to the airdrop screen.
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
web/cashtab/src/components/Airdrop/Airdrop.js | ||
---|---|---|
231 ↗ | (On Diff #32986) | I think this approach would be okay if we stopped here at features, but I think it would also be nice to eventually add an option to ignore balances below some custom level. That way an eToken creator could encourage people to hold some kind of arbitrary minimum balance of their eToken to be eligible for airdrops. For the dust case, just popping out the dust values does not have a major impact on the size of the total airdrop. However, for a custom min threshold, there would be this impact. So -- we'll have to run the calc twice, or start with a list of airdrop addresses and their eToken balance Option A
Option B
For the purposes of this specific diff...it's okay to land this diff using your current approach, but please create a task to solve the problem described above. This will eventually need to be the way it's done for dust, so it is probably less complicated in the long run to do it now. |
407 ↗ | (On Diff #32986) | Use a switch |
Implemented extra pro rata calculation so airdrops below dust are filtered out, before a second pro rata calculation is carried out so the total airdrop amount is distributed corrected across the remaining recipients.