Outblock / FRW

Product tracker for Flow Wallet
0 stars 0 forks source link

[FEATURE] Account storage improvements #61

Open JeffreyDoyle opened 3 weeks ago

JeffreyDoyle commented 3 weeks ago

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

lmcmz commented 2 weeks ago

UI Design is ready: Mobile https://www.figma.com/design/mSr5uIApRJNrpkmN0YNuD6/FLOW-REF-Mobile-Design-v2.0.0?node-id=35558-33202&t=eegpA2haFKcXcypT-1

Extension: https://www.figma.com/design/Qs5stGXY2US8Dj8UDjsdQ5/FLOW--Extention-Design-v2.0.0?node-id=19322-3404&t=XuGSo0DCk4j4z7BJ-1