From 11c3f62672fec8262e3a3d931a47b0055245f1f0 Mon Sep 17 00:00:00 2001 From: Artur Sapek Date: Tue, 23 Jul 2024 10:47:54 -0400 Subject: [PATCH] swallow circle attestation error (#637) --- connect/src/protocols/cctp/cctpTransfer.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/connect/src/protocols/cctp/cctpTransfer.ts b/connect/src/protocols/cctp/cctpTransfer.ts index 6a6ea6d0c..0a3437529 100644 --- a/connect/src/protocols/cctp/cctpTransfer.ts +++ b/connect/src/protocols/cctp/cctpTransfer.ts @@ -221,7 +221,16 @@ export class CircleTransfer // First try to parse out a WormholeMessage // If we get one or more, we assume its a Wormhole attested // transfer - const msgIds: WormholeMessageId[] = await fromChain.parseTransaction(txid); + let msgIds: WormholeMessageId[] = []; + try { + msgIds = await fromChain.parseTransaction(txid); + } catch (e: any) { + if (e.message.includes('no bridge messages found')) { + // This means it's a Circle attestation; swallow + } else { + throw e + } + } // If we found a VAA message, use it let ct: CircleTransfer;