Firebot icon indicating copy to clipboard operation
Firebot copied to clipboard

fix: Offline Currency Payout Improvements

Open phroggster opened this issue 1 year ago • 2 comments

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 offline property 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

phroggster avatar Sep 10 '24 04:09 phroggster

~~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.~~

phroggster avatar Sep 11 '24 01:09 phroggster

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.

phroggster avatar Sep 11 '24 09:09 phroggster