Skip to content

Commit

Permalink
swallow circle attestation error (#637)
Browse files Browse the repository at this point in the history
  • Loading branch information
artursapek authored Jul 23, 2024
1 parent 6635a4f commit 11c3f62
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion connect/src/protocols/cctp/cctpTransfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,16 @@ export class CircleTransfer<N extends Network = Network>
// 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<N>;
Expand Down

0 comments on commit 11c3f62

Please sign in to comment.