Don't throw error if all VAAs were relayed (#660)

This commit is contained in:
guibescos 2023-03-03 16:41:23 -06:00 committed by GitHub
parent bd9c126247
commit 081a8bc12a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -171,11 +171,13 @@ async function run() {
.rpc({ skipPreflight: true }); .rpc({ skipPreflight: true });
} }
} else if (response.code == 5) { } else if (response.code == 5) {
throw new Error( console.log(`All VAAs have been relayed`);
`Wormhole API failure :${wormholeApi}/v1/signed_vaa/1/${EMITTER.toBuffer().toString( console.log(
`${wormholeApi}/v1/signed_vaa/1/${EMITTER.toBuffer().toString(
"hex" "hex"
)}/${lastSequenceNumber}` )}/${lastSequenceNumber}`
); );
break;
} else { } else {
throw new Error("Could not connect to wormhole api"); throw new Error("Could not connect to wormhole api");
} }