Skip to content

Commit 5b2016c

Browse files
committed
fix(mbe): fix nock responses for mbe /sign calls
Ticket: WP-5232
1 parent 843370c commit 5b2016c

3 files changed

Lines changed: 11 additions & 13 deletions

File tree

src/__tests__/api/enclaved/signMpcTransaction.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ describe('signMpcTransaction', () => {
343343
const derivationPath = 'm/0';
344344

345345
const [userShare, backupShare, bitgoShare] = await DklsUtils.generateDKGKeyShares();
346-
assert(backupShare, 'backupShare is not defined');
346+
assert(backupShare, 'Backup share is not defined');
347347

348348
const userKeyShare = userShare.getKeyShare().toString('base64');
349349

src/__tests__/api/master/ecdsa.test.ts

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ describe('Ecdsa Signing Handler', () => {
132132
.post(`/api/v2/wallet/${walletId}/txrequests/test-tx-request-id/transactions/0/sign`)
133133
.matchHeader('any', () => true)
134134
.reply(200, {
135-
txRequest: round1TxRequest,
135+
...round1TxRequest,
136136
});
137137

138138
const round2SignatureShare: SignatureShareRecord = {
@@ -171,7 +171,7 @@ describe('Ecdsa Signing Handler', () => {
171171
.post(`/api/v2/wallet/${walletId}/txrequests/test-tx-request-id/transactions/0/sign`)
172172
.matchHeader('any', () => true)
173173
.reply(200, {
174-
txRequest: round2TxRequest,
174+
...round2TxRequest,
175175
});
176176

177177
const round3SignatureShare: SignatureShareRecord = {
@@ -194,15 +194,13 @@ describe('Ecdsa Signing Handler', () => {
194194
.post(`/api/v2/wallet/${walletId}/txrequests/test-tx-request-id/transactions/0/sign`)
195195
.matchHeader('any', () => true)
196196
.reply(200, {
197-
txRequest: {
198-
...round2TxRequest,
199-
transactions: [
200-
{
201-
...round2TxRequest.transactions![0],
202-
signatureShares: [round1SignatureShare, round2SignatureShare, round3SignatureShare],
203-
},
204-
],
205-
},
197+
...round2TxRequest,
198+
transactions: [
199+
{
200+
...round2TxRequest.transactions![0],
201+
signatureShares: [round1SignatureShare, round2SignatureShare, round3SignatureShare],
202+
},
203+
],
206204
});
207205

208206
// Mock sendTxRequest call

src/api/enclaved/handlers/signMpcTransaction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ interface EddsaSigningParams {
7474
// Unified parameters for handleEcdsaSigning - includes all possible fields
7575
interface EcdsaSigningParams {
7676
coin: BaseCoin;
77-
shareType: string;
77+
shareType: ShareType;
7878
txRequest: TxRequest;
7979
prv: string;
8080
bitgoGpgPubKey?: string;

0 commit comments

Comments
 (0)