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

Unknown types found #19

Closed
ltfschoen opened this issue May 13, 2020 · 1 comment
Closed

Unknown types found #19

ltfschoen opened this issue May 13, 2020 · 1 comment

Comments

@ltfschoen
Copy link
Contributor

I've added a custom chain in app/lib/page/profile/settings/remoteNodeListPage.dart using Polkawallet-Flutter https://github.com/polkawallet-io/polkawallet-flutter, but when I run the app in Android Studio it's giving an error that I haven't defined the custom types (i.e. RoamingOperatorIndex, etc):

[ +130 ms] I/chromium(12339): [INFO:CONSOLE(23)] "2020-05-13 13:18:37        API/INIT: Error: FATAL: Unable to initialize the API: createType(RoamingOperatorIndex):: Cannot construct unknown type RoamingOperatorIndex", source:  (23)
[+34304 ms] I/chromium(12339): [INFO:CONSOLE(23)] "2020-05-13 13:19:11          API-WS: disconnected from wss://testnet-frankfurt-v0.1.0-alpha.datahighway.com code: '1006' reason: ''", source:  (23)
[+3186 ms] I/chromium(12339): [INFO:CONSOLE(23)] "2020-05-13 13:19:15        API/INIT: Connection to new genesis detected, re-initializing", source:  (23)
[+8748 ms] I/chromium(12339): [INFO:CONSOLE(23)] "Unknown types found, no types for MiningSpeedBoostConfigurationHardwareMining,

Where can I defined the custom types in the Polkawallet-Flutter codebase for connecting to a custom chain?
(i.e. in Polkadot.js Apps I just go to https://polkadot.js.org/apps/#/settings/developer, and paste my custom types there)

FYI, these are my custom types: https://github.com/DataHighway-DHX/node/blob/master/custom_types.json

@RomeroYang
Copy link
Member

RomeroYang commented May 13, 2020

You may find lib/js_service_kusama and lib/js_service_acala in branch develop, that's because the app doesn't handle Types itself, it runs js SDK in a hidden webview to codec the substrate types. So we have a polkadot.js for KUSAMA, and another polkadot.js for Acala.

For your case, you need to use a customized polkadot.js sdk with your custom_types.json built in, as acala.js did.

This issue was closed.
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