fix(signer): route product-account signing through host_create_transaction#96
Merged
Conversation
📦 Bundle size impactComparing
Thresholds — warn: ≥10% or ≥5.0 KB · fail: ≥20% or ≥15.0 KB (bundled). Percentage only applies once the baseline is ≥ 10 KB. |
Member
|
Yea we are just waiting for paritytech/triangle-js-sdks#168 to be merged and released right? |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Member
|
Picking this up to land — refines the change and migrates the tx-demo so the e2e suite can actually verify it. What this PR does now
Versions
|
Member
|
rel: #97 |
This was referenced May 25, 2026
Imod7
added a commit
that referenced
this pull request
May 25, 2026
) * feat(contracts-demo): migrate to @t3rminal/bulletin-index v3 on Paseo v2 - new address: 0x3331A87C2B9312E246E6A7eE8D0C0AdD8d282B6F (CDM v3) - shop: address -> shopKey: bytes32 - owner() removed - new dateExists(shopKey, date) and getMetadata(shopKey, date) - shopKey argument added in storeDailyReport - new registry and metadataCid fields in the CDM manifest - new ipfs suffix in bulletin url - target key rotated * refactor(contracts-demo): migrate to product-account signing - mirroring tx-demo (#96) * test(contracts-demo): revive Group 2 e2e specs against v2 ABI * docs(contracts-demo): fix stale references in e2e + UI comments * Update product-sdk/examples/contracts-demo/src/main.ts Co-authored-by: Tarik Gul <47201679+TarikGul@users.noreply.github.com> * docs: update signing comments in signer + tx-demo + contracts-demo --------- Co-authored-by: Tarik Gul <47201679+TarikGul@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Both product-account signer entry points — the
getSigner()returned fromHostProvider.getProductAccount(...)and the standaloneHostProvider.getProductAccountSigner(...)method — now passsignerType: "createTransaction"to Nova'saccountsProvider.getProductAccountSigner(...). Previously they were called with no second argument and defaulted to the deprecated"signPayload"PJS-style path, which strips unknown signed extensions and throws"PJS does not support this signed-extension: AsPgas"on chains that ship theAsPgasextension (Paseo Next).Legacy-account signing is unchanged — Nova's
getLegacyAccountSignerdoesn't expose asignerTypeswitch.What changed
AccountsProvider.getProductAccountSignertype to accept the optionalsignerType?: "signPayload" | "createTransaction"arg (added in Nova 0.7.9)."createTransaction"from both call sites, factored into aPRODUCT_SIGNER_TYPEconstant that carries the AsPgas rationale in its JSDoc.Compatibility
Requires
@novasamatech/product-sdk0.7.9+ and a host build (Polkadot Desktop / Mobile) that implementshost_create_transaction. Older Nova versions ignore the extra argument at runtime, so the call-site change is backward-compatible — but apps hitting older hosts will need a host upgrade before signing works again.Version bump
@parity/product-sdk-signer0.2.4→0.2.5(patch). Changeset included.Test plan
pnpm --filter "@parity/product-sdk-signer" buildpnpm --filter "@parity/product-sdk-signer" test(79 tests)pnpm --filter "@parity/product-sdk-signer-demo" exec playwright test e2e/product-account.spec.ts