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

don't crash transfer model if balances is not available #6787

Merged
merged 1 commit into from
Jan 5, 2022

Conversation

gregdhill
Copy link
Contributor

@gregdhill gregdhill commented Jan 5, 2022

Signed-off-by: Gregory Hill [email protected]

See #6780:

  • handle if tx.balances or consts.balances are undefined on Accounts page and Transfer model
  • don't show Send button on sidebar if tx.balances is undefined

label={t<string>('Send')}
onClick={toggleIsTransferOpen}
/>
{isFunction(api.api.tx.balances?.transfer) && (
Copy link
Member

Choose a reason for hiding this comment

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

This really should be enough, I'm guessing it isn't so will take a look at why not after this is in. (e.g. the re-checks for the functions inside the Transfer file shouldn't be needed, it really should not try to execute anything on it)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yeah good point, I made those changes first but you're probably right that this would be enough.

@jacogr jacogr merged commit 5a1d71a into polkadot-js:master Jan 5, 2022
@gregdhill gregdhill deleted the fix/balances-transfer branch January 5, 2022 11:32
@polkadot-js-bot
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@polkadot-js polkadot-js locked as resolved and limited conversation to collaborators Jan 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants