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

[Bug] Currencies Pay Out While Offline Even if Offline Payout is Disabled #2801

Open
CrowbarToolsRobot opened this issue Sep 10, 2024 · 1 comment
Labels
Bug A defect in the app Dev Complete Ready For Review Issue has a PR opened and is undergoing dev review.

Comments

@CrowbarToolsRobot
Copy link
Collaborator

Description

Users with Bonus Currency should only get Bonus Currency while the stream is online if offline currency disbursal is enabled. However, if offline currency disbursal is disabled, they will still accrue bonus currency in error.

From Discord user Marstead

Steps to Reproduce

  1. Add a currency
  2. Disable offline payouts
  3. Set a custom role payout modifier
  4. Profit while offline

Expected Behavior

No offline currency payouts to occur

Firebot Version

v5.63.2

Submitted By

phroggie

Created via Discord.

@CrowbarToolsRobot CrowbarToolsRobot added the Bug A defect in the app label Sep 10, 2024
phroggster added a commit to phroggster/Firebot that referenced this issue Sep 11, 2024
- Checking then unchecking the Offline Payout checkbox in the add or
  edit currency dialog results in the offline property being assigned to
  an empty string.
- This conflicts with the type definition of a Currency in
  currency-access.ts.
- So pay special attention to it potentially being an empty string.
- See issue crowbartools#2801
@phroggster
Copy link
Collaborator

To clarify, you have to first check the Offline Payouts checkbox, then uncheck it in order to actually trigger this.

@phroggster phroggster added Dev Complete Ready For Review Issue has a PR opened and is undergoing dev review. labels Sep 11, 2024
phroggster added a commit to phroggster/Firebot that referenced this issue Sep 11, 2024
- Checking then unchecking the offline payout option in an add or edit
  currency modal will assign an empty string to the data model.
- The data model is typed as a Number.
- This typing is exposed to external scripts.
- So trim the null or empty string on addOrEditCurrency controller save
  to prevent a string from getting through.
- See issue crowbartools#2801.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A defect in the app Dev Complete Ready For Review Issue has a PR opened and is undergoing dev review.
Projects
Status: Todo
Development

No branches or pull requests

2 participants