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

chore: bumped @fuels/* deps to 0.36.1 #3511

Merged
merged 9 commits into from
Jan 2, 2025
5 changes: 5 additions & 0 deletions .changeset/clever-bikes-itch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-fuels": patch
---

chore: bumped `@fuels/*` deps to `0.36.1`
4 changes: 2 additions & 2 deletions apps/create-fuels-counter-guide/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"postbuild": "run-s fuels:build original:build"
},
"dependencies": {
"@fuels/connectors": "^0.27.1",
"@fuels/react": "^0.27.1",
"@fuels/connectors": "^0.36.1",
"@fuels/react": "^0.36.1",
arboleya marked this conversation as resolved.
Show resolved Hide resolved
"@tanstack/react-query": "^5.55.4",
"clsx": "2.1.1",
"@wagmi/connectors": "^5.1.14",
Expand Down
1 change: 1 addition & 0 deletions apps/create-fuels-counter-guide/src/lib.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const isTestnet = environment === environments.TESTNET;
export const localProviderUrl = `http://127.0.0.1:${process.env.VITE_FUEL_NODE_PORT || 4000}/v1/graphql`;
export const testnetProviderUrl = 'https://testnet.fuel.network/v1/graphql';
export const providerUrl = isLocal ? localProviderUrl : testnetProviderUrl;
export const chainId = 0; // Local and testnet are both on chain 0
export const playgroundUrl = providerUrl.replace('v1/graphql', 'v1/playground');

// #region deploying-dapp-to-testnet-frontend-contract-id
Expand Down
10 changes: 6 additions & 4 deletions apps/create-fuels-counter-guide/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { FuelProvider } from "@fuels/react";
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { ToastContainer } from "react-toastify";
import { Provider } from "fuels";
import { Network, Provider } from "fuels";

import App from "./App.tsx";
import { providerUrl } from "./lib.tsx";
import { chainId, providerUrl } from "./lib.tsx";

import "react-toastify/dist/ReactToastify.css";
import "./index.css";
Expand All @@ -16,13 +16,15 @@ const queryClient = new QueryClient();

const connectors = defaultConnectors({
devMode: true,
burnerWalletConfig: { fuelProvider: Provider.create(providerUrl) },
fuelProvider: Provider.create(providerUrl),
});

const networks: Network[] = [{ url: providerUrl, chainId }];

createRoot(document.getElementById("root")!).render(
<StrictMode>
<QueryClientProvider client={queryClient}>
<FuelProvider theme="dark" fuelConfig={{ connectors }}>
<FuelProvider theme="dark" fuelConfig={{ connectors }} networks={networks}>
<App />
<ToastContainer theme="dark" />
</FuelProvider>
Expand Down
4 changes: 2 additions & 2 deletions apps/demo-wallet-sdk-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"lint": "next lint"
},
"dependencies": {
"@fuels/connectors": "^0.27.1",
"@fuels/react": "^0.27.1",
"@fuels/connectors": "^0.36.1",
"@fuels/react": "^0.36.1",
"@tanstack/react-query": "^5.55.4",
"fuels": "workspace:*",
"next": "14.2.15",
Expand Down
349 changes: 162 additions & 187 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions templates/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"test:ui": "./test/ui/test-ui.sh"
},
"dependencies": {
"@fuels/connectors": "^0.27.1",
"@fuels/react": "^0.27.1",
"@fuels/connectors": "^0.36.1",
"@fuels/react": "^0.36.1",
"@tanstack/react-query": "^5.55.4",
"clsx": "2.1.1",
"@wagmi/connectors": "^5.1.14",
Expand Down
18 changes: 13 additions & 5 deletions templates/nextjs/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,23 @@ import { FuelProvider } from "@fuels/react";
import React, { ReactNode, useEffect, useState } from "react";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { ToastContainer } from "react-toastify";
import { Provider } from "fuels";
import { FuelConnector, Network, Provider } from "fuels";
import { defaultConnectors } from "@fuels/connectors";

import { providerUrl } from "../lib";
import { chainId, providerUrl } from "../lib";

import "react-toastify/dist/ReactToastify.css";
import "@/styles/globals.css";

const queryClient = new QueryClient();

const connectors = defaultConnectors({
const connectors: FuelConnector[] = defaultConnectors({
devMode: true,
burnerWalletConfig: { fuelProvider: Provider.create(providerUrl) },
fuelProvider: Provider.create(providerUrl),
});

const networks: Network[] = [{ url: providerUrl, chainId }];

interface RootLayoutProps {
children: ReactNode;
}
Expand All @@ -42,7 +44,13 @@ export default function RootLayout({ children }: RootLayoutProps) {
<body>
<React.StrictMode>
<QueryClientProvider client={queryClient}>
<FuelProvider theme="dark" fuelConfig={{ connectors }}>
<FuelProvider
theme="dark"
fuelConfig={{ connectors }}
uiConfig={{ suggestBridge: false }}
networks={networks}
>
{" "}
<ToastContainer theme="dark" />
<>{children}</>
</FuelProvider>
Expand Down
1 change: 1 addition & 0 deletions templates/nextjs/src/lib.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const isTestnet = environment === environments.TESTNET;
export const localProviderUrl = `http://127.0.0.1:${process.env.VITE_FUEL_NODE_PORT || 4000}/v1/graphql`;
export const testnetProviderUrl = "https://testnet.fuel.network/v1/graphql";
export const providerUrl = isLocal ? localProviderUrl : testnetProviderUrl;
export const chainId = 0; // Local and testnet are both on chain 0
export const playgroundUrl = providerUrl.replace("v1/graphql", "v1/playground");

export const localContractId = contractIds.testContract;
Expand Down
4 changes: 2 additions & 2 deletions templates/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"test:ui": "./test/ui/test-ui.sh"
},
"dependencies": {
"@fuels/connectors": "^0.27.1",
"@fuels/react": "^0.27.1",
"@fuels/connectors": "^0.36.1",
"@fuels/react": "^0.36.1",
"@tanstack/react-query": "^5.55.4",
"clsx": "2.1.1",
"@wagmi/connectors": "^5.1.14",
Expand Down
1 change: 1 addition & 0 deletions templates/vite/src/lib.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const isTestnet = environment === environments.TESTNET;
export const localProviderUrl = `http://127.0.0.1:${process.env.VITE_FUEL_NODE_PORT || 4000}/v1/graphql`;
export const testnetProviderUrl = "https://testnet.fuel.network/v1/graphql";
export const providerUrl = isLocal ? localProviderUrl : testnetProviderUrl;
export const chainId = 0; // Local and testnet are both on chain 0
danielbate marked this conversation as resolved.
Show resolved Hide resolved
export const playgroundUrl = providerUrl.replace("v1/graphql", "v1/playground");

export const localContractId = contractIds.testContract;
Expand Down
17 changes: 12 additions & 5 deletions templates/vite/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,32 @@ import { FuelProvider } from "@fuels/react";
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { ToastContainer } from "react-toastify";
import { Provider } from "fuels";
import { FuelConnector, Network, Provider } from "fuels";

import App from "./App.tsx";
import { providerUrl } from "./lib.tsx";
import { chainId, providerUrl } from "./lib.tsx";

import "react-toastify/dist/ReactToastify.css";
import "./index.css";

const queryClient = new QueryClient();

const connectors = defaultConnectors({
const connectors: FuelConnector[] = defaultConnectors({
devMode: true,
burnerWalletConfig: { fuelProvider: Provider.create(providerUrl) },
fuelProvider: Provider.create(providerUrl),
});

const networks: Network[] = [{ url: providerUrl, chainId }];

createRoot(document.getElementById("root")!).render(
<StrictMode>
<QueryClientProvider client={queryClient}>
<FuelProvider theme="dark" fuelConfig={{ connectors }}>
<FuelProvider
theme="dark"
fuelConfig={{ connectors }}
uiConfig={{ suggestBridge: false }}
networks={networks}
>
<App />
<ToastContainer theme="dark" />
</FuelProvider>
Expand Down
Loading