Repository navigation
fix(sdk-core): allow ERC-7984 PA rebuild without recipients (CHALO-1957) - #10063
Conversation
c386135 to
4d1c4ba
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
|
4d1c4ba to
b132bfe
Compare
This comment was marked as outdated.
This comment was marked as outdated.
b132bfe to
e39b794
Compare
This comment was marked as outdated.
This comment was marked as outdated.
0184457 to
833ad17
Compare
|
@claude review |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
There was a problem hiding this comment.
The latest commit covers the three issues I raised earlier, and this pass found no new bugs. This code verifies multisig transactions before signing, so a human should still look at it.
What was reviewed:
- The non-TSS
verifyTransactionpath for wrap, unwrap and finalizeUnwrap. These no longer need recipients, and the new PA tests run the realprebuildAndSignTransaction. getErc7984WrappersForNetwork, which wrap, unwrap and finalizeUnwrap now all use to look up wrappers on this coin's network only.assertPrebuildRecipientMirrorsSendMultiSig, which requires exactly one recipient whose address, amount and data all match. wrapApprove and the new intents both use it.- The
recreateAndSignTransactionstrip, which only applies to the four ERC-7984 types, so transfer PAs still forward their stored recipients.
Extended reasoning...
The change adds content-based verification of ERC-7984 wrap, unwrap and finalizeUnwrap transactions for onchain multisig ETH wallets in abstract-eth. It also stops PA rebuilds in sdk-core from forwarding stored recipients for those intent types. This is the check that runs before a user key signs a sendMultiSig operation hash, so mistakes here could approve the wrong transfers. The new commit plausibly addresses the earlier inline threads. Those threads were resolved only by the PR author, and this signing-critical logic (about 300 lines) warrants a human review rather than an automated approval.
pendingApproval.approve() on a custodial multi-sig ERC-7984 leg PA (wrapApprove/wrap/unwrap user legs, wrap/finalizeUnwrap server-originated legs) merges the PA's stored info.transactionRequest.recipients into the prebuild params, tripping the prebuildAndSignTransaction no-recipients guard before any network call. recreateAndSignTransaction now strips recipients for the four ERC-7984 intent types before prebuilding: stored recipients are display-only for the approval UI, and the /tx/build PA-rebuild carve-out (CHALO-1954) re-derives the real intent inputs server-side from the pendingApprovalId approve() injects. Other PA types forward recipients unchanged, and the guard still rejects direct sendMany/prebuild calls without a pendingApprovalId. Stacked on the abstract-eth multisig verify change, which the approve path needs once recipients are stripped. Ticket: CHALO-1957
833ad17 to
d41e6e8
Compare
Summary
Part 2 of CHALO-1957, stacked on #10067 (the ETH-ecosystem verify change). Retarget to
masteronce #10067 merges.pendingApproval.approve()on a custodial multi-sig ERC-7984 leg PA merges the PA's storedinfo.transactionRequest.recipientsinto the prebuild params. TheprebuildAndSignTransactionno-recipients guard then throwscannot provide recipients for transaction type wrapbefore any network call.Fix
recreateAndSignTransactionstripsrecipientsfor the four ERC-7984 intent types (wrapApprove | wrap | unwrap | finalizeUnwrap) before prebuilding. The stored recipients are display-only for the approval UI. The/tx/buildPA-rebuild carve-out re-derives the real inputs server-side from thependingApprovalIdthatapprove()already injects.pendingApprovalId.iPendingApproval.ts: thebuildParams.typeunion now lists the four intent types.Tests
wrapandfinalizeUnwrapPAs, plus a transfer-type regression that checks recipients are still forwarded.prebuildAndSignTransactionandverifyTransaction, with only the signing seams stubbed. This needs the verify path from fix(abstract-eth): verify ERC-7984 wrap/unwrap/finalizeUnwrap on multisig (CHALO-1957) #10067.prebuildAndSignTransactionwith recipients andwrapApproveand nopendingApprovalIdstill throws.Ticket: CHALO-1957