From 7f947804bd0ad419f376d7ab5dbc6ca92a5ff929 Mon Sep 17 00:00:00 2001 From: Bill Date: Mon, 19 Feb 2024 20:18:57 -0800 Subject: [PATCH] Enable CCTP onboarding for avalanche, optimism (#310) * Enable CCTP for arbitrum avalanche optimism * Enable CCTP onboarding for arbitrum, avalanche, optimism * remove arb --- public/configs/cctp.json | 32 +++++++++++++++++++++----------- src/lib/squid.ts | 6 +++--- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/public/configs/cctp.json b/public/configs/cctp.json index df65617..a14cb3c 100644 --- a/public/configs/cctp.json +++ b/public/configs/cctp.json @@ -1,12 +1,22 @@ [ - { - "chainId": "1", - "tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", - "name": "Ethereum" - }, - { - "chainId": "5", - "tokenAddress": "0x07865c6E87B9F70255377e024ace6630C1Eaa37F", - "name": "Ethereum Goerli" - } -] \ No newline at end of file + { + "chainId": "1", + "tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", + "name": "Ethereum" + }, + { + "chainId": "5", + "tokenAddress": "0x07865c6E87B9F70255377e024ace6630C1Eaa37F", + "name": "Ethereum Goerli" + }, + { + "chainId": "43114", + "tokenAddress": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + "name": "Avalanche" + }, + { + "chainId": "10", + "tokenAddress": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85", + "name": "optimism" + } +] diff --git a/src/lib/squid.ts b/src/lib/squid.ts index ec2c413..362d922 100644 --- a/src/lib/squid.ts +++ b/src/lib/squid.ts @@ -31,13 +31,13 @@ export const fetchSquidStatus = async ( const response = await fetch(url, { headers: { - "x-integrator-id": integratorId || 'dYdX-api' + 'x-integrator-id': integratorId || 'dYdX-api', }, }); if (!response.ok) { const error = await response.json(); - throw new Error(error); + throw error; } return response.json(); @@ -45,4 +45,4 @@ export const fetchSquidStatus = async ( export const getNobleChainId = () => { return isMainnet ? 'noble-1' : 'grand-1'; -} +};