Skip to content

Commit

Permalink
More logging
Browse files Browse the repository at this point in the history
  • Loading branch information
danielailie committed Nov 21, 2024
1 parent 3c8a02e commit 74213b1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/networkProviders/apiNetworkProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ export class ApiNetworkProvider implements INetworkProvider {

async getTransaction(txHash: string): Promise<TransactionOnNetwork> {
const response = await this.doGetGeneric(`transactions/${txHash}`);
console.log({ response: JSON.stringify(response) });
const transaction = TransactionOnNetwork.fromApiHttpResponse(txHash, response);
return transaction;
}
Expand Down
1 change: 1 addition & 0 deletions src/transactionLogs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export class TransactionLogs {
static fromHttpResponse(logs: any): TransactionLogs {
let result = new TransactionLogs();
result.address = new Address(logs.address);
console.log({ events: JSON.stringify(logs.events) });
result.events = (logs.events || []).map((event: any) => TransactionEvent.fromHttpResponse(event));

return result;
Expand Down
2 changes: 1 addition & 1 deletion src/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export class TransactionOnNetwork {
result.blockNonce = response.blockNonce || 0;
result.hyperblockNonce = response.hyperblockNonce || 0;
result.hyperblockHash = response.hyperblockHash || "";

console.log({ logs: JSON.stringify(response.logs) });
result.logs = TransactionLogs.fromHttpResponse(response.logs || {});

return result;
Expand Down

0 comments on commit 74213b1

Please sign in to comment.