Cadence accounts on Flow have storage. Storage is consumed when accounts contain data (NFTs, FT Vaults etc).The amount of storage a cadence account has depends on the amount of FLOW tokens that account has, and is at least the minimum required storage amount.
Because of account storage, Flow Wallet has some unique considerations to address:
If a user transfers FLOW from their account, and that amount of FLOW reduces their account balance below what's required for the amount of storage their account uses, the transaction can fail, and their account will be inoperable until it receives additional FLOW.
Users who encounter transaction failures due to storage issues are often confused, as account storage is a novel concept unique to Flow.
Within the existing wallet, it's hard for a user to know when their account is close to or below the minimum FLOW required for the amount of storage used.
In order to best support account storage, and address these considerations we should do the following:
Account storage warnings
When an account is near or below the amount of FLOW required for its storage usage, we must proactively warn the user about this situation, and ask them to deposit additional FLOW to their account.
We can define an account as being near its storage limit when it has an amount of FLOW <= 90% of whats required for its storage usage.
Warnings should take place as an in-app notification, with copy such as (example): "Your account is using 93% of its available storage. Deposit FLOW to your account to increase its available storage. Learn more about storage on Flow here."
Additionally, when an account is near its storage limit, we should display a component in the sidebar that displays how much storage is being used by the given account. This component can be similar to the existing storage usage component in: settings > account list > [account]
Transaction storage error message
When a transaction errors because an authorizing account is out of storage, we must display a UI component that informs the user of this error and how to resolve it. This UI component must inform the user that the transaction errored because it results in their account not having sufficient FLOW to cover it's storage usage, and to resolve the issue they need to ensure their account has sufficent FLOW by depositing new FLOW or reducing the amount of FLOW used/withdraw in the transaction.
FLOW token detail page improvements
On the FLOW token detail page, we must display to the user the portion of their FLOW token balance that's usable (the total balance of FLOW in their account less the amount required for its storage usage), and the total FLOW balance of their account.
We must also display the existing storage usage component that's found in: settings > account list > [account]
FLOW token transfer and move
When the user transfers FLOW or moves FLOW between their account, we must limit the user to transfer only the usable portion of their FLOW balance (the total balance of FLOW in their account less the amount required for its storage usage)
Expected Outcomes
[x] Designs are completed to support the required changes
Feature
Cadence accounts on Flow have storage. Storage is consumed when accounts contain data (NFTs, FT Vaults etc).The amount of storage a cadence account has depends on the amount of FLOW tokens that account has, and is at least the minimum required storage amount.
Because of account storage, Flow Wallet has some unique considerations to address:
In order to best support account storage, and address these considerations we should do the following:
Account storage warnings
When an account is near or below the amount of FLOW required for its storage usage, we must proactively warn the user about this situation, and ask them to deposit additional FLOW to their account.
We can define an account as being near its storage limit when it has an amount of FLOW <= 90% of whats required for its storage usage.
Warnings should take place as an in-app notification, with copy such as (example): "Your account is using 93% of its available storage. Deposit FLOW to your account to increase its available storage. Learn more about storage on Flow here."
Additionally, when an account is near its storage limit, we should display a component in the sidebar that displays how much storage is being used by the given account. This component can be similar to the existing storage usage component in: settings > account list > [account]
Transaction storage error message
When a transaction errors because an authorizing account is out of storage, we must display a UI component that informs the user of this error and how to resolve it. This UI component must inform the user that the transaction errored because it results in their account not having sufficient FLOW to cover it's storage usage, and to resolve the issue they need to ensure their account has sufficent FLOW by depositing new FLOW or reducing the amount of FLOW used/withdraw in the transaction.
FLOW token detail page improvements
On the FLOW token detail page, we must display to the user the portion of their FLOW token balance that's usable (the total balance of FLOW in their account less the amount required for its storage usage), and the total FLOW balance of their account.
We must also display the existing storage usage component that's found in: settings > account list > [account]
FLOW token transfer and move
When the user transfers FLOW or moves FLOW between their account, we must limit the user to transfer only the usable portion of their FLOW balance (the total balance of FLOW in their account less the amount required for its storage usage)
Expected Outcomes
Platforms