From 4bd61e176f06b69c999034dfff5cf93ea3099bcc Mon Sep 17 00:00:00 2001 From: Gerry Saporito Date: Sun, 21 Jan 2024 16:46:08 -0800 Subject: [PATCH] chore: added USDC to avalanche fuji (#2132) * Added USDC to avalanche fuji * added to symbol to chain name * lint --- @3rdweb-sdk/react/hooks/usePayments.ts | 38 ++++++++++++++------------ graphql/fragments/raw/Seller.graphql | 1 + 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/@3rdweb-sdk/react/hooks/usePayments.ts b/@3rdweb-sdk/react/hooks/usePayments.ts index 817120cf813..37103e91e2a 100644 --- a/@3rdweb-sdk/react/hooks/usePayments.ts +++ b/@3rdweb-sdk/react/hooks/usePayments.ts @@ -187,7 +187,7 @@ const supportedCurrenciesMap: SupportedCurrenciesMap = { [Polygon.chainId]: ["MATIC", "WETH", "USDC", "USDC.e"], [Mumbai.chainId]: ["MATIC", "USDC", "USDC.e", "DERC20", "CDOL"], [Avalanche.chainId]: ["AVAX", "USDC", "USDC.e"], - [AvalancheFuji.chainId]: ["AVAX"], + [AvalancheFuji.chainId]: ["AVAX", "USDC"], [Optimism.chainId]: ["ETH", "USDC"], [OptimismGoerli.chainId]: ["ETH"], [Arbitrum.chainId]: ["ETH", "USDC"], @@ -211,6 +211,7 @@ const ChainSymbolToChainName: Record = { MATIC: "Matic", AVAX: "Avalanche", AGOR: "Arbitrum Goerli Ether", + XAI: "XAI", }; export const ChainIdToSupportedCurrencies: Record = @@ -422,16 +423,16 @@ export type CreateUpdateCheckoutInput = { brandDarkMode?: boolean; brandButtonShape?: "full" | "lg" | "none"; brandColorScheme?: - | "gray" - | "red" - | "orange" - | "yellow" - | "green" - | "teal" - | "blue" - | "cyan" - | "purple" - | "pink"; + | "gray" + | "red" + | "orange" + | "yellow" + | "green" + | "teal" + | "blue" + | "cyan" + | "purple" + | "pink"; thirdwebClientId: string; checkoutId?: string; }; @@ -450,7 +451,8 @@ export function usePaymentsCreateUpdateCheckout(contractAddress: string) { return fetchFromPaymentsAPI( token, "POST", - `${apiDate}/shareable-checkout-link${input?.checkoutId ? `/${input.checkoutId} ` : "" + `${apiDate}/shareable-checkout-link${ + input?.checkoutId ? `/${input.checkoutId} ` : "" }`, input, ); @@ -978,12 +980,12 @@ export function usePaymentsWebhooksById(paymentsSellerId: string) { return data && data?.webhook.length > 0 ? (data.webhook.map((webhook) => ({ - id: webhook.id, - sellerId: webhook.seller_id, - url: webhook.url, - isProduction: webhook.is_production, - createdAt: new Date(webhook.created_at), - })) as PaymentsWebhooksType[]) + id: webhook.id, + sellerId: webhook.seller_id, + url: webhook.url, + isProduction: webhook.is_production, + createdAt: new Date(webhook.created_at), + })) as PaymentsWebhooksType[]) : ([] as PaymentsWebhooksType[]); }, { enabled: !!paymentsSellerId }, diff --git a/graphql/fragments/raw/Seller.graphql b/graphql/fragments/raw/Seller.graphql index f5b8346aba5..0edba19baae 100644 --- a/graphql/fragments/raw/Seller.graphql +++ b/graphql/fragments/raw/Seller.graphql @@ -31,4 +31,5 @@ fragment Seller on seller { has_production_access thirdweb_account_id is_trusted + is_branding_disabled }