-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Nobody is in the mood to make another breaking change to Treasury, though if we ever need to make one in the distant future, it would be best to make as many of these breaking changes all in one go to reduce the burden to implementers.
To avoid clogging up our issue tracker, I'd prefer to group these suggestions here.
Without further ado, let's look at the current proposals. Please add your vote in the comments.
Proposal: Adjust return type of EconomyProvider#registerCurrency from TriState to Boolean
EconomyProvider#registerCurrency from TriState to BooleanDescription
There is no purpose for the third state,
FALSE, in theTriStatethat is returned fromEconomyProvider#registerCurrency.TRUEis used for 'it worked',UNSPECIFIEDis used for 'it was already registered', and an exception should be thrown in the overlappingCompletableFuturereturned if the currency couldn't be registered, leaving zero purpose for theFALSEstate.Therefore, I recommend we simply switch the return type to
Booleanso thatTriState#TRUEis represented by atruevalue andTriState#UNSPECIFIEDis represented by afalsevalue (so that the boolean returned is a question of whether the currency was not already registered).Voting
- Yay: lokka30
- Nay:
Sketchpad of ideas that need to be described and added above:
deleteAccountshould return nothing (void), the boolean resultfalseis meaningless since an exception should be thrown if the deletion doesn't go through.
Any further proposals? Add yours below and I'll pop it in here. Your vote counts too - add yours in the comments.