11import { RequestTracer , PrebuildTransactionOptions , Memo } from '@bitgo/sdk-core' ;
2- import { BitGoRequest } from '../types/request' ;
32import { createEnclavedExpressClient } from './enclavedExpressClient' ;
43import logger from '../logger' ;
54import { MasterApiSpecRouteRequest } from './routers/masterApiSpec' ;
5+ import { isMasterExpressConfig } from '../config' ;
66
77/**
88 * Defines the structure for a single recipient in a send-many transaction.
@@ -18,6 +18,9 @@ interface Recipient {
1818}
1919
2020export async function handleSendMany ( req : MasterApiSpecRouteRequest < 'v1.wallet.sendMany' , 'post' > ) {
21+ if ( ! isMasterExpressConfig ( req . config ) ) {
22+ throw new Error ( 'Configuration must be in master express mode' ) ;
23+ }
2124 const enclavedExpressClient = createEnclavedExpressClient ( req . config , req . params . coin ) ;
2225 if ( ! enclavedExpressClient ) {
2326 throw new Error ( 'Please configure enclaved express configs to sign the transactions.' ) ;
@@ -35,10 +38,10 @@ export async function handleSendMany(req: MasterApiSpecRouteRequest<'v1.wallet.s
3538 throw new Error ( `Wallet ${ walletId } not found` ) ;
3639 }
3740
38- // @ts -ignore
39- if ( wallet . type ( ) !== 'cold' || wallet . subType ( ) !== 'onPrem' ) {
40- throw new Error ( 'Wallet is not an on-prem wallet' ) ;
41- }
41+ // TODO: uncomment when on-prem type is added to SDK
42+ // if (wallet.type() !== 'cold' || wallet.subType() !== 'onPrem') {
43+ // throw new Error('Wallet is not an on-prem wallet');
44+ // }
4245
4346 // Get the signing keychains
4447 const signingKeychains = await baseCoin . keychains ( ) . getKeysForSigning ( {
0 commit comments