Skip to content

Commit 11c3f62

Browse files
authored
swallow circle attestation error (#637)
1 parent 6635a4f commit 11c3f62

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

connect/src/protocols/cctp/cctpTransfer.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,16 @@ export class CircleTransfer<N extends Network = Network>
221221
// First try to parse out a WormholeMessage
222222
// If we get one or more, we assume its a Wormhole attested
223223
// transfer
224-
const msgIds: WormholeMessageId[] = await fromChain.parseTransaction(txid);
224+
let msgIds: WormholeMessageId[] = [];
225+
try {
226+
msgIds = await fromChain.parseTransaction(txid);
227+
} catch (e: any) {
228+
if (e.message.includes('no bridge messages found')) {
229+
// This means it's a Circle attestation; swallow
230+
} else {
231+
throw e
232+
}
233+
}
225234

226235
// If we found a VAA message, use it
227236
let ct: CircleTransfer<N>;

0 commit comments

Comments
 (0)