Open web4er opened 1 year ago
should not display any multiplier info to a normal bounty hunter with default multiplier settings
/assign
Deadline | Mon, 31 Jul 2023 13:13:02 UTC |
Registered Wallet | Please set your wallet address to use `/wallet 0x0000...0000` |
/wallet 0x0000...0000
if you want to update your registered payment wallet address @user./unassign
You have been unassigned from the bounty @EresDev
If the multiplier is not 1.0 then show the multiplier number, reason, and total.
/multiplier 0.7 @web4er "testing"
Successfully changed the payout multiplier for @web4er to 0.7. The reason provided is "testing".
/assign
Deadline | Mon, 31 Jul 2023 13:15:15 UTC |
Registered Wallet | 0x1F9FCc0E84dc2094499b848AE37Cd6a51db03Ff2 |
Payment Multiplier | 0.70 |
Multiplier Reason | testing |
Total Bounty | 8750 USD |
/wallet 0x0000...0000
if you want to update your registered payment wallet address @user./unassign
You have been unassigned from the bounty @web4er
If the multiplier is 1.0 and a reason is set, show all the multiplier details, but don't show the total.
/multiplier 1 @web4er "testing again"
Successfully changed the payout multiplier for @web4er to 1. The reason provided is "testing again".
/assign
Deadline | Mon, 31 Jul 2023 13:18:06 UTC |
Registered Wallet | 0x1F9FCc0E84dc2094499b848AE37Cd6a51db03Ff2 |
Payment Multiplier | 1.00 |
Multiplier Reason | testing again |
/wallet 0x0000...0000
if you want to update your registered payment wallet address @user.don't show any multiplier info when message is set as an empty string and multiplier is 1
This basically brings back the default mode, when nothing was done to a hunter's multiplier.
/multiplier 1 @web4er ""
Successfully changed the payout multiplier for @web4er to 1. The reason is not provided.
/unassign
You have been unassigned from the bounty @web4er
/assign
Deadline | Mon, 31 Jul 2023 13:22:12 UTC |
Registered Wallet | 0x1F9FCc0E84dc2094499b848AE37Cd6a51db03Ff2 |
/wallet 0x0000...0000
if you want to update your registered payment wallet address @user./unassign
You have been unassigned from the bounty @web4er
/multiplier 1 @web4er ""
I'm curious about this one.
You should be able to set your multiplier and not add an empty string, for example,
/multiplier @pavlovcik 1
Should be the correct way to not set a reason. Technically because you set an empty string, shouldn't the reason be an empty string instead of null? In which case shouldn't the reason render?
I actually do like this result, where the bot understands that an empty string means null but still just curious about it.
Yes, you can skip the reason from the command and it will work as it was working before. Writing some tests for this below.
I don't know if it was intentional, but one thing I didn't like in the code was, appending an empty space to the reason. This was before my changes: https://github.com/web4er/ubiquibot/blob/bc701f8a0126db2faa4f6e6f819f9139b10af969/src/handlers/comment/handlers/multiplier.ts#L49
This creates confusion in the code because when you provide "" as a reason, it stores it as " " (notice the space). And they evaluate to different booleans. ""==false and " "==true when it is checked in different places in the code.
With my change "" will be treated as "no reason provided". If you want to have an empty reason, you can explicitly provide it with a space " " or maybe something even more explicit "N/A" or "Not Applicable" when you don't want to have a reason. @pavlovcik
/multiplier @web4er 1
Successfully changed the payout multiplier for @web4er to 1. The reason is not provided.
I don't know if it was intentional, but one thing I didn't like in the code was, appending an empty space to the reason.
It is unlikely to be intentional. Perhaps we should fix it!
By the way, can you send me a message on Telegram? We could use your attention to detail to help with some QA efforts!
It is unlikely to be intentional. Perhaps we should fix it!
The pull request with this QA fixes it.
Steps for each test