Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

first attempt #254

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft
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
16 changes: 14 additions & 2 deletions src/routes/app/wallets/_components/wallets/AddWalletModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
writeContract,
getConnections,
type Config,
waitForTransactionReceipt,
} from "@wagmi/core";

import { checksumAddress } from "viem";
Expand Down Expand Up @@ -151,10 +152,14 @@

// keep receipts for now, to use waitForTransactionReceipt
try {
await writeContract(
const transactionHash = await writeContract(
wagmiConfig.config.value,
approval.request,
);

await waitForTransactionReceipt(wagmiConfig.config.value, {
hash: transactionHash,
});
} catch (err) {
console.error("Error: ", err);
}
Expand All @@ -179,7 +184,14 @@
},
);

await writeContract(wagmiConfig.config!.value as Config, request);
const transactionHash = await writeContract(
wagmiConfig.config!.value as Config,
request,
);

await waitForTransactionReceipt(wagmiConfig.config.value, {

Check failure on line 192 in src/routes/app/wallets/_components/wallets/AddWalletModal.tsx

View workflow job for this annotation

GitHub Actions / Style and build

Argument of type 'false | NoSerialize<Config>' is not assignable to parameter of type 'Config'.
hash: transactionHash,
});
}
if (wagmiConfig.config.value) {
await disconnectWallets(wagmiConfig.config);
Expand Down
Loading