Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to support mint cap switch. #151

Conversation

rahulgi
Copy link
Member

@rahulgi rahulgi commented Nov 13, 2018

Switch to using capped-mintable calculation after 11/16/18 UTC midnight.
Also update unminted notification text.

export const MINT_CAP = RAHA_UBI_WEEKLY_RATE.times(MAX_WEEKS_ACCRUE);

// Set to midnight on Nov 16th, 2018 UTC
const MINT_CAP_TRANSITION_DATE_UTC = Date.UTC(2018, 10, 16);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I think moving these consts to shared would be nice

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed, I'll do that in a separate PR

packages/server/src/routes/cron/notifyOnUnminted.ts Outdated Show resolved Hide resolved
? `Mint ${maxMintable} Raha now!`
: `Mint ${maxMintable} Raha before it's too late!`;
const body = isMintCapped
? "You can't get any more basic income until you've minted. Tap to mint now and keep receiving your Raha!"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Future work: I'm thinking some people might not want to be notified regularly when they hit the max amount, especially while Raha has no actual value. We should allow users to manage these in in-app Settings and via system-level notification settings (https://developer.android.com/guide/topics/ui/notifiers/notifications Notification Channels on Oreo) so people don't block all notifications from Raha.

Copy link
Member Author

@rahulgi rahulgi Nov 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Created rahafoundation/raha-mobile-app#508 to track.

Switch to using capped-mintable calculation after 11/16/18 UTC midnight.
Also update unminted notification text.
@rahulgi rahulgi force-pushed the rahulgi/enhancement/add-mint-cap-transition-date-switch branch from f3236f4 to 39bf685 Compare November 14, 2018 07:11
@rahulgi rahulgi merged commit bea9433 into rahulgi/feature/notify-on-unminted Nov 14, 2018
@rahulgi rahulgi deleted the rahulgi/enhancement/add-mint-cap-transition-date-switch branch November 14, 2018 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants