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

Fix balances getters #127

Merged
merged 1 commit into from
May 24, 2024
Merged

Fix balances getters #127

merged 1 commit into from
May 24, 2024

Conversation

Tanya-atatakai
Copy link
Collaborator

What this PR solves: there are cases where we need to check balance of the EOA address (e.g. before safe or backup address creation) or to check safe address balance (e.g. when showing "needs funds" alert or low-gas states) - but at the moment in all such places we check total sum of all addresses' balances.

Some context: when we create an account, the EOA address is created which is needed for creating other addresses. we then:

  • top up the EOA with 1.5 xDai
  • some of it is spent for safe address and (if created) backup address - we have ~1,48... remaining
  • 1xDai then is transferred to safe address

so e.g. at the moment when we display low-gas alert (dot), we take into account the remaining on EOA (~0.48) but our safe address can have 0 xDai, we have total of 0.48 < 0.1 (low gas value) and display that everything is fine but we should show that the safe needs funds.

@Tanya-atatakai Tanya-atatakai requested review from truemiller and mohandast52 and removed request for truemiller May 24, 2024 13:10
@Tanya-atatakai Tanya-atatakai force-pushed the tanya/reconsider-total-blance branch from 153e496 to f929b24 Compare May 24, 2024 14:13
@Tanya-atatakai Tanya-atatakai merged commit c356621 into main May 24, 2024
2 of 3 checks passed
@Tanya-atatakai Tanya-atatakai deleted the tanya/reconsider-total-blance branch May 24, 2024 14:13
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.

3 participants