mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 19:49:22 +00:00
fix fetching rate for thorchain
This commit is contained in:
parent
c1f3253ba3
commit
3aa1386ecf
2 changed files with 1 additions and 3 deletions
|
@ -68,7 +68,7 @@ class ThorChainExchangeProvider extends ExchangeProvider {
|
||||||
required bool isFixedRateMode,
|
required bool isFixedRateMode,
|
||||||
required bool isReceiveAmount}) async {
|
required bool isReceiveAmount}) async {
|
||||||
try {
|
try {
|
||||||
if (amount == 0) return 0.0;
|
amount = 1;
|
||||||
|
|
||||||
final params = {
|
final params = {
|
||||||
'from_asset': _normalizeCurrency(from),
|
'from_asset': _normalizeCurrency(from),
|
||||||
|
|
|
@ -302,8 +302,6 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor
|
||||||
state = IsExecutingState();
|
state = IsExecutingState();
|
||||||
pendingTransaction = await wallet.createTransaction(_credentials());
|
pendingTransaction = await wallet.createTransaction(_credentials());
|
||||||
if (provider is ThorChainExchangeProvider) {
|
if (provider is ThorChainExchangeProvider) {
|
||||||
print('Output count: ${pendingTransaction?.outputCount}');
|
|
||||||
print('provider is ThorChainExchangeProvider and pendingTransaction is ${provider.runtimeType}');
|
|
||||||
final outputCount = pendingTransaction?.outputCount ?? 0;
|
final outputCount = pendingTransaction?.outputCount ?? 0;
|
||||||
if (outputCount > 10) throw Exception("ThorChain does not support more than 10 outputs");
|
if (outputCount > 10) throw Exception("ThorChain does not support more than 10 outputs");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue