Skip to content

fix(sdk): surface a malformed threshold-network signature as a CofheError - #528

Open
Jr-kenny wants to merge 2 commits into
FhenixProtocol:masterfrom
Jr-kenny:fix/r2-s02
Open

Jr-kenny wants to merge 2 commits into
FhenixProtocol:masterfrom
Jr-kenny:fix/r2-s02

Conversation

@Jr-kenny

Copy link
Copy Markdown
Contributor

Fixes #527.

Wraps viem's parseSignature / serializeSignature in normalizeTnSignature in a try/catch that throws CofheError (DecryptReturnedNull, message decrypt response returned a malformed signature, viem error as cause, raw signature in context), so a malformed threshold-network signature is no longer retried as transient by useCofheDecrypt.

Tests: new regression tests in packages/sdk/core/test/r2-s02-signature.test.ts (3/3 pass); decrypt suite 102 passed, 9 skipped (live-gated).

@changeset-bot

changeset-bot Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3ce1e93

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@cofhe/sdk Patch
@cofhe/abi Patch
@cofhe/hardhat-3-plugin Patch
@cofhe/hardhat-plugin Patch
@cofhe/mock-contracts Patch
@cofhe/react Patch
@cofhe/site Patch
@cofhe/example-react Patch
@cofhe/foundry-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

Malformed threshold-network signature throws a raw viem error, not a CofheError

1 participant