mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-10 20:54:33 +00:00
don't set errorMessage as substring except for >max crypto amt errors
This commit is contained in:
parent
ec64c77c45
commit
26dfaa065a
1 changed files with 3 additions and 3 deletions
|
@ -500,10 +500,10 @@ class _BuyFormState extends ConsumerState<BuyForm> {
|
|||
} else {
|
||||
// Error; probably amount out of bounds
|
||||
String errorMessage = "${quoteResponse.exception?.errorMessage}";
|
||||
errorMessage = errorMessage.substring(
|
||||
(errorMessage.indexOf('getQuote exception: ') ?? 19) + 20,
|
||||
errorMessage.indexOf(", value: null"));
|
||||
if (errorMessage.contains('must be between')) {
|
||||
errorMessage = errorMessage.substring(
|
||||
(errorMessage.indexOf('getQuote exception: ') ?? 19) + 20,
|
||||
errorMessage.indexOf(", value: null"));
|
||||
_BuyFormState.boundedCryptoTicker = errorMessage.substring(
|
||||
errorMessage.indexOf('The ') + 4,
|
||||
errorMessage.indexOf(' amount must be between'));
|
||||
|
|
Loading…
Reference in a new issue