Open lmcmz opened 1 week ago
The design was used in another feature https://www.figma.com/design/Qs5stGXY2US8Dj8UDjsdQ5/FLOW--Extention-Design-v2.0.0?node-id=16584-262&node-type=frame&t=wfFzCZHzFpyc9oWL-0
Additional requirements:
we need update the storage alert condition:
if storageCapacity - storageUsed < 10000 {
// Show insufficient storage alert
return
}
Let me list out all scenarios with storage warning in action button:
Move token Move NFT Send Token Send NFT Sign Transaction on browser Sign Transaction on WalletConnect
Issue to be solved
Background: https://github.com/Outblock/FRW/issues/61
Suggest A Solution
Get Storage and Available Balance Info
Our script API returns
getAccountInfo
cadence, which allow wallet to get the storage info under an account.If
storageCapacity - storageUsed < 10000
then it's insufficient storageNotification
Currently, we use firebase remote config to control the notification messages. It use
news
at the moment. For insufficient storage alert, we gonna add a new condition flaginsufficientStorage
, which user reach storage limit.Onchain Interaction
Any onchain Interaction, wallet need do a async check whether the storage is sufficient or not.
If it's send Flow Token or move action ( move fee ), the balance will be affected we need take count of the sending or move fee balance. ( availableBalance - sent amount ) < 0.001 Other onchain Interaction, we only do the availableBalance check.
Storage Usage Card
Storage info card need to be displayed only under FLOW token detail page.
Figma: https://www.figma.com/design/Qs5stGXY2US8Dj8UDjsdQ5/FLOW--Extention-Design-v2.0.0?node-id=19322-3404&t=XuGSo0DCk4j4z7BJ-1