fix: null balance deleting check

This commit is contained in:
poka 2022-06-10 19:26:46 +02:00
parent fd5504eadd
commit d62691d6f9
2 changed files with 3 additions and 2 deletions

View File

@ -500,7 +500,8 @@ class WalletOptions extends StatelessWidget {
_hasConsumers.hasError) {
return const Text('');
}
final double _balance = balanceCache[walletProvider.address.text]!;
final double _balance =
balanceCache[walletProvider.address.text] ?? 0;
final bool canDelete = !isDefaultWallet &&
!_hasConsumers.data! &&
(_balance > 2 || _balance == 0);

View File

@ -5,7 +5,7 @@ description: Pay with G1.
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 0.0.8+6
version: 0.0.8+7
environment:
sdk: '>=2.12.0 <3.0.0'