diff options
| author | 2018-10-12 11:19:41 +0100 | |
|---|---|---|
| committer | 2018-10-12 11:19:41 +0100 | |
| commit | f096bddff444f2e34a6872ac33073857362b1ce1 (patch) | |
| tree | 0302d6e2114e0d9f1d4319d9626828e4f35404d2 /modules/coins.py | |
| parent | int(number) after we've checked .isdigit() in utils.parse_number (diff) | |
| signature | ||
Support unit-based bets (1k/1m/1b) in modules/coins.py
Diffstat (limited to 'modules/coins.py')
| -rw-r--r-- | modules/coins.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/coins.py b/modules/coins.py index 63f4a77a..a481118d 100644 --- a/modules/coins.py +++ b/modules/coins.py @@ -147,6 +147,7 @@ class Module(object): event["stderr"].write("You have no coins to bet") return + coin_bet = utils.parse_number(coin_bet) match = REGEX_FLOAT.match(coin_bet) if not match or round(decimal.Decimal(coin_bet), 2) <= DECIMAL_ZERO: event["stderr"].write("Please provide a number of coins to bet") @@ -275,6 +276,7 @@ class Module(object): return for i, bet_amount in enumerate(bet_amounts): + bet_amount = utils.parse_number(bet_amount) match = REGEX_FLOAT.match(bet_amount) if not match or round(decimal.Decimal(bet_amount), 2 ) <= DECIMAL_ZERO: |
