Skip to content

Commit

Permalink
misc: more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
tammo committed Mar 27, 2020
1 parent 3ba9c48 commit 4b05979
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/gateway-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export async function getBlock(signature: Signature): Promise<Block | undefined>
});

if (res.status !== 200) {
log.error('FAUCET BOT cannot reach gateway', { statusText: res.statusText });
log.error('cannot reach gateway', { statusText: res.statusText });
return;
}

Expand All @@ -42,7 +42,7 @@ export async function getBlockchain(signaturePublicKey: SigPublicKey): Promise<B
});

if (res.status !== 200) {
log.error('FAUCET BOT cannot reach gateway', { statusText: res.statusText });
log.error('cannot reach gateway', { statusText: res.statusText });
return;
}

Expand All @@ -52,6 +52,8 @@ export async function getBlockchain(signaturePublicKey: SigPublicKey): Promise<B
}

export async function sendTx(transaction: Transaction) {
log.info('sending tx to gateway', { transaction });

const res = await axios.post(sendUrl, {
transaction,
});
Expand All @@ -60,7 +62,7 @@ export async function sendTx(transaction: Transaction) {
const hash = res.data && res.data.hash;

if (hash) {
log.info('FAUCET BOT send tx; hash: ' + hash);
log.info('send tx; hash: ' + hash);
return hash;
}

Expand Down

0 comments on commit 4b05979

Please sign in to comment.