Skip to content

Commit

Permalink
Merge branch 'master' into st/chore/fuel-core-0.34.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Torres-ssf committed Aug 26, 2024
2 parents b49d0dd + 682d62e commit e4bce25
Show file tree
Hide file tree
Showing 105 changed files with 2,293 additions and 1,116 deletions.
5 changes: 5 additions & 0 deletions .changeset/cold-masks-rest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@fuel-ts/account": patch
---

fix: avoid potential race-condition in fuel connectors init
3 changes: 2 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@fuel-ts/docs-snippets",
"template-nextjs",
"create-fuels-counter-guide",
"demo-wallet-sdk-react"
"demo-wallet-sdk-react",
"template-vite"
]
}
5 changes: 0 additions & 5 deletions .changeset/eighty-ducks-burn.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/eighty-emus-double.md

This file was deleted.

4 changes: 0 additions & 4 deletions .changeset/eleven-ties-bathe.md

This file was deleted.

4 changes: 4 additions & 0 deletions .changeset/fast-walls-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
---

chore: remove TS errors from some tests
4 changes: 0 additions & 4 deletions .changeset/four-trees-call.md

This file was deleted.

4 changes: 4 additions & 0 deletions .changeset/green-donuts-lick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
---

fix: integration tests fail silently
5 changes: 5 additions & 0 deletions .changeset/long-boxes-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-fuels": patch
---

chore: upgrade connectors
4 changes: 4 additions & 0 deletions .changeset/neat-vans-fly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
---

chore: unskip transferring-assets test given `fuel-core v0.33.0` fix
5 changes: 0 additions & 5 deletions .changeset/perfect-dingos-live.md

This file was deleted.

4 changes: 0 additions & 4 deletions .changeset/sixty-cars-unite.md

This file was deleted.

9 changes: 3 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,14 @@ updates:
- "chore"
commit-message:
prefix: "build(deps):"
prefix-development: "build(deps-dev):"
versioning-strategy: "increase"
groups:
dev-deps:
dependency-type: "development"
deps:
applies-to: "version-updates"
update-types:
- "major"
- "minor"
- "patch"
deps:
dependency-type: "production"
deps-patch:
applies-to: "version-updates"
update-types:
- "patch"
Expand Down
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 @@ -12,8 +12,8 @@
"postbuild": "run-s fuels:build original:build"
},
"dependencies": {
"@fuels/connectors": "^0.8.1",
"@fuels/react": "^0.20.0",
"@fuels/connectors": "^0.25.0",
"@fuels/react": "^0.25.0",
"fuels": "workspace:*",
"@tanstack/react-query": "^5.51.23",
"dotenv": "^16.4.5",
Expand Down
3 changes: 3 additions & 0 deletions apps/demo-wallet-sdk-react/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
6 changes: 1 addition & 5 deletions apps/demo-wallet-sdk-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ bun dev

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

Expand Down
9 changes: 5 additions & 4 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.8.1",
"@fuels/react": "^0.20.0",
"@fuels/connectors": "^0.25.0",
"@fuels/react": "^0.25.0",
"@tanstack/react-query": "^5.51.23",
"fuels": "workspace:*",
"next": "14.2.5",
Expand All @@ -21,8 +21,9 @@
"@types/node": "^22.2.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3",
"autoprefixer": "^10.4.20",
"postcss": "^8",
"eslint": "^8.57.0",
"eslint-config-next": "14.2.5",
"postcss-load-config": "^6.0.1",
"tailwindcss": "^3.4.10",
"typescript": "~5.4.5"
}
Expand Down
38 changes: 0 additions & 38 deletions apps/demo-wallet-sdk-react/pages/_app.tsx

This file was deleted.

13 changes: 0 additions & 13 deletions apps/demo-wallet-sdk-react/pages/_document.tsx

This file was deleted.

6 changes: 0 additions & 6 deletions apps/demo-wallet-sdk-react/postcss.config.js

This file was deleted.

8 changes: 8 additions & 0 deletions apps/demo-wallet-sdk-react/postcss.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('postcss-load-config').Config} */
const config = {
plugins: {
tailwindcss: {},
},
};

export default config;
36 changes: 36 additions & 0 deletions apps/demo-wallet-sdk-react/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// #region wallet-sdk-react-provider

"use client";

import { defaultConnectors } from "@fuels/connectors";
import { FuelProvider } from "@fuels/react";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { Inter } from "next/font/google";
import React from "react";

import "./globals.css";

const inter = Inter({ subsets: ["latin"] });

const queryClient = new QueryClient();

export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<React.StrictMode>
<html>
<QueryClientProvider client={queryClient}>
<FuelProvider
fuelConfig={{ connectors: defaultConnectors({ devMode: true }) }}
>
<body className={inter.className}>{children}</body>
</FuelProvider>
</QueryClientProvider>
</html>
</React.StrictMode>
);
}
// #endregion wallet-sdk-react-provider
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// #region wallet-sdk-react-ui

"use client";

import {
useAccount,
useBalance,
Expand Down
6 changes: 3 additions & 3 deletions apps/demo-wallet-sdk-react/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import type { Config } from "tailwindcss";

const config: Config = {
content: [
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
"./components/**/*.{js,ts,jsx,tsx,mdx}",
"./app/**/*.{js,ts,jsx,tsx,mdx}",
"./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
],
theme: {
extend: {
Expand Down
9 changes: 7 additions & 2 deletions apps/demo-wallet-sdk-react/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/*": ["./*"]
"@/*": ["./src/*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ describe('Transferring Assets', () => {
// #endregion transferring-assets-2
});

// #TODO: We should be able to unskip this test once `fuel-core` v0.33.0 is released.
it.skip('should validate that modifying the transaction request will result in another TX ID', async () => {
it('should validate that modifying the transaction request will result in another TX ID', async () => {
using launched = await launchTestNode({
nodeOptions: {
args: ['--poa-instant', 'false', '--poa-interval-period', '10ms'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { JsonAbi, Provider, WalletUnlocked } from 'fuels';
import type { BytesLike, JsonAbi, Provider, WalletUnlocked } from 'fuels';
import { ScriptTransactionRequest, bn, Predicate, BN, Wallet } from 'fuels';
import { launchTestNode } from 'fuels/test-utils';

Expand All @@ -16,7 +16,7 @@ describe('Interacting with Predicates', () => {
fundedWallet: WalletUnlocked,
inputData: [string],
abi: JsonAbi,
bytecode: string,
bytecode: BytesLike,
configurableConstants?: Record<string, unknown>
): Promise<Predicate<string[]>> {
const predicate = new Predicate({
Expand Down
2 changes: 1 addition & 1 deletion apps/docs-snippets/src/guide/types/conversion.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,6 @@ describe('Conversion Types', () => {
const assetId: AssetId = address.toAssetId();
// #endregion conversion-4

expect(assetId.value);
expect(assetId.bits).toEqual(b256);
});
});
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { CoinQuantity, BN } from 'fuels';
import type { BN } from 'fuels';
import { Wallet } from 'fuels';
import { launchTestNode } from 'fuels/test-utils';

Expand Down Expand Up @@ -37,7 +37,7 @@ describe('Checking balances', () => {
// #region checking-balances-2
const myWallet = Wallet.fromPrivateKey(privateKey, provider);

const balances: CoinQuantity[] = await myWallet.getBalances();
const { balances } = await myWallet.getBalances();
// #endregion checking-balances-2

expect(balances).toBeDefined();
Expand Down
Loading

0 comments on commit e4bce25

Please sign in to comment.