Skip to content

Commit

Permalink
chore: bumped @fuels/* deps to 0.36.1 (#3511)
Browse files Browse the repository at this point in the history
* chore: bumped @fuels/connectors + @fuels/react versions

* chore: changeset

* chore: release

* chore: removed await from provider instantiation

* chore: remove release flag

* chore: fixed transaction url

* chore: removed hardcoded network
  • Loading branch information
petertonysmith94 authored Jan 2, 2025
1 parent a7eb9b6 commit c6895b6
Show file tree
Hide file tree
Showing 12 changed files with 202 additions and 210 deletions.
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",
"@tanstack/react-query": "^5.55.4",
"clsx": "2.1.1",
"@wagmi/connectors": "^5.1.14",
Expand Down
3 changes: 2 additions & 1 deletion 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 All @@ -28,7 +29,7 @@ export const renderTransactionId = (transactionId: string) => {

return (
<a
href={`https://app.fuel.network/tx/${transactionId}/simple`}
href={`https://app-testnet.fuel.network/tx/${transactionId}/simple`}
target="_blank"
rel="noreferrer"
className="underline"
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": "sh ./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
13 changes: 9 additions & 4 deletions templates/nextjs/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ 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, Provider } from "fuels";
import { defaultConnectors } from "@fuels/connectors";

import { providerUrl } from "../lib";
Expand All @@ -14,9 +14,9 @@ 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),
});

interface RootLayoutProps {
Expand All @@ -42,7 +42,12 @@ 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 }}
>
{" "}
<ToastContainer theme="dark" />
<>{children}</>
</FuelProvider>
Expand Down
2 changes: 1 addition & 1 deletion templates/nextjs/src/lib.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const renderTransactionId = (transactionId: string) => {

return (
<a
href={`https://app.fuel.network/tx/${transactionId}/simple`}
href={`https://app-testnet.fuel.network/tx/${transactionId}/simple`}
target="_blank"
rel="noreferrer"
className="underline"
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": "sh ./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
2 changes: 1 addition & 1 deletion templates/vite/src/lib.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const renderTransactionId = (transactionId: string) => {

return (
<a
href={`https://app.fuel.network/tx/${transactionId}/simple`}
href={`https://app-testnet.fuel.network/tx/${transactionId}/simple`}
target="_blank"
rel="noreferrer"
className="underline"
Expand Down
12 changes: 8 additions & 4 deletions templates/vite/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ 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, Provider } from "fuels";

import App from "./App.tsx";
import { providerUrl } from "./lib.tsx";
Expand All @@ -14,15 +14,19 @@ 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),
});

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

0 comments on commit c6895b6

Please sign in to comment.