mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-09 20:39:35 +00:00
fix
This commit is contained in:
parent
ee1452b2d6
commit
62513bd933
1 changed files with 14 additions and 1 deletions
|
@ -135,10 +135,23 @@ class AnonPayApi {
|
||||||
}) async {
|
}) async {
|
||||||
double fiatRate = 0.0;
|
double fiatRate = 0.0;
|
||||||
if (fiatCurrency != null) {
|
if (fiatCurrency != null) {
|
||||||
|
late FiatApiMode fiatApiMode;
|
||||||
|
switch (apiMode) {
|
||||||
|
case ExchangeApiMode.torOnly:
|
||||||
|
fiatApiMode = FiatApiMode.torOnly;
|
||||||
|
break;
|
||||||
|
case ExchangeApiMode.disabled:
|
||||||
|
fiatApiMode = FiatApiMode.disabled;
|
||||||
|
break;
|
||||||
|
case ExchangeApiMode.enabled:
|
||||||
|
default:
|
||||||
|
fiatApiMode = FiatApiMode.enabled;
|
||||||
|
break;
|
||||||
|
}
|
||||||
fiatRate = await FiatConversionService.fetchPrice(
|
fiatRate = await FiatConversionService.fetchPrice(
|
||||||
crypto: cryptoCurrency,
|
crypto: cryptoCurrency,
|
||||||
fiat: fiatCurrency,
|
fiat: fiatCurrency,
|
||||||
apiMode: apiMode,
|
apiMode: fiatApiMode,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue