fix: parseSequenceFromLogSolana -> Throw correct error if a Solana Tx is not found
This commit is contained in:
parent
e30f92b3e0
commit
1406b76ddf
|
@ -72,8 +72,8 @@ const SOLANA_SEQ_LOG = "Program log: Sequence: ";
|
|||
export function parseSequenceFromLogSolana(info: TransactionResponse) {
|
||||
// TODO: better parsing, safer
|
||||
const sequence = info.meta?.logMessages
|
||||
?.filter((msg) => msg.startsWith(SOLANA_SEQ_LOG))[0]
|
||||
.replace(SOLANA_SEQ_LOG, "");
|
||||
?.filter((msg) => msg.startsWith(SOLANA_SEQ_LOG))?.[0]
|
||||
?.replace(SOLANA_SEQ_LOG, "");
|
||||
if (!sequence) {
|
||||
throw new Error("sequence not found");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue