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

Support "Send funds" on "Accounts" page using derives #6780

Open
gregdhill opened this issue Jan 4, 2022 · 6 comments
Open

Support "Send funds" on "Accounts" page using derives #6780

gregdhill opened this issue Jan 4, 2022 · 6 comments

Comments

@gregdhill
Copy link
Contributor

@jacogr would it be possible to also support "Send" using derives? The "Accounts" page currently crashes with the error api.consts.balances is undefined when I try to open the modal.

Originally posted by @gregdhill in #6744 (comment)

@jacogr
Copy link
Member

jacogr commented Jan 4, 2022

Change the const check to api.consts.balances?.<whatever> and see if that at least makes it work. So would suggest making it work first (i.e. don't crash if stuff is not available) and then looking at trying to extract the constants/etc. via another mechanism.

If it is api.consts.balances.* it is most-probably the existential/etc constants.

@gregdhill
Copy link
Contributor Author

@jacogr I'll look into extracting the balance interactions into another mechanism, is derive suitable?

@jacogr
Copy link
Member

jacogr commented Jan 5, 2022

I think atm that is the only option, i.e. it is the only place where JS code can be injected for use inside the apps UI.

@gregdhill
Copy link
Contributor Author

@jacogr this needs to be added to @polkadot/api-derive right? What's the best way to link to apps locally for a development build?

@jacogr
Copy link
Member

jacogr commented Jan 6, 2022

I would suggest adding it locally (see eq equilibrium) - if more chains and broader support we can move it to api.

@gregdhill
Copy link
Contributor Author

@jacogr could you take a look at my draft PR? #6799

I'm new to RxJS so I'm not sure how best to integrate a custom call, getting the error TypeError: extrinsic.registry is undefined.

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

No branches or pull requests

2 participants