Skip to content

refactor: use sdk for accelerate, consolidate, and consolidateUnspents#214

Merged
danielpeng1 merged 1 commit into
masterfrom
WAL-1489/replace-sdk-mocks-1
Jun 1, 2026
Merged

refactor: use sdk for accelerate, consolidate, and consolidateUnspents#214
danielpeng1 merged 1 commit into
masterfrom
WAL-1489/replace-sdk-mocks-1

Conversation

@danielpeng1
Copy link
Copy Markdown
Contributor

@danielpeng1 danielpeng1 commented Jun 1, 2026

Second pass of de- mocking tests to use real sdk functions.

  • Updated accelerate.test.ts, consolidate.test.ts,consolidateUnspents.test.ts

Small notes:

  • For accelerate.test.ts and consolidateUnspents.test.ts's last test case (basically don’t send walletPubs to AWM if a keychain is missing a pub), the real SDK asserts k.pub on every keychain before it ever calls customSigningFunction, so we can’t get there without stubbing accelerateTransaction / consolidateUnspents to call params.customSigningFunction directly.
  • For the consolidate.test.ts MPC case, I'm still stubbing signAndSendTxRequests as TSS signing is covered in signAndSendTxRequest.test.ts. When refactor: signAndSend sdk functions and ECDSA MPCv2 utils #216 is merged I can drop this stub and use buildEcdsaMpcv2TxRequest and nockEcdsaMpcv2SigningFlow from the new testUtils.ts.

Ticket: WAL-1489

@danielpeng1 danielpeng1 self-assigned this Jun 1, 2026
@linear-code
Copy link
Copy Markdown

linear-code Bot commented Jun 1, 2026

WAL-1489

@danielpeng1 danielpeng1 force-pushed the WAL-1489/replace-sdk-mocks-1 branch from 8978e78 to 304ca86 Compare June 1, 2026 15:23
@danielpeng1 danielpeng1 marked this pull request as ready for review June 1, 2026 15:43
@danielpeng1 danielpeng1 requested a review from a team as a code owner June 1, 2026 15:43
Copy link
Copy Markdown
Contributor

@pranishnepal pranishnepal left a comment

Choose a reason for hiding this comment

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

lgtm - thanks for creating the util functions!

@danielpeng1 danielpeng1 merged commit 1f91be1 into master Jun 1, 2026
35 checks passed
@danielpeng1 danielpeng1 deleted the WAL-1489/replace-sdk-mocks-1 branch June 1, 2026 18:54
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.

2 participants