mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +00:00
reset crypto min and max when new crypto selected
This commit is contained in:
parent
f64a2518ad
commit
e68385a6ae
1 changed files with 7 additions and 0 deletions
|
@ -131,6 +131,13 @@ class _BuyFormState extends ConsumerState<BuyForm> {
|
|||
coins: ref.read(simplexProvider).supportedCryptos,
|
||||
onSelected: (crypto) {
|
||||
setState(() {
|
||||
if (selectedCrypto?.ticker != _BuyFormState.boundedCryptoTicker) {
|
||||
// Reset crypto mins and maxes ... we don't know these bounds until we request a quote
|
||||
_BuyFormState.minCrypto = Decimal.parse((0.00000001)
|
||||
.toString()); // lol how to go from double->Decimal more easily?
|
||||
_BuyFormState.maxCrypto =
|
||||
Decimal.parse((10000.00000000).toString());
|
||||
}
|
||||
selectedCrypto = crypto;
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue