mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-09 04:19:36 +00:00
minor fixes
This commit is contained in:
parent
e28b0bb895
commit
085fa71c7a
2 changed files with 11 additions and 2 deletions
|
@ -25,6 +25,7 @@ class ThorChainExchangeProvider extends ExchangeProvider {
|
||||||
CryptoCurrency.btc,
|
CryptoCurrency.btc,
|
||||||
CryptoCurrency.eth,
|
CryptoCurrency.eth,
|
||||||
CryptoCurrency.ltc,
|
CryptoCurrency.ltc,
|
||||||
|
CryptoCurrency.bch,
|
||||||
].contains(element))
|
].contains(element))
|
||||||
.toList())
|
.toList())
|
||||||
];
|
];
|
||||||
|
@ -46,7 +47,7 @@ class ThorChainExchangeProvider extends ExchangeProvider {
|
||||||
bool get isEnabled => true;
|
bool get isEnabled => true;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool get supportsFixedRate => true;
|
bool get supportsFixedRate => false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ExchangeProviderDescription get description => ExchangeProviderDescription.thorChain;
|
ExchangeProviderDescription get description => ExchangeProviderDescription.thorChain;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import 'package:cake_wallet/exchange/exchange_provider_description.dart';
|
import 'package:cake_wallet/exchange/exchange_provider_description.dart';
|
||||||
|
import 'package:cake_wallet/exchange/provider/thorchain_exchange.provider.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart';
|
import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/keyboard_theme.dart';
|
import 'package:cake_wallet/themes/extensions/keyboard_theme.dart';
|
||||||
import 'package:cake_wallet/core/auth_service.dart';
|
import 'package:cake_wallet/core/auth_service.dart';
|
||||||
|
@ -61,7 +62,7 @@ class ExchangePage extends BasePage {
|
||||||
final _receiveAmountFocus = FocusNode();
|
final _receiveAmountFocus = FocusNode();
|
||||||
final _receiveAddressFocus = FocusNode();
|
final _receiveAddressFocus = FocusNode();
|
||||||
final _receiveAmountDebounce = Debounce(Duration(milliseconds: 500));
|
final _receiveAmountDebounce = Debounce(Duration(milliseconds: 500));
|
||||||
final _depositAmountDebounce = Debounce(Duration(milliseconds: 500));
|
Debounce _depositAmountDebounce = Debounce(Duration(milliseconds: 500));
|
||||||
var _isReactionsSet = false;
|
var _isReactionsSet = false;
|
||||||
|
|
||||||
final arrowBottomPurple = Image.asset(
|
final arrowBottomPurple = Image.asset(
|
||||||
|
@ -471,6 +472,13 @@ class ExchangePage extends BasePage {
|
||||||
|
|
||||||
depositAmountController.addListener(() {
|
depositAmountController.addListener(() {
|
||||||
if (depositAmountController.text != exchangeViewModel.depositAmount) {
|
if (depositAmountController.text != exchangeViewModel.depositAmount) {
|
||||||
|
final isThorChain = exchangeViewModel.selectedProviders
|
||||||
|
.any((provider) => provider is ThorChainExchangeProvider);
|
||||||
|
|
||||||
|
_depositAmountDebounce = isThorChain
|
||||||
|
? Debounce(Duration(milliseconds: 1000))
|
||||||
|
: Debounce(Duration(milliseconds: 500));
|
||||||
|
|
||||||
_depositAmountDebounce.run(() {
|
_depositAmountDebounce.run(() {
|
||||||
exchangeViewModel.changeDepositAmount(amount: depositAmountController.text);
|
exchangeViewModel.changeDepositAmount(amount: depositAmountController.text);
|
||||||
exchangeViewModel.isReceiveAmountEntered = false;
|
exchangeViewModel.isReceiveAmountEntered = false;
|
||||||
|
|
Loading…
Reference in a new issue