Sync Support Tiers when wire_rewards is updated
-
Run UserWireRewardsMigrationDelegate::migrate
whenwire_rewards
is updated -
Clear existing Support Tiers on migration -
Ensure Support Tier GUID is persistent (based on currency and amount) when migrating
Original implementation details
- New delegate called whenever
wire_rewards
is modified- Read existing rewards. Create new ones, delete deprecated and modify existing.
Notes
- A Support Tier should be created if there isn't another one with the same currency/amount values
- A Support Tier should be deleted if there's no matching wire_rewards entry for it
- A Support Tier should be modified if there's a difference in the wire_rewards description text (same currency/amount match)
Edited by Emiliano Balbuena