From 1d7681868c285a4c8bb5fa1f2ab621b8774eeab5 Mon Sep 17 00:00:00 2001 From: Nishan Date: Wed, 1 Nov 2023 14:02:51 +0530 Subject: [PATCH] fix --- .../app/components/creator-token/buy-creator-token.tsx | 10 +++++----- .../hooks/creator-token/use-creator-token-approve.ts | 2 +- .../app/hooks/creator-token/use-creator-token-buy.ts | 1 + .../app/hooks/creator-token/use-creator-token-sell.ts | 1 + 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/app/components/creator-token/buy-creator-token.tsx b/packages/app/components/creator-token/buy-creator-token.tsx index 9407980b6..22dce6b7a 100644 --- a/packages/app/components/creator-token/buy-creator-token.tsx +++ b/packages/app/components/creator-token/buy-creator-token.tsx @@ -54,14 +54,14 @@ const PAYMENT_METHODS = __DEV__ }, ] : [ - { - title: "USDC", - value: "USDC", - }, { title: "ETH", value: "ETH", }, + { + title: "USDC", + value: "USDC", + }, ]; const SELECT_LIST = [ { @@ -266,7 +266,7 @@ export const BuyCreatorToken = () => { options={ selectedAction === "buy" ? PAYMENT_METHODS - : PAYMENT_METHODS.slice(0, 1) + : PAYMENT_METHODS.filter((m) => m.value === "USDC") } value={paymentMethod} onChange={(value: any) => setPaymentMethod(value)} diff --git a/packages/app/hooks/creator-token/use-creator-token-approve.ts b/packages/app/hooks/creator-token/use-creator-token-approve.ts index f6f998027..cb2e63a07 100644 --- a/packages/app/hooks/creator-token/use-creator-token-approve.ts +++ b/packages/app/hooks/creator-token/use-creator-token-approve.ts @@ -76,7 +76,7 @@ export const useApproveToken = () => { const transaction = await publicClient.waitForTransactionReceipt({ hash, pollingInterval: 2000, - confirmations: 3, + confirmations: 2, }); if (transaction.status === "success") { return true; diff --git a/packages/app/hooks/creator-token/use-creator-token-buy.ts b/packages/app/hooks/creator-token/use-creator-token-buy.ts index fba9a9c80..88edf08ca 100644 --- a/packages/app/hooks/creator-token/use-creator-token-buy.ts +++ b/packages/app/hooks/creator-token/use-creator-token-buy.ts @@ -165,6 +165,7 @@ export const useCreatorTokenBuy = (params: { const transaction = await publicClient.waitForTransactionReceipt({ hash: transactionHash, pollingInterval: 2000, + confirmations: 2, }); if (transaction.status === "success") { diff --git a/packages/app/hooks/creator-token/use-creator-token-sell.ts b/packages/app/hooks/creator-token/use-creator-token-sell.ts index 4825a8038..b064fcae4 100644 --- a/packages/app/hooks/creator-token/use-creator-token-sell.ts +++ b/packages/app/hooks/creator-token/use-creator-token-sell.ts @@ -128,6 +128,7 @@ export const useCreatorTokenSell = () => { const transaction = await publicClient.waitForTransactionReceipt({ hash: txHash as any, pollingInterval: 2000, + confirmations: 2, }); if (transaction.status === "success") {