Converts currency using given APIs.
(plugin, amount, currency)
| 9 | |
| 10 | @plugin.method("currencyconvert") |
| 11 | def currencyconvert(plugin, amount, currency): |
| 12 | """Converts currency using given APIs.""" |
| 13 | if currency in ('USD', 'AUD'): |
| 14 | return {"msat": Millisatoshi(round(amount * 5000))} |
| 15 | raise Exception("No values available for currency {}".format(currency.upper())) |
| 16 | |
| 17 | |
| 18 | plugin.run() |
nothing calls this directly
no test coverage detected