mirror of
https://github.com/ChuckNorrison/LightningTipBot.git
synced 2026-08-16 13:00:52 +02:00
Fiat price hotfix2 (#94)
* INR added * also accept currency string * dividion by 0 * better check
This commit is contained in:
parent
7c77d268f6
commit
08c7ff5113
1 changed files with 1 additions and 1 deletions
|
|
@ -51,7 +51,7 @@ func getAmount(input string) (amount int, err error) {
|
|||
log.Errorln(err)
|
||||
return 0, err
|
||||
}
|
||||
if price.Price[currency] == 0 {
|
||||
if !(price.Price[currency] > 0) {
|
||||
return 0, errors.New("price is zero")
|
||||
}
|
||||
amount = int(fmount / price.Price[currency] * float64(100_000_000))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue