Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

fix: add optional field handling to pjs compat #1155

Merged
merged 1 commit into from
Jul 10, 2023

Conversation

VadimSaveljev
Copy link
Contributor

A follow up to #1105
unfortunately the nft collection creation still wasn't working on gamma 1 of capi
code was breaking on assetId field, which is part of ChargeAssetTxPayment

this fixes the problem, though I'm not sure if a similar handler should also be added to
https://github.com/paritytech/capi/blob/main/patterns/compat/pjs_sender.ts#L62
and
https://github.com/paritytech/capi/blob/main/patterns/compat/pjs_sender.ts#L75

Copy link
Contributor

@tjjfvi tjjfvi left a comment

Choose a reason for hiding this comment

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

Ah, good catch. Yeah, this should work.

this fixes the problem, though I'm not sure if a similar handler should also be added to
https://github.com/paritytech/capi/blob/main/patterns/compat/pjs_sender.ts#L62
and
https://github.com/paritytech/capi/blob/main/patterns/compat/pjs_sender.ts#L75

No need – these objects are custom (derived from the metadata, but not directly represented in it), and it's not written to generate optional fields.

@tjjfvi tjjfvi added this pull request to the merge queue Jul 10, 2023
@tjjfvi tjjfvi changed the title fix: add optional field handling fix: add optional field handling to pjs compat Jul 10, 2023
Merged via the queue into main with commit 5ba6e8a Jul 10, 2023
@tjjfvi tjjfvi deleted the pjs-sender-optional-field-fix branch July 10, 2023 16:36
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.

2 participants