Skip to content

Commit

Permalink
refactor(dashboard): Use the network from env as default (#578)
Browse files Browse the repository at this point in the history
Co-authored-by: cpl121 <[email protected]>
  • Loading branch information
marc2332 and cpl121 authored Jun 6, 2024
1 parent 2185f71 commit cc364fe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/wallet-dashboard/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Inter } from 'next/font/google';
import './globals.css';

import { IotaClientProvider, WalletProvider } from '@iota/dapp-kit';
import { getAllNetworks } from '@iota/iota.js/client';
import { getAllNetworks, getDefaultNetwork } from '@iota/iota.js/client';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import React from 'react';

Expand All @@ -25,13 +25,14 @@ export default function RootLayout({
const [queryClient] = React.useState(() => new QueryClient());

const allNetworks = getAllNetworks();
const defaultNetwork = getDefaultNetwork();

return (
<html lang="en">
<body className={inter.className}>
<PopupProvider>
<QueryClientProvider client={queryClient}>
<IotaClientProvider networks={allNetworks} defaultNetwork="testnet">
<IotaClientProvider networks={allNetworks} defaultNetwork={defaultNetwork}>
<WalletProvider>{children}</WalletProvider>
<Popup />
</IotaClientProvider>
Expand Down

0 comments on commit cc364fe

Please sign in to comment.