File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,10 @@ Sentry.init({ dsn: config.sentry_dsn });
2626app . use (
2727 helper . handlerWrapper ( async ( req , _res , next ) => {
2828 if ( req . path === '/wallets/batch-create-wallet' && req . method === 'POST' ) {
29- if ( ! req . headers [ 'content-type' ] ?. includes ( 'multipart/form-data' ) ) {
29+ if (
30+ ! req . headers [ 'content-type' ] ||
31+ ! req . headers [ 'content-type' ] . includes ( 'multipart/form-data' )
32+ ) {
3033 throw new HttpError (
3134 415 ,
3235 'Invalid content type. Endpoint only supports multipart/form-data' ,
Original file line number Diff line number Diff line change @@ -59,12 +59,12 @@ class WalletService {
5959 try {
6060 await this . _session . beginTransaction ( ) ;
6161
62- const senderWalletName = body ? .sender_wallet ;
62+ const senderWalletName = body . sender_wallet ;
6363 let senderWallet ;
6464 if ( senderWalletName ) {
6565 senderWallet = await this . getByName ( senderWalletName ) ;
6666 }
67- const defaultTokenAmount = body ? .token_transfer_amount_default ;
67+ const defaultTokenAmount = body . token_transfer_amount_default ;
6868
6969 const walletPromises = [ ] ;
7070 let totalAmountToTransfer = 0 ;
You can’t perform that action at this time.
0 commit comments