Page MenuHomePhabricator

[Cashtab] Airdrop Option - minimum etoken holder balance eligibility
ClosedPublic

Authored by emack on Apr 1 2022, 03:30.

Details

Summary

As per T2371, new option for airdrop organiser to restrict airdrop to users who hold a custom minimum amount of their eToken.

Test Plan
  • execute standard airdrop calculation to ensure no regression
  • toggle the 'Minimum eToken holder balance' option and ensure the number input is rendered
  • attempt to enter in a negative or non-numeric input and verify validation error
  • specify a valid minimum etoken balance that will filter out a portion of the original recipient list. Ensure the pro rata airdrop amount is calculated correctly amongst the remaining recipients (i.e. the Total XEC Airdrop is split across the qualified recipients in full)

Diff Detail

Repository
rABC Bitcoin ABC
Branch
minTokenBalanceAirdrop
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 18717
Build 37225: Build Diffcashtab-tests
Build 37224: arc lint + arc unit

Event Timeline

emack requested review of this revision.Apr 1 2022, 03:30
bytesofman requested changes to this revision.Apr 1 2022, 21:55

image.png (366×431 px, 24 KB)

Issue with validation:

  1. Calculate an airdrop with a min balance
  2. Delete the min balance or make the validation error
  3. Enter a new min balance --- validation error persists.
web/cashtab/src/components/Airdrop/Airdrop.js
130 ↗(On Diff #33036)

looks like this should be a bool?

159 ↗(On Diff #33036)

.gt is what's used elsewhere in the app -- let's keep that consistent here. Equivalent approaches just a syntax thing.

This revision now requires changes to proceed.Apr 1 2022, 21:55
emack marked 2 inline comments as done.

Fixed validation issue, fixed loading status issue, updated state variables and BigNumber operator usage

This revision is now accepted and ready to land.Apr 5 2022, 16:18