Skip to content

Commit a69a9a4

Browse files
committed
chore(mbe): address comments
Ticket: WP-5232
1 parent f4288f9 commit a69a9a4

File tree

6 files changed

+11
-16
lines changed

6 files changed

+11
-16
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
Wallet,
77
TxRequest,
88
IRequestTracer,
9-
TxRequestVersion,
109
Environments,
1110
RequestTracer,
1211
EcdsaMPCv2Utils,

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
Wallet,
77
TxRequest,
88
IRequestTracer,
9-
TxRequestVersion,
109
Environments,
1110
RequestTracer,
1211
EddsaUtils,

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { Environments, Wallet } from '@bitgo/sdk-core';
99
import { Coin } from 'bitgo';
1010
import assert from 'assert';
1111
import * as eddsa from '../../../api/master/handlers/eddsa';
12-
import * as ecdsa from '../../../api/master/handlers/ecdsaMPCv2';
1312

1413
describe('POST /api/:coin/wallet/:walletId/sendmany', () => {
1514
let agent: request.SuperAgentTest;

src/api/master/clients/enclavedExpressClient.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ export class EnclavedExpressClient {
612612
}
613613

614614
try {
615-
let request = this['apiClient']['v1.mpc.sign'].post({
615+
let request = this.apiClient['v1.mpc.sign'].post({
616616
coin: this['coin'],
617617
shareType: 'mpcv2round1',
618618
...params,
@@ -645,7 +645,7 @@ export class EnclavedExpressClient {
645645
}
646646

647647
try {
648-
let request = this['apiClient']['v1.mpc.sign'].post({
648+
let request = this.apiClient['v1.mpc.sign'].post({
649649
coin: this['coin'],
650650
shareType: 'mpcv2round2',
651651
...params,
@@ -678,7 +678,7 @@ export class EnclavedExpressClient {
678678
}
679679

680680
try {
681-
let request = this['apiClient']['v1.mpc.sign'].post({
681+
let request = this.apiClient['v1.mpc.sign'].post({
682682
coin: this['coin'],
683683
shareType: 'mpcv2round3',
684684
...params,

src/api/master/handlers/ecdsaMPCv2.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import {
22
BaseCoin,
33
BitGoBase,
44
EcdsaMPCv2Utils,
5-
getTxRequest,
65
IRequestTracer,
76
RequestType,
87
SupplementGenerateWalletOptions,

src/api/master/handlers/handleSendMany.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,9 @@ export async function handleSendMany(req: MasterApiSpecRouteRequest<'v1.wallet.s
8080
throw new Error(`Wallet ${walletId} not found`);
8181
}
8282

83-
// TODO: Re-enable this validation when test wallets are properly configured
84-
// if (wallet.type() !== 'cold' || wallet.subType() !== 'onPrem') {
85-
// throw new Error('Wallet is not an on-prem wallet');
86-
// }
83+
if (wallet.type() !== 'cold' || wallet.subType() !== 'onPrem') {
84+
throw new Error('Wallet is not an on-prem wallet');
85+
}
8786

8887
const keyIdIndex = params.source === 'user' ? KeyIndices.USER : KeyIndices.BACKUP;
8988
logger.info(`Key ID index: ${keyIdIndex}`);
@@ -100,11 +99,11 @@ export async function handleSendMany(req: MasterApiSpecRouteRequest<'v1.wallet.s
10099
if (params.pubkey && signingKeychain.pub !== params.pubkey) {
101100
throw new Error(`Pub provided does not match the keychain on wallet for ${params.source}`);
102101
}
103-
// if (params.commonKeychain && signingKeychain.commonKeychain !== params.commonKeychain) {
104-
// throw new Error(
105-
// `Common keychain provided does not match the keychain on wallet for ${params.source}`,
106-
// );
107-
// }
102+
if (params.commonKeychain && signingKeychain.commonKeychain !== params.commonKeychain) {
103+
throw new Error(
104+
`Common keychain provided does not match the keychain on wallet for ${params.source}`,
105+
);
106+
}
108107

109108
try {
110109
// Create TSS send parameters with custom signing functions if needed

0 commit comments

Comments
 (0)