Skip to content

Commit f5a5c16

Browse files
committed
feat: add wagmi provider
1 parent 73db919 commit f5a5c16

20 files changed

+80
-2795
lines changed

app/client-layout.tsx

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,37 @@ import { AppBreadcrumb } from '@/components/Breadcrumb/AppBreadcrumb';
77
import onboard from '@/lib/onboard';
88
import { Web3OnboardProvider } from '@web3-onboard/react';
99
import { SafeProvider } from '@/providers/SafeProvider';
10-
import { Separator } from '@/components/ui/separator';
1110
import AuthLayout from './auth-layout';
11+
import { config } from '@/lib/wagmi-config';
12+
import { WagmiProvider } from 'wagmi';
13+
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
14+
15+
const queryClient = new QueryClient();
1216

1317
const ClientRootLayout = ({ children }: { children: React.ReactNode }) => {
1418
return (
1519
<div className='h-full'>
16-
<Web3OnboardProvider web3Onboard={onboard}>
17-
<SafeProvider>
18-
<SidebarProvider>
19-
<AppSidebar />
20-
<main className='flex flex-col w-full h-full overflow-hidden relative'>
21-
<div className='flex items-center gap-4 p-4 border-b h-12 flex-shrink-0 fixed w-full z-2 bg-background'>
22-
<SidebarTrigger />
23-
<AppBreadcrumb />
24-
</div>
25-
<div className='h-[calc(100vh-3rem)] overflow-hidden mt-12'>
26-
<AuthLayout>{children}</AuthLayout>
27-
</div>
28-
</main>
29-
</SidebarProvider>
30-
<Toaster />
31-
</SafeProvider>
32-
</Web3OnboardProvider>
20+
<WagmiProvider config={config}>
21+
<QueryClientProvider client={queryClient}>
22+
<Web3OnboardProvider web3Onboard={onboard}>
23+
<SafeProvider>
24+
<SidebarProvider>
25+
<AppSidebar />
26+
<main className='flex flex-col w-full h-full overflow-hidden relative'>
27+
<div className='flex items-center gap-4 p-4 border-b h-12 flex-shrink-0 fixed w-full z-2 bg-background'>
28+
<SidebarTrigger />
29+
<AppBreadcrumb />
30+
</div>
31+
<div className='h-[calc(100vh-3rem)] overflow-hidden mt-12'>
32+
<AuthLayout>{children}</AuthLayout>
33+
</div>
34+
</main>
35+
</SidebarProvider>
36+
<Toaster />
37+
</SafeProvider>
38+
</Web3OnboardProvider>
39+
</QueryClientProvider>
40+
</WagmiProvider>
3341
</div>
3442
);
3543
};

app/transactions/new/page.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { PageContainer } from '@/components/Layout/PageContainer';
44
import { Card, CardContent } from '@/components/ui/card';
55
import { Coins } from 'lucide-react';
66
import { useSelectedSafeAddress } from '@/providers/SafeProvider';
7-
import { TransactionProcessV2 } from '@/components/Transactions/process-v2/TransactionProcessV2';
87
import { TransactionFlow } from '@/components/Transactions/TransactionFlow/TransactionFlow';
98

109
export default function NewTransactionPage() {

components/Transactions/TransactionFlow/TransactionExecute.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import { MetaTransactionData } from '@safe-global/types-kit';
66
import { Button } from '@/components/ui/button';
77
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
88
import { Separator } from '@/components/ui/separator';
9-
import { useCurrentChain, useCurrentSafeClient } from '@/providers/SafeProvider';
10-
import { createPublicClient, custom } from 'viem';
9+
import { useCurrentSafeClient } from '@/providers/SafeProvider';
10+
import { createPublicClient } from 'viem';
1111
import { useWallet } from '@/hooks/useWallet';
1212
import * as chains from 'viem/chains'
1313
import { extractChain } from 'viem'
@@ -116,7 +116,7 @@ export function TransactionExecute({ transactionData, onComplete, onBack }: Tran
116116
const txResult = await safeClient.send({
117117
transactions: [transactionData],
118118
nonce,
119-
gasPrice: gasPrice,
119+
gasPrice: gasPrice.toString(),
120120
});
121121

122122
setSignStatus('Transaction signed successfully!');

components/Transactions/process-v2/TransactionProcessV2.tsx

Lines changed: 0 additions & 171 deletions
This file was deleted.

components/Transactions/process-v2/builders/BuilderRegistry.ts

Lines changed: 0 additions & 93 deletions
This file was deleted.

0 commit comments

Comments
 (0)