|
|
@@ -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");
|
|
|
}
|