spacemeshos / smapp-lite

The light wallet application for Spacemesh network
3 stars 2 forks source link

Check account balance before publishing tx #87

Closed brusherru closed 1 month ago

brusherru commented 1 month ago

Before allowing to publish transaction it checks for the projected account balance.

image

It checks the sufficient balance for:

It also shows a bit different red text on the confirmation page in case if some of the conditions does not pass:

github-actions[bot] commented 1 month ago

You can preview the changes at : https://ca2765ac.smapp-lite-prod.pages.dev

brusherru commented 1 month ago

@monikasmolarek the bug is fixed. Thanks!

github-actions[bot] commented 1 month ago

You can preview the changes at : https://c3b444e5.smapp-lite-prod.pages.dev

dioexul commented 1 month ago

Cannot get the same error.

Minor things There are 2 messages:

And Wallet shows the first one when amount is enough, but gas fee is bigger than the rest of the balance. Balance 19.7 Funds to send 19 Gas fee: 3.6

And message "insufficient funds to pay for gas" appears only in the case when Gas fee is bigger than balance. One of the option is to have only the first message for all cases.

Gas price also allows (and keeps) values like 00100