Firebot
Firebot copied to clipboard
fix: Offline Currency Payout Improvements
Description of the Change
- Currency payouts would stop paying out while offline once any currency had a zero offline payout or was left at the defaults.
- Changed it to keep checking additional currencies.
- As well, the model's
offlineproperty is an empty string if the checkbox is checked, then unchecked in the add or edit currency model (addOrEditCurrency.js/html).- ~~I don't want to expand the Currency type definition in currency-access.ts, but we might want to.~~ Edit: I didn't.
- Fixed this in (attempt two, in) the controller's save function to undefine the value if it's null or empty.
Applicable Issues
#2796. #2801
Testing
Minimal, but yes. Verified bugs existed, then verified that this fixed them.
Screenshots
N/A
~~Ebiggz / et. al: will you let me know if you'd rather I actually overwrite the model's empty string .offline property to a 0 or null in addOrEditCurrency.js when it's saving the currency instead of this approach? I feel hackish about any answer to this at this point, and am unsure of what's the least-worst solution.~~
I have reverted my prior 2801 commit, and gone ahead and fixed it properly. Retested with every variation that I could come up with to break it, and this works better, and is better for the outside world.