Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

564 Insufficient Balance Alert #673

Merged
merged 2 commits into from
Dec 20, 2024
Merged

Conversation

jeden
Copy link
Contributor

@jeden jeden commented Dec 16, 2024

Related Issue

Summary of Changes

Implemented as per specs

Need Regression Testing

  • Yes
  • No

Risk Assessment

  • Low
  • Medium
  • High

Additional Notes

Note: this requirement:

Enable navigation to Add Balance.

is implemented, but not currently working, because we must implement deeplinks in the app. Tapping the notification will open the browser window, but it will show a blank page.
Deeplinks will be implemented in #672

Screenshots (if applicable)

image

@jeden jeden linked an issue Dec 17, 2024 that may be closed by this pull request
4 tasks
@jeden jeden requested review from lmcmz and zhouxl December 17, 2024 22:29
@@ -956,6 +956,12 @@ extension WalletManager {
return accountInfo.storageCapacity - accountInfo.storageUsed < Self.mininumStorageThreshold
}

var isBalanceInsufficient: Bool {
guard self.isSelectedFlowAccount else { return false }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be an issue, when the flag is checked but the accountInfo is not fetched yet.
So it will always return false

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That actually happens, but WalletNewsHandler is subscribed to the accountDataDidUpdate event, and when an update occurs (i.e. when the account has been fetched) the logic is re-evaluated.
That means that even though the notification doesn't appear immediately, it will after a few seconds.

@lmcmz lmcmz self-requested a review December 20, 2024 02:54
@jeden jeden merged commit 3ef8339 into develop Dec 20, 2024
1 check passed
@jeden jeden deleted the feature/564-insufficient-balance-alert branch December 20, 2024 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Insufficient Balance Alert
2 participants