-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
BugSomething isn't workingSomething isn't working
Description
Description
Multiple wallet screens can crash or display incorrect balance information when accessed before the balance data has finished syncing, since assets and balance load independently.
Affected Screens
TransferAsset- usesitem.amount!without null checkReleaseTransferRights- usesitem.amount!without null checkSend- already handles this 'correctly' by waiting foritem.amount != null
Current Issue
In lib/pages/main/wallet_contents/release_transfer_rights.dart:
- Line 415 and 421:
widget.item.amount!can crash if balance hasn't synced - Line 399 (
getFeeInfo()): Useswidget.item.amount!in validation without null check - Line 637 (
releaseTransferRightsHandler()): No validation to check if balance is loaded before submission
Possible Solutions
Approach 1
Prevent users from accessing TransferAsset and ReleaseTransferRights screens until balance data is available:
- Hide or disable entry buttons for these screens until
amount != null - This matches the existing behavior in the
Sendscreen - Prevents showing incorrect "0" balance temporarily
- Ensures screens only open when required data is ready
Approach 2
To listen to the changes in the balance and refresh the form to reflect it.
To display the balance is currently not available and a warning the transaction might fail and/or disable the send button until the balance is not null
Related
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugSomething isn't workingSomething isn't working
Type
Projects
Status
π Backlog