Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

fix: wait for 2 confirmations #2486

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/app/components/creator-token/buy-creator-token.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ const PAYMENT_METHODS = __DEV__
},
]
: [
{
title: "USDC",
value: "USDC",
},
{
title: "ETH",
value: "ETH",
},
{
title: "USDC",
value: "USDC",
},
];
const SELECT_LIST = [
{
Expand Down Expand Up @@ -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)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ export const useCreatorTokenBuy = (params: {
const transaction = await publicClient.waitForTransactionReceipt({
hash: transactionHash,
pollingInterval: 2000,
confirmations: 2,
});

if (transaction.status === "success") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export const useCreatorTokenSell = () => {
const transaction = await publicClient.waitForTransactionReceipt({
hash: txHash as any,
pollingInterval: 2000,
confirmations: 2,
});

if (transaction.status === "success") {
Expand Down
Loading