From 299c3deac3b876b324b99355a08295a1378f6b19 Mon Sep 17 00:00:00 2001 From: Artur Sapek Date: Mon, 11 Mar 2024 11:37:22 -0400 Subject: [PATCH] fix circle attestation url this shouldnt be cached at evaluation time --- .../src/routes/cctpManual/utils/attestation.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wormhole-connect/src/routes/cctpManual/utils/attestation.ts b/wormhole-connect/src/routes/cctpManual/utils/attestation.ts index 2e782a207..a8ab84b5c 100644 --- a/wormhole-connect/src/routes/cctpManual/utils/attestation.ts +++ b/wormhole-connect/src/routes/cctpManual/utils/attestation.ts @@ -3,10 +3,6 @@ import config from 'config'; import { BytesLike } from 'ethers'; import { sleep } from 'utils'; -const CIRCLE_ATTESTATION = config.isMainnet - ? 'https://iris-api.circle.com/attestations/' - : 'https://iris-api-sandbox.circle.com/attestations/'; - export async function getCircleAttestation(messageHash: BytesLike) { while (true) { // get the post @@ -23,6 +19,10 @@ export async function getCircleAttestation(messageHash: BytesLike) { export async function tryGetCircleAttestation( messageHash: BytesLike, ): Promise { + const CIRCLE_ATTESTATION = config.isMainnet + ? 'https://iris-api.circle.com/attestations/' + : 'https://iris-api-sandbox.circle.com/attestations/'; + return await axios .get(`${CIRCLE_ATTESTATION}${messageHash}`) .catch((reason) => {