Add commands /pay2extend & /pay2skip to the transactions app #1289
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation or cause
See #1290
Change description
I'm adding two commands to the transactions app:
/pay2extend
/pay2skip
The skip has a fairly simple configuration, allowing to enable/disable the feature and to set the planets cost of a skip.
The extension has tight integration with the
voting
app in order to have theextend_current_count
on one place so we can respect the already existingextend_max_amount
setting.It also supports to define the multiplier that will be applied to the base cost in case of multiple extensions of a single map (each successive extension gets more expensive). But this is optional and the multiplier can be set to
1
(effectively disabling this multiplying feature), or even to something lower, such as0.5
, to make the extensions cheaper, if someone wanted to do so.Since the transactions take some time to process, it might occasionally happen, that the user, who paid for track extension, might receive a feedback of a successful transaction in various scenarios:
a) Transaction succeeded on the same map he requested to be extended - before podium.
b) Transaction succeeded on the same map he requested to be extended - on podium.
c) Transaction succeeded on any other map than the one he requested to be extended.
Checklist of pull request
Make sure that your pull request follow the following 'rules':
Please leave a comment here if your pull need any updates for the docs or tests.
Additional Comments (optional)
Yes, this needs an update of a documentation, but I've prepared it already, as you can see within the commit.