Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/__tests__/api/advancedWalletManager/mpcFinalize.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ describe('MPC Finalize', () => {

// Assert the response structure
result.should.have.property('statusCode', 200);
result.body.should.have.property('combinedKey');
result.body.should.not.have.property('combinedKey');
result.body.should.have.property('source', 'user');
result.body.should.have.property(
'commonKeychain',
Expand Down Expand Up @@ -489,7 +489,7 @@ describe('MPC Finalize', () => {
});

result.should.have.property('statusCode', 200);
result.body.should.have.property('combinedKey');
result.body.should.not.have.property('combinedKey');
result.body.should.have.property('source', 'backup');
result.body.should.have.property(
'commonKeychain',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ export async function eddsaFinalize(req: AwmApiSpecRouteRequest<'v1.mpc.key.fina
}

return {
combinedKey,
counterpartyKeyShare: sourceToCounterPartyKeyShare,
source,
commonKeychain,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,11 @@ const RecoveryMpcRequest = {
export type RecoveryMpcRequest = typeof RecoveryMpcRequest;

const RecoveryMpcResponse: HttpResponse = {
200: t.type({
txHex: t.string,
}), // the full signed tx
200: t.exact(
t.type({
txHex: t.string,
}),
), // the full signed tx
...ErrorResponses,
};

Expand Down Expand Up @@ -198,7 +200,7 @@ const MpcInitializeResponse = {
bitgoPayload: KeyShareType,
counterPartyKeyShare: optional(KeyShareType),
};
const MpcInitializeResponseType = optionalized(MpcInitializeResponse);
const MpcInitializeResponseType = t.exact(optionalized(MpcInitializeResponse));
export type MpcInitializeResponseType = t.TypeOf<typeof MpcInitializeResponseType>;

const BitGoKeychainType = t.type({
Expand Down Expand Up @@ -228,7 +230,7 @@ const MpcFinalizeResponse = {
source: t.union([t.literal('user'), t.literal('backup')]),
commonKeychain: t.string,
};
const MpcFinalizeResponseType = optionalized(MpcFinalizeResponse);
const MpcFinalizeResponseType = t.exact(optionalized(MpcFinalizeResponse));
export type MpcFinalizeResponseType = t.TypeOf<typeof MpcFinalizeResponseType>;

const MpcV2InitializeRequest = {
Expand All @@ -242,7 +244,7 @@ const MpcV2InitializeResponse = {
encryptedData: t.string,
encryptedDataKey: t.string,
};
const MpcV2InitializeResponseType = t.type(MpcV2InitializeResponse);
const MpcV2InitializeResponseType = t.exact(t.type(MpcV2InitializeResponse));
export type MpcV2InitializeResponseType = t.TypeOf<typeof MpcV2InitializeResponseType>;

export type MpcV2RoundState = {
Expand Down Expand Up @@ -276,7 +278,7 @@ const MpcV2RoundResponse = {
broadcastMessage: optional(t.any),
p2pMessages: optional(MpcV2RoundMessage),
};
const MpcV2RoundResponseType = optionalized(MpcV2RoundResponse);
const MpcV2RoundResponseType = t.exact(optionalized(MpcV2RoundResponse));
export type MpcV2RoundResponseType = t.TypeOf<typeof MpcV2RoundResponseType>;

const MpcV2FinalizeRequest = {
Expand All @@ -293,7 +295,7 @@ const MpcV2FinalizeResponse = {
commonKeychain: t.string,
source: t.union([t.literal('user'), t.literal('backup')]),
};
const MpcV2FinalizeResponseType = t.type(MpcV2FinalizeResponse);
const MpcV2FinalizeResponseType = t.exact(t.type(MpcV2FinalizeResponse));
export type MpcV2FinalizeResponseType = t.TypeOf<typeof MpcV2FinalizeResponseType>;

const MpcV2RecoveryRequest = {
Expand All @@ -307,7 +309,7 @@ const MpcV2RecoveryResponse = {
txHex: t.string,
stringifiedSignature: t.string,
};
const MpcV2RecoveryResponseType = t.type(MpcV2RecoveryResponse);
const MpcV2RecoveryResponseType = t.exact(t.type(MpcV2RecoveryResponse));
export type MpcV2RecoveryResponseType = t.TypeOf<typeof MpcV2RecoveryResponseType>;

// API Specification
Expand Down
Loading