Skip to content

Commit

Permalink
SEP-24 deposit: improve more_info_url log message (#343)
Browse files Browse the repository at this point in the history
  • Loading branch information
quietbits authored Apr 5, 2024
1 parent b22bcae commit 78e1d95
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ export const pollDepositUntilComplete = async ({
TransactionStatus.ERROR,
];

let moreInfoLogged = false;

while (!popup.closed && !endStatuses.includes(currentStatus)) {
// eslint-disable-next-line no-await-in-loop
const response = await fetch(transactionUrl.toString(), {
Expand All @@ -47,12 +45,9 @@ export const pollDepositUntilComplete = async ({
if (transactionJson.transaction.status !== currentStatus) {
currentStatus = transactionJson.transaction.status;

if (!moreInfoLogged) {
moreInfoLogged = true;
log.instruction({
title: `Transaction \`${transactionId}\` more info is available via url: \`${transactionJson.transaction.more_info_url}\``,
});
}
log.instruction({
title: `Transaction MORE INFO URL: \`${transactionJson.transaction.more_info_url}\``,
});

log.response({
title: `Transaction \`${transactionId}\` is in \`${transactionJson.transaction.status}\` status.`,
Expand Down

0 comments on commit 78e1d95

Please sign in to comment.