Skip to content

Commit

Permalink
feat: remove deprecated stuff wallet (#1113)
Browse files Browse the repository at this point in the history
Bump `fuels` to `0.74.0` version and also remove deprecated stuff
related to the `connectors` and latest sdk.

- Remove `@fuel-wallet/react`
- Remove all connectors from `@fuel-wallet/connectors`

This PR includes contributions from:
- #1086
- #1093

It's blocked by FuelLabs/fuel-connectors#1

---------

Co-authored-by: Sérgio Torres <[email protected]>
Co-authored-by: luizstacio <[email protected]>
  • Loading branch information
3 people authored Mar 15, 2024
1 parent 77f865c commit 3c5d91d
Show file tree
Hide file tree
Showing 149 changed files with 2,821 additions and 6,141 deletions.
7 changes: 7 additions & 0 deletions .changeset/blue-zoos-flow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@fuel-wallet/connections': patch
'@fuel-wallet/types': patch
'fuels-wallet': patch
---

chore: update ts-sdk and fuel-ui packages
7 changes: 6 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": ["docs", "@fuel-wallet/e2e-contract-tests", "@fuels/update-sdk"],
"ignore": [
"docs",
"@fuel-wallet/e2e-contract-tests",
"@fuels/update-sdk",
"@fuel-wallet/sdk"
],
"snapshot": {
"useCalculatedVersion": true,
"prereleaseTemplate": "{tag}-{commit}"
Expand Down
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ contracts
**/__generated__/
**/generated/*
.changeset/**.md
**/playwright-html/
**/playwright-results/
12 changes: 7 additions & 5 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ jobs:
env:
NODE_ENV: test

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
name: playwright-app-report
path: packages/app/playwright-results
retention-days: 30

- name: Stop Test Node
Expand Down Expand Up @@ -149,11 +149,13 @@ jobs:
env:
NODE_ENV: test

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: packages/e2e-contract-tests/playwright-report/
path: |
packages/app/playwright-report/
packages/app/playwright-html/
retention-days: 30

- name: Stop Test Node
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,7 @@ act-actions

# XState typegen
*.typegen.ts


playwright-results
playwright-html
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ pnpm-lock.yaml
**/__generated__/
**/generated/
.changeset/**.md
**/playwright-html/
**/playwright-results/
6 changes: 4 additions & 2 deletions examples/cra-dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
"start": "vite"
},
"dependencies": {
"@fuel-wallet/react": "workspace:*",
"fuels": "0.74.0",
"@fuels/connectors": "0.1.0",
"@fuels/react": "0.16.0",
"fuels": "0.75.0",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@tanstack/react-query-devtools": "^4.36.1",
"@types/react": "18.2.56",
"@types/react-dom": "18.2.19",
"@vitejs/plugin-react": "4.2.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/cra-dapp/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
useDisconnect,
useConnectUI,
useIsConnected,
} from '@fuel-wallet/react';
} from '@fuels/react';
import './App.css';

function App() {
Expand Down
19 changes: 17 additions & 2 deletions examples/cra-dapp/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
import { FuelProvider } from '@fuel-wallet/react';
import {
FuelWalletConnector,
FuelWalletDevelopmentConnector,
FueletWalletConnector,
} from '@fuels/connectors';
import { FuelProvider } from '@fuels/react';
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
import React from 'react';
import ReactDOM from 'react-dom/client';

import App from './App';

ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<React.StrictMode>
<FuelProvider>
<FuelProvider
fuelConfig={{
connectors: [
new FuelWalletConnector(),
new FuelWalletDevelopmentConnector(),
new FueletWalletConnector(),
],
}}
>
<App />
<ReactQueryDevtools initialIsOpen={false} />
</FuelProvider>
</React.StrictMode>
);
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@
"xstate:typegen": "pnpm -r xstate:typegen"
},
"dependencies": {
"@fuel-ui/css": "0.23.0",
"@fuel-ui/react": "0.23.0",
"compare-versions": "^6.1.0",
"execa": "^8.0.1"
},
Expand Down
2 changes: 2 additions & 0 deletions packages/app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
/storybook
playwright-results
playwright-html

node_modules
dist
Expand Down
192 changes: 96 additions & 96 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,108 +20,108 @@
"codegen": "graphql-codegen --config codegen.ts"
},
"dependencies": {
"@fontsource/source-code-pro": "^5.0.13",
"@fuel-ts/wallet-manager": "0.73.0",
"@fuel-ui/css": "0.23.0",
"@fuel-ui/icons": "0.23.0",
"@fuel-ui/react": "0.23.0",
"@fontsource/source-code-pro": "5.0.13",
"@fuel-ui/css": "0.23.2",
"@fuel-ui/icons": "0.23.2",
"@fuel-ui/react": "0.23.2",
"@fuel-ui/test-utils": "0.17.0",
"@fuel-wallet/sdk": "workspace:*",
"@fuel-wallet/connections": "workspace:*",
"@fuel-wallet/types": "workspace:*",
"@fuels/assets": "0.1.4",
"@fuels/local-storage": "0.1.4",
"@fuels/react-xstore": "0.1.4",
"@hookform/resolvers": "^3.3.2",
"@react-aria/utils": "^3.21.0",
"@sentry/browser": "^7.73.0",
"@storybook/addon-viewport": "^7.4.6",
"@storybook/jest": "^0.2.3",
"@xstate/react": "^3.2.2",
"compare-versions": "^6.1.0",
"@fuels/assets": "0.15.3",
"@fuels/connectors": "0.1.0",
"@fuels/local-storage": "0.15.3",
"@fuels/react-xstore": "0.15.3",
"@hookform/resolvers": "3.3.2",
"@react-aria/utils": "3.21.0",
"@sentry/browser": "7.73.0",
"@storybook/addon-viewport": "7.4.6",
"@storybook/jest": "0.2.3",
"@xstate/react": "3.2.2",
"compare-versions": "6.1.0",
"cross-fetch": "4.0.0",
"dayjs": "^1.11.10",
"dexie": "^3.2.4",
"dayjs": "1.11.10",
"dexie": "3.2.4",
"dexie-observable": "4.0.1-beta.13",
"dexie-react-hooks": "^1.1.6",
"events": "^3.3.0",
"fake-indexeddb": "^4.0.2",
"framer-motion": "^10.16.4",
"fuels": "0.73.0",
"graphql": "^16.8.1",
"graphql-request": "^6.1.0",
"graphql-tag": "^2.12.6",
"json-rpc-2.0": "^1.6.0",
"lodash.clonedeep": "^4.0.8",
"lodash.debounce": "^4.0.8",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-google-recaptcha": "^3.1.0",
"react-helmet": "^6.1.0",
"react-hook-form": "^7.47.0",
"react-json-view": "^1.21.3",
"react-qr-code": "^2.0.12",
"react-router-dom": "^6.16.0",
"tai64": "^1.0.0",
"vite-plugin-markdown": "^2.1.0",
"xstate": "^4.38.2",
"yup": "^1.3.2"
"dexie-react-hooks": "1.1.6",
"events": "3.3.0",
"fake-indexeddb": "4.0.2",
"framer-motion": "10.16.4",
"fuels": "0.75.0",
"graphql": "16.8.1",
"graphql-request": "6.1.0",
"graphql-tag": "2.12.6",
"json-rpc-2.0": "1.6.0",
"lodash.clonedeep": "4.5.0",
"lodash.debounce": "4.0.8",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-google-recaptcha": "3.1.0",
"react-helmet": "6.1.0",
"react-hook-form": "7.47.0",
"react-json-view": "1.21.3",
"react-qr-code": "2.0.12",
"react-router-dom": "6.16.0",
"tai64": "1.0.0",
"vite-plugin-markdown": "2.2.0",
"xstate": "4.38.2",
"yup": "1.3.2"
},
"devDependencies": {
"@fuels/react": "0.15.1",
"@crxjs/vite-plugin": "^1.0.14",
"@graphql-codegen/cli": "^5.0.0",
"@graphql-codegen/named-operations-object": "^2.3.1",
"@graphql-codegen/near-operation-file-preset": "^2.5.0",
"@graphql-codegen/typescript": "^4.0.1",
"@graphql-codegen/typescript-graphql-request": "^5.0.0",
"@graphql-codegen/typescript-operations": "^4.0.1",
"@graphql-codegen/typescript-react-apollo": "^3.3.7",
"@playwright/test": "^1.39.0",
"@sentry/cli": "^2.21.2",
"@storybook/addon-a11y": "^7.4.6",
"@storybook/addon-actions": "^7.4.6",
"@storybook/addon-essentials": "^7.4.6",
"@storybook/addon-interactions": "^7.4.6",
"@storybook/addon-jest": "^7.4.6",
"@storybook/addon-links": "^7.4.6",
"@storybook/addon-storysource": "^7.4.6",
"@storybook/addons": "^7.4.6",
"@storybook/api": "^7.4.6",
"@storybook/components": "^7.4.6",
"@storybook/core-events": "^7.4.6",
"@storybook/jest": "^0.2.3",
"@storybook/react": "^7.4.6",
"@storybook/react-vite": "^7.4.6",
"@storybook/react-webpack5": "^7.4.6",
"@storybook/testing-library": "^0.2.2",
"@storybook/theming": "^7.4.6",
"@testing-library/react": "^14.0.0",
"@types/chrome": "^0.0.246",
"@types/lodash.clonedeep": "^4.5.7",
"@types/lodash.debounce": "^4.0.7",
"@types/react": "^18.2.28",
"@types/react-custom-scroll": "^5.0.1",
"@types/react-dom": "^18.2.13",
"@types/react-google-recaptcha": "^2.1.6",
"@types/react-helmet": "^6.1.7",
"@vitejs/plugin-react": "^4.1.0",
"@xstate/inspect": "^0.8.0",
"get-graphql-schema": "^2.1.2",
"jszip": "^3.10.1",
"msw": "^1.3.2",
"msw-storybook-addon": "^1.9.0",
"storybook": "^7.4.6",
"storybook-addon-react-router-v6": "^2.0.7",
"storybook-dark-mode": "^3.0.1",
"ts-jest-mock-import-meta": "^1.1.0",
"tsconfig-paths-webpack-plugin": "^4.1.0",
"typescript": "^5.2.2",
"vite": "^4.4.11",
"vite-plugin-clean": "^1.0.0",
"vite-plugin-static-copy": "^0.17.0",
"vite-tsconfig-paths": "^4.2.1",
"whatwg-fetch": "^3.6.20"
"@crxjs/vite-plugin": "1.0.14",
"@fuels/react": "0.16.0",
"@fuel-wallet/sdk": "workspace:../sdk",
"@fuel-wallet/types": "workspace:../types",
"@graphql-codegen/cli": "5.0.0",
"@graphql-codegen/named-operations-object": "2.3.1",
"@graphql-codegen/near-operation-file-preset": "2.5.0",
"@graphql-codegen/typescript": "4.0.1",
"@graphql-codegen/typescript-graphql-request": "5.0.0",
"@graphql-codegen/typescript-operations": "4.0.1",
"@graphql-codegen/typescript-react-apollo": "3.3.7",
"@playwright/test": "1.39.0",
"@sentry/cli": "2.21.2",
"@storybook/addon-a11y": "7.4.6",
"@storybook/addon-actions": "7.4.6",
"@storybook/addon-essentials": "7.4.6",
"@storybook/addon-interactions": "7.4.6",
"@storybook/addon-jest": "7.4.6",
"@storybook/addon-links": "7.4.6",
"@storybook/addon-storysource": "7.4.6",
"@storybook/addons": "7.4.6",
"@storybook/api": "7.4.6",
"@storybook/components": "7.4.6",
"@storybook/core-events": "7.4.6",
"@storybook/jest": "0.2.3",
"@storybook/react": "7.4.6",
"@storybook/react-vite": "7.4.6",
"@storybook/react-webpack5": "7.4.6",
"@storybook/testing-library": "0.2.2",
"@storybook/theming": "7.4.6",
"@testing-library/react": "14.0.0",
"@types/chrome": "0.0.246",
"@types/lodash.clonedeep": "4.5.7",
"@types/lodash.debounce": "4.0.7",
"@types/react": "18.2.28",
"@types/react-custom-scroll": "5.0.1",
"@types/react-dom": "18.2.13",
"@types/react-google-recaptcha": "2.1.6",
"@types/react-helmet": "6.1.7",
"@vitejs/plugin-react": "4.1.0",
"@xstate/inspect": "0.8.0",
"get-graphql-schema": "2.1.2",
"jszip": "3.10.1",
"msw": "1.3.2",
"msw-storybook-addon": "1.9.0",
"storybook": "7.4.6",
"storybook-addon-react-router-v6": "2.0.7",
"storybook-dark-mode": "3.0.1",
"ts-jest-mock-import-meta": "1.1.0",
"tsconfig-paths-webpack-plugin": "4.1.0",
"typescript": "5.2.2",
"vite": "4.5.2",
"vite-plugin-clean": "1.0.0",
"vite-plugin-static-copy": "0.17.0",
"vite-tsconfig-paths": "4.2.1",
"whatwg-fetch": "3.6.20"
},
"msw": {
"workerDirectory": "public"
Expand Down
15 changes: 9 additions & 6 deletions packages/app/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { PlaywrightTestConfig } from '@playwright/test';
import { defineConfig } from '@playwright/test';
import { join } from 'path';
import './load.envs';

Expand All @@ -7,11 +7,15 @@ const distDirectory = join(__dirname, './dist');
const IS_CI = !!process.env.CI;
const PORT = process.env.PORT;

const config: PlaywrightTestConfig = {
export default defineConfig({
workers: 1,
testMatch: join(__dirname, './playwright/**/*.test.ts'),
testDir: join(__dirname, './playwright/'),
reporter: [['list', { printSteps: true }]],
outputDir: join(__dirname, './playwright-results/'),
reporter: [
['list', { printSteps: true }],
['html', { outputFolder: join(__dirname, './playwright-html/') }],
],
// Retry tests on CI if they fail
retries: IS_CI ? 2 : 0,
webServer: {
Expand All @@ -23,7 +27,6 @@ const config: PlaywrightTestConfig = {
baseURL: `http://localhost:${PORT}/`,
permissions: ['clipboard-read', 'clipboard-write'],
headless: true,
trace: 'on-first-retry',
},
};

export default config;
});
5 changes: 2 additions & 3 deletions packages/app/playwright/e2e.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import {
Fuel,
FuelWalletConnector,
FuelWalletDevelopmentConnector,
} from '@fuel-wallet/sdk';
import { Address } from 'fuels';
} from '@fuels/connectors';
import { Address, Fuel } from 'fuels';

window.fuel = new Fuel({
connectors: [new FuelWalletConnector(), new FuelWalletDevelopmentConnector()],
Expand Down
Loading

0 comments on commit 3c5d91d

Please sign in to comment.