File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
examples/transfer-lamports/src Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -133,9 +133,8 @@ const transactionMessage = pipe(
133133 * to create a transfer instruction for the system program.
134134 */
135135 ( log . info (
136- '[step 1] Creating an instruction to transfer Lamports from' ,
136+ '[step 1] Creating an instruction to transfer Lamports from %s to %s ' ,
137137 SOURCE_ACCOUNT_SIGNER . address ,
138- 'to' ,
139138 DESTINATION_ACCOUNT_ADDRESS ,
140139 ) ,
141140 getTransferSolInstruction ( {
@@ -195,7 +194,11 @@ try {
195194 const errorDetailMessage = isSystemError ( e . cause , transactionMessage )
196195 ? getSystemErrorMessage ( e . cause . context . code )
197196 : e . cause ?. message ;
198- log . error ( preflightErrorContext , '%s: %s' , preflightErrorMessage , errorDetailMessage ) ;
197+ if ( errorDetailMessage !== undefined ) {
198+ log . error ( '%O %s: %s' , preflightErrorContext , preflightErrorMessage , errorDetailMessage ) ;
199+ } else {
200+ log . error ( '%O %s' , preflightErrorContext , preflightErrorMessage ) ;
201+ }
199202 } else {
200203 throw e ;
201204 }
You can’t perform that action at this time.
0 commit comments