Skip to content

feat: add integration test for account consolidation#241

Merged
danielpeng1 merged 1 commit into
masterfrom
WCN-911/consolidate-integ-test
Jun 16, 2026
Merged

feat: add integration test for account consolidation#241
danielpeng1 merged 1 commit into
masterfrom
WCN-911/consolidate-integ-test

Conversation

@danielpeng1

Copy link
Copy Markdown
Contributor

Adding consolidate.integ.test.ts for hteth account-consolidate integration test coverage with EXTERNAL and LOCAL signing modes

  • Extending mock BitGo with POST /consolidateAccount/build and consolidateAccount.hteth.json fixture
  • Fixing handleConsolidate to restore buildParams.recipients so ETH verifyTransaction passes during signing
  • Tests pass (npm run docker:test:integration)
image

Ticket: WCN-911

@danielpeng1 danielpeng1 self-assigned this Jun 15, 2026
@linear-code

linear-code Bot commented Jun 15, 2026

Copy link
Copy Markdown

WCN-911

Comment on lines -90 to +93
prebuildTx: unsignedBuild,
prebuildTx: {
...unsignedBuild,
buildParams: { recipients: unsignedBuild.recipients ?? [] },
},

@danielpeng1 danielpeng1 Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixing handleConsolidate to restore buildParams.recipients so ETH verifyTransaction passes during signing

needed as the integration test is running signing path e2e

@danielpeng1 danielpeng1 marked this pull request as ready for review June 15, 2026 23:21
@danielpeng1 danielpeng1 requested review from a team as code owners June 15, 2026 23:21
sendTx: 'sendTx.tbtc',
acceleratePrebuildTx: 'prebuildTx.accelerate.tbtc',
consolidatePrebuildTx: 'prebuildTx.consolidate.tbtc',
// consolidateAccountBuildTx omitted; UTXO coins use consolidateUnspents

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

do we plan to add support for utxo (consolidateUnspents) as well? given that's the priority of the upcoming feature?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah we already have an consolidateUnspents integ test so UTXO consolidation is already covered.

This just means that consolidateAccountBuildTx is omitted here because this consolidateAccountBuildTx (hteth) route doesn’t apply to UTXO coins

@vinhkhangtieu vinhkhangtieu left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

pr to add integ test

@danielpeng1 danielpeng1 merged commit d143363 into master Jun 16, 2026
21 checks passed
@danielpeng1 danielpeng1 deleted the WCN-911/consolidate-integ-test branch June 16, 2026 14:49
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.

3 participants