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

EventRecord + DoubleMap conversion on metadata fails #900

Closed
xlc opened this issue May 14, 2019 · 3 comments
Closed

EventRecord + DoubleMap conversion on metadata fails #900

xlc opened this issue May 14, 2019 · 3 comments
Labels

Comments

@xlc
Copy link
Contributor

xlc commented May 14, 2019

VM104:37 2019-05-14 14:11:18   API/DECORATOR: FATAL: Unable to initialize the API:  Cannot convert 'DoubleMapType' via asType
window.console.error @ VM104:37
m @ logger.js:83
error @ logger.js:129
(anonymous) @ Base.js:379
async function (async)
(anonymous) @ Base.js:364
u.emit @ index.js:201
emit @ Provider.js:343
onSocketOpen @ Provider.js:159

Relates to paritytech/substrate#2491 as it introduce usage of double map in substrate
Should be fixed by #776

@jacogr jacogr transferred this issue from polkadot-js/apps May 14, 2019
@jacogr jacogr changed the title polkadot.js apps doesn't work with master DoubleMap conversion on metadata fails May 14, 2019
@jacogr jacogr added this to To Do in @polkadot{.js} via automation May 14, 2019
@jacogr jacogr changed the title DoubleMap conversion on metadata fails EventRecord + DoubleMap conversion on metadata fails May 14, 2019
@jacogr
Copy link
Member

jacogr commented May 14, 2019

EventRecord has a new topics field added - https://github.com/polkadot-js/api/blob/master/packages/types/src/type/EventRecord.ts#L81 vs https://github.com/paritytech/substrate/blob/master/srml/system/src/lib.rs#L212

Full definition with storage - https://github.com/paritytech/substrate/blob/master/srml/system/src/lib.rs#L322-L345

Effectively 2 things happen -

  • EventRecord is not being parsed correctly - extra field of Vec<Hash> exists now
  • DoubleMap is not being being handled properly in the Metadata

@jacogr
Copy link
Member

jacogr commented May 15, 2019

Closed in #901 & #902

@jacogr jacogr closed this as completed May 15, 2019
@polkadot{.js} automation moved this from To Do to Done May 15, 2019
@polkadot-js-bot
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.

@polkadot-js polkadot-js locked as resolved and limited conversation to collaborators Jun 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Development

No branches or pull requests

3 participants