feat: update getSignatureStatus
This commit is contained in:
committed by
Michael Vines
parent
ac8660b2e9
commit
1c31e527e2
@@ -39,7 +39,7 @@ export async function sendAndConfirmRawTransaction(
|
||||
}
|
||||
}
|
||||
|
||||
if (status && 'Ok' in status) {
|
||||
if (status && status.status && 'Ok' in status.status) {
|
||||
return signature;
|
||||
}
|
||||
|
||||
|
@@ -65,7 +65,7 @@ async function _sendAndConfirmTransaction(
|
||||
await sleep((500 * DEFAULT_TICKS_PER_SLOT) / NUM_TICKS_PER_SECOND);
|
||||
}
|
||||
|
||||
if (status && 'Ok' in status) {
|
||||
if (status && 'Ok' in status.status) {
|
||||
break;
|
||||
}
|
||||
if (--sendRetries <= 0) {
|
||||
@@ -77,7 +77,7 @@ async function _sendAndConfirmTransaction(
|
||||
);
|
||||
}
|
||||
|
||||
if (status && status.Err && !('AccountInUse' in status.Err)) {
|
||||
if (status && status.status.Err && !('AccountInUse' in status.status.Err)) {
|
||||
throw new Error(
|
||||
`Transaction ${signature} failed (${JSON.stringify(status)})`,
|
||||
);
|
||||
|
Reference in New Issue
Block a user