@@ -138,8 +138,8 @@ export class ConnectionService {
138138 * @returns A promise resolving to a message response for connection open ack include the unsigned_tx.
139139 */
140140 async connectionOpenAck ( data : MsgConnectionOpenAck ) : Promise < MsgConnectionOpenAckResponse > {
141+ this . logger . log ( 'Connection Open Ack is processing' , 'connectionOpenAck' ) ;
141142 try {
142- this . logger . log ( 'Connection Open Ack is processing' , 'connectionOpenAck' ) ;
143143 const { constructedAddress, connectionOpenAckOperator } = validateAndFormatConnectionOpenAckParams ( data ) ;
144144 // Build and complete the unsigned transaction
145145 const unsignedConnectionOpenAckTx : TxBuilder = await this . buildUnsignedConnectionOpenAckTx (
@@ -499,6 +499,46 @@ export class ConnectionService {
499499 verifyProofRedeemer ,
500500 this . lucidService . LucidImporter ,
501501 ) ;
502+
503+ function prettyPrint ( obj : any , indent = 2 ) : string {
504+ const seen = new WeakSet ( ) ;
505+
506+ function replacer ( key : string , value : any ) : any {
507+ // Handle circular references
508+ if ( typeof value === 'object' && value !== null ) {
509+ if ( seen . has ( value ) ) {
510+ return '[Circular Reference]' ;
511+ }
512+ seen . add ( value ) ;
513+ }
514+
515+ // Handle Map objects
516+ if ( value instanceof Map ) {
517+ const mapEntries : Record < string , any > = { } ;
518+ value . forEach ( ( v , k ) => {
519+ mapEntries [ String ( k ) ] = v ;
520+ } ) ;
521+ return { __type : 'Map' , entries : mapEntries } ;
522+ }
523+
524+ // Handle BigInt values
525+ if ( typeof value === 'bigint' ) {
526+ return { __type : 'BigInt' , value : value . toString ( ) } ;
527+ }
528+
529+ // Handle other special types as needed
530+ // ...
531+
532+ return value ;
533+ }
534+
535+ return JSON . stringify ( obj , replacer , indent ) ;
536+ }
537+
538+ console . log ( 'verifyProofRedeemer' , prettyPrint ( verifyProofRedeemer ) ) ;
539+ console . log ( 'spentConnectionRedeemer' , prettyPrint ( spendConnectionRedeemer ) ) ;
540+ console . log ( 'updatedConnectionDatum' , prettyPrint ( updatedConnectionDatum ) ) ;
541+
502542 const unsignedConnectionOpenAckParams : UnsignedConnectionOpenAckDto = {
503543 connectionUtxo,
504544 encodedSpendConnectionRedeemer,
0 commit comments