Skip to content

Commit

Permalink
new rpc call
Browse files Browse the repository at this point in the history
  • Loading branch information
abrzezinski94 committed Oct 8, 2024
1 parent 8c123a9 commit c6d28ea
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,16 @@ const confirmWithSignatureStatuses = (

intervalTimeout = setInterval(async () => {
try {
const result = await connection.getSignatureStatus(txid);
const statuses = await connection.getSignatureStatuses([txid]);
const result =
statuses && statuses.value.length && statuses.value[0] !== null
? {
context: statuses.context,
value: statuses.value[0],
}
: null;
logger.log('REST result', result);

if (!result) return;

if (result.value?.err) {
Expand Down

0 comments on commit c6d28ea

Please sign in to comment.