Skip to content

Commit

Permalink
chore: added USDC to avalanche fuji (#2132)
Browse files Browse the repository at this point in the history
* Added USDC to avalanche fuji

* added to symbol to chain name

* lint
  • Loading branch information
gerrysaporito authored Jan 22, 2024
1 parent 7b7d46d commit 4bd61e1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 18 deletions.
38 changes: 20 additions & 18 deletions @3rdweb-sdk/react/hooks/usePayments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand All @@ -211,6 +211,7 @@ const ChainSymbolToChainName: Record<string, string> = {
MATIC: "Matic",
AVAX: "Avalanche",
AGOR: "Arbitrum Goerli Ether",
XAI: "XAI",
};

export const ChainIdToSupportedCurrencies: Record<number, CurrencyMetadata[]> =
Expand Down Expand Up @@ -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;
};
Expand All @@ -450,7 +451,8 @@ export function usePaymentsCreateUpdateCheckout(contractAddress: string) {
return fetchFromPaymentsAPI<CreateUpdateCheckoutInput>(
token,
"POST",
`${apiDate}/shareable-checkout-link${input?.checkoutId ? `/${input.checkoutId} ` : ""
`${apiDate}/shareable-checkout-link${
input?.checkoutId ? `/${input.checkoutId} ` : ""
}`,
input,
);
Expand Down Expand Up @@ -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 },
Expand Down
1 change: 1 addition & 0 deletions graphql/fragments/raw/Seller.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ fragment Seller on seller {
has_production_access
thirdweb_account_id
is_trusted
is_branding_disabled
}

0 comments on commit 4bd61e1

Please sign in to comment.