From 6d4e494821b171091458991ffb795afc6bf8bab2 Mon Sep 17 00:00:00 2001 From: Kaspar Kallas Date: Tue, 13 May 2025 09:51:24 +0300 Subject: [PATCH 1/5] update major version of rtk-query in sdk-redux --- packages/sdk-redux/CHANGELOG.md | 9 + packages/sdk-redux/package.json | 28 +-- .../rtkQuery/getSerializeQueryArgs.ts | 2 +- .../rtkQuery/rpcApiSlice/rpcApiSlice.ts | 6 +- .../rpcApiSlice/rpcEndpointBuilder.ts | 2 +- .../subgraphApiSlice/subgraphApiSlice.ts | 6 +- .../subgraphEndpointBuilder.ts | 2 +- .../initiateNewTransactionTrackingThunk.ts | 1 + .../trackedTransaction.ts | 1 + .../transactionTrackerAdapter.ts | 1 - .../transactionTrackerSlice.ts | 2 +- packages/sdk-redux/src/sdkReduxConfig.ts | 4 +- .../sdk-redux/src/sdkReduxInitialization.ts | 6 +- packages/sdk-redux/tsconfig.json | 4 +- packages/sdk-redux/tsconfig.module.json | 15 -- yarn.lock | 236 +++++++----------- 16 files changed, 140 insertions(+), 185 deletions(-) delete mode 100644 packages/sdk-redux/tsconfig.module.json diff --git a/packages/sdk-redux/CHANGELOG.md b/packages/sdk-redux/CHANGELOG.md index b35a69bd06..94e3ec0397 100644 --- a/packages/sdk-redux/CHANGELOG.md +++ b/packages/sdk-redux/CHANGELOG.md @@ -7,6 +7,15 @@ All notable changes to the SDK-redux will be documented in this file. ### Changed ### Fixed +## [0.7.0] + +### Added +### Changed +- [BREAKING] update to @reduxjs/toolkit 2 +- [BREAKING] leave only ESM support (no CommonJS) + +### Fixed + ## [0.6.1] - 2024-08-01 ### Changed diff --git a/packages/sdk-redux/package.json b/packages/sdk-redux/package.json index f43c44071b..f493758c1b 100644 --- a/packages/sdk-redux/package.json +++ b/packages/sdk-redux/package.json @@ -1,7 +1,7 @@ { "name": "@superfluid-finance/sdk-redux", "description": "SDK Redux for streamlined front-end application development with Superfluid Protocol", - "version": "0.6.1", + "version": "0.7.0", "bugs": "https://github.com/superfluid-finance/protocol-monorepo/issues", "config": { "commitizen": { @@ -10,26 +10,23 @@ }, "dependencies": { "graphql-request": "6.1.0", - "lodash": "4.17.21", - "promise-retry": "2.0.1" + "promise-retry": "2.0.1", + "lodash.memoize": "4.1.2", + "lodash.uniqby": "4.7.0" }, "devDependencies": { - "@reduxjs/toolkit": "^1.9.7", + "@reduxjs/toolkit": "^2", "@types/promise-retry": "^1.1.6", - "@types/react": "^18", - "@types/react-dom": "^18", - "react": "^18", - "react-dom": "^18", - "react-redux": "^8.1.3" + "@types/react": "^19", + "@types/react-dom": "^19", + "react": "^19", + "react-dom": "^19", + "react-redux": "^9" }, "directories": { "test": "test" }, - "engines": { - "node": ">=12" - }, "files": [ - "dist/main", "dist/module", "CHANGELOG.md", "LICENSE", @@ -41,7 +38,7 @@ "main": "dist/main/index.js", "module": "dist/module/index.js", "peerDependencies": { - "@reduxjs/toolkit": "^1.7.0 || ^1.8.0 || ^1.9.0", + "@reduxjs/toolkit": ">=2", "@superfluid-finance/sdk-core": ">0.7.0" }, "repository": { @@ -51,8 +48,7 @@ }, "scripts": { "build": "rm -rf dist && run-p -l build:*", - "build:main": "tsc -p tsconfig.json", - "build:module": "tsc -p tsconfig.module.json", + "build:module": "tsc -p tsconfig.json", "lint": "run-s lint:*", "lint:eslint": "eslint src --ext .ts", "fix": "run-s fix:*", diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/getSerializeQueryArgs.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/getSerializeQueryArgs.ts index 5d3768261e..cf31b06df2 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/getSerializeQueryArgs.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/getSerializeQueryArgs.ts @@ -1,5 +1,5 @@ import {isPlainObject} from '@reduxjs/toolkit'; -import {SerializeQueryArgs} from '@reduxjs/toolkit/dist/query/defaultSerializeQueryArgs'; +import {type SerializeQueryArgs} from '@reduxjs/toolkit/query'; import {mutationOverridesKey, mutationSignerKey} from '../../utils'; diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/rpcApiSlice.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/rpcApiSlice.ts index b8c8791d93..ef94701d4d 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/rpcApiSlice.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/rpcApiSlice.ts @@ -1,5 +1,5 @@ -import {CreateApi} from '@reduxjs/toolkit/dist/query'; -import type {ModuleName} from '@reduxjs/toolkit/dist/query/apiTypes'; +import {type CreateApi} from '@reduxjs/toolkit/query'; +import {coreModuleName} from '@reduxjs/toolkit/query'; import {typeGuard} from '../../../utils'; import {cacheTagTypes} from '../cacheTags/CacheTagTypes'; @@ -9,6 +9,8 @@ import {rpcBaseQuery} from './rpcBaseQuery'; import {RpcEndpointBuilder} from './rpcEndpointBuilder'; import {RpcReducerPath} from './rpcReducerPath'; +type ModuleName = typeof coreModuleName; + export const createRpcApiSlice = (createRtkQueryApi: CreateApi) => createRtkQueryApi({ reducerPath: typeGuard('superfluid_rpc'), diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/rpcEndpointBuilder.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/rpcEndpointBuilder.ts index 866419f95c..97981a10a6 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/rpcEndpointBuilder.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/rpcEndpointBuilder.ts @@ -1,4 +1,4 @@ -import {EndpointBuilder} from '@reduxjs/toolkit/dist/query/endpointDefinitions'; +import {type EndpointBuilder} from '@reduxjs/toolkit/query'; import {CacheTagType} from '../cacheTags/CacheTagTypes'; diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/subgraphApiSlice.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/subgraphApiSlice.ts index 466d235643..6906e5ea79 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/subgraphApiSlice.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/subgraphApiSlice.ts @@ -1,11 +1,13 @@ -import {CreateApi} from '@reduxjs/toolkit/dist/query'; -import {ModuleName} from '@reduxjs/toolkit/dist/query/apiTypes'; +import {type CreateApi} from '@reduxjs/toolkit/query'; +import {coreModuleName} from '@reduxjs/toolkit/query'; import {typeGuard} from '../../../utils'; import {cacheTagTypes} from '../cacheTags/CacheTagTypes'; import {CacheTime} from '../cacheTime'; import {getSerializeQueryArgs} from '../getSerializeQueryArgs'; +type ModuleName = typeof coreModuleName; + import {subgraphBaseQuery} from './subgraphBaseQuery'; import {SubgraphEndpointBuilder} from './subgraphEndpointBuilder'; import {SubgraphReducerPath} from './subgraphReducerPath'; diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/subgraphEndpointBuilder.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/subgraphEndpointBuilder.ts index 8c79fed899..c470db86c9 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/subgraphEndpointBuilder.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/subgraphEndpointBuilder.ts @@ -1,4 +1,4 @@ -import {EndpointBuilder} from '@reduxjs/toolkit/dist/query/endpointDefinitions'; +import {type EndpointBuilder} from '@reduxjs/toolkit/query'; import {CacheTagType} from '../cacheTags/CacheTagTypes'; diff --git a/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/thunks/initiateNewTransactionTrackingThunk.ts b/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/thunks/initiateNewTransactionTrackingThunk.ts index 6056c2462e..317e24a031 100644 --- a/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/thunks/initiateNewTransactionTrackingThunk.ts +++ b/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/thunks/initiateNewTransactionTrackingThunk.ts @@ -29,6 +29,7 @@ export const initiateNewTransactionTrackingThunk = createAsyncThunk< dispatch( getTransactionTrackerSlice().actions.addTransaction({ + id: transactionHash, chainId: arg.chainId, hash: transactionHash, signerAddress: ethers.utils.getAddress(arg.signerAddress), diff --git a/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/trackedTransaction.ts b/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/trackedTransaction.ts index 950f6df2a6..c9411e4e37 100644 --- a/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/trackedTransaction.ts +++ b/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/trackedTransaction.ts @@ -6,6 +6,7 @@ export type TransactionStatus = 'Pending' | 'Succeeded' | 'Failed' | 'Replaced' // "Redux" stuff needs to be serializable. Blockchain transaction object is unserializable. export interface TrackedTransaction { + id: string; chainId: number; hash: string; /** diff --git a/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/transactionTrackerAdapter.ts b/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/transactionTrackerAdapter.ts index 4003d61167..c33fe64a8c 100644 --- a/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/transactionTrackerAdapter.ts +++ b/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/transactionTrackerAdapter.ts @@ -4,7 +4,6 @@ import {TrackedTransaction} from './trackedTransaction'; import {TransactionTrackerReducer, transactionTrackerSlicePrefix} from './transactionTrackerSlice'; export const transactionTrackerAdapter = createEntityAdapter({ - selectId: (transaction) => transaction.hash, sortComparer: (a) => a.timestampMs, }); diff --git a/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/transactionTrackerSlice.ts b/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/transactionTrackerSlice.ts index 7a1bb9f019..dd306e1db2 100644 --- a/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/transactionTrackerSlice.ts +++ b/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/transactionTrackerSlice.ts @@ -5,7 +5,6 @@ import {transactionTrackerAdapter} from './transactionTrackerAdapter'; export const transactionTrackerSlicePrefix = 'superfluid_transactions' as const; export const createTransactionTrackerSlice = () => ({ - reducerPath: transactionTrackerSlicePrefix, ...createSlice({ name: transactionTrackerSlicePrefix, initialState: transactionTrackerAdapter.getInitialState(), @@ -14,6 +13,7 @@ export const createTransactionTrackerSlice = () => ({ updateTransaction: transactionTrackerAdapter.updateOne, }, }), + reducerPath: transactionTrackerSlicePrefix, }); export type TransactionTrackerSlice = ReturnType; diff --git a/packages/sdk-redux/src/sdkReduxConfig.ts b/packages/sdk-redux/src/sdkReduxConfig.ts index 15d6380584..e5b12b0461 100644 --- a/packages/sdk-redux/src/sdkReduxConfig.ts +++ b/packages/sdk-redux/src/sdkReduxConfig.ts @@ -1,6 +1,6 @@ import {Framework} from '@superfluid-finance/sdk-core'; import {Signer} from 'ethers'; -import _ from 'lodash'; +import {memoize} from 'lodash'; // NOTE: This file is marked for side-effects inside the package.json for efficient tree-shaking. @@ -102,7 +102,7 @@ export default class SdkReduxConfig ? () => Promise.resolve(instanceOrFactory) : instanceOrFactory; - this.memoizedFrameworkFactories.set(chainId, _.memoize(frameworkFactory)); + this.memoizedFrameworkFactories.set(chainId, memoize(frameworkFactory)); } setTransactionTrackerSlice(slice: TransactionTrackerSlice): void { diff --git a/packages/sdk-redux/src/sdkReduxInitialization.ts b/packages/sdk-redux/src/sdkReduxInitialization.ts index 6a04ad0ee6..aacfe1a8f3 100644 --- a/packages/sdk-redux/src/sdkReduxInitialization.ts +++ b/packages/sdk-redux/src/sdkReduxInitialization.ts @@ -1,5 +1,5 @@ -import {CreateApi} from '@reduxjs/toolkit/dist/query'; -import type {ModuleName} from '@reduxjs/toolkit/dist/query/apiTypes'; +import {CreateApi} from '@reduxjs/toolkit/query'; +import {coreModuleName} from '@reduxjs/toolkit/query'; import {Framework} from '@superfluid-finance/sdk-core'; import {createRpcApiSlice} from './reduxSlices/rtkQuery/rpcApiSlice/rpcApiSlice'; @@ -7,6 +7,8 @@ import {createSubgraphApiSlice} from './reduxSlices/rtkQuery/subgraphApiSlice/su import {createTransactionTrackerSlice} from './reduxSlices/transactionTrackerSlice/transactionTrackerSlice'; import {getConfig} from './sdkReduxConfig'; +type ModuleName = typeof coreModuleName; + /** * For initializing "rpcApiSlice" Redux slice. * diff --git a/packages/sdk-redux/tsconfig.json b/packages/sdk-redux/tsconfig.json index bd20cb8569..ed53fea881 100644 --- a/packages/sdk-redux/tsconfig.json +++ b/packages/sdk-redux/tsconfig.json @@ -1,11 +1,11 @@ { "compilerOptions": { "incremental": true, - "target": "ES2019", + "target": "ESNext", "outDir": "dist/main", "rootDir": "src", "moduleResolution": "node", - "module": "commonjs", + "module": "ESNext", "lib": [ "DOM", "ESNext" ], "declaration": true, "declarationMap": true, diff --git a/packages/sdk-redux/tsconfig.module.json b/packages/sdk-redux/tsconfig.module.json deleted file mode 100644 index 673a0870a7..0000000000 --- a/packages/sdk-redux/tsconfig.module.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "./tsconfig", - "compilerOptions": { - "target": "ES2019", - "outDir": "dist/module", - "module": "esnext", - "declaration": true, - "declarationMap": true, - "sourceMap": true, - "inlineSourceMap": false - }, - "exclude": [ - "node_modules/**" - ] -} diff --git a/yarn.lock b/yarn.lock index 4362b80bc9..abfe283564 100644 --- a/yarn.lock +++ b/yarn.lock @@ -153,7 +153,7 @@ dependencies: node-fetch "^2.6.1" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.22.13", "@babel/code-frame@^7.24.7", "@babel/code-frame@^7.27.1": +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.24.7", "@babel/code-frame@^7.27.1": version "7.27.1" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.27.1.tgz#200f715e66d52a23b221a9435534a91cc13ad5be" integrity sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg== @@ -188,7 +188,7 @@ json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.14.0", "@babel/generator@^7.18.13", "@babel/generator@^7.23.0", "@babel/generator@^7.25.0", "@babel/generator@^7.25.4": +"@babel/generator@^7.14.0", "@babel/generator@^7.18.13", "@babel/generator@^7.25.0", "@babel/generator@^7.25.4": version "7.27.1" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.27.1.tgz#862d4fad858f7208edd487c28b58144036b76230" integrity sha512-UnJfnIpc/+JO0/+KRVQNGU+y5taA5vCbwN8+azkX6beii/ZF+enZJSOKo11ZSzGJjlNfJHfQtmQT8H+9TXPG2w== @@ -243,14 +243,14 @@ resolve "^1.14.2" semver "^6.1.2" -"@babel/helper-environment-visitor@^7.18.9", "@babel/helper-environment-visitor@^7.22.20": +"@babel/helper-environment-visitor@^7.18.9": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz#4b31ba9551d1f90781ba83491dd59cf9b269f7d9" integrity sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ== dependencies: "@babel/types" "^7.24.7" -"@babel/helper-function-name@^7.18.9", "@babel/helper-function-name@^7.21.0", "@babel/helper-function-name@^7.23.0": +"@babel/helper-function-name@^7.18.9", "@babel/helper-function-name@^7.21.0": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz#75f1e1725742f39ac6584ee0b16d94513da38dd2" integrity sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA== @@ -258,13 +258,6 @@ "@babel/template" "^7.24.7" "@babel/types" "^7.24.7" -"@babel/helper-hoist-variables@^7.22.5": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz#b4ede1cde2fd89436397f30dc9376ee06b0f25ee" - integrity sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ== - dependencies: - "@babel/types" "^7.24.7" - "@babel/helper-member-expression-to-functions@^7.20.7", "@babel/helper-member-expression-to-functions@^7.21.0": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.21.0.tgz#319c6a940431a133897148515877d2f3269c3ba5" @@ -329,14 +322,14 @@ dependencies: "@babel/types" "^7.20.0" -"@babel/helper-split-export-declaration@^7.18.6", "@babel/helper-split-export-declaration@^7.22.6": +"@babel/helper-split-export-declaration@^7.18.6": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz#83949436890e07fa3d6873c61a96e3bbf692d856" integrity sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA== dependencies: "@babel/types" "^7.24.7" -"@babel/helper-string-parser@^7.24.8", "@babel/helper-string-parser@^7.27.1": +"@babel/helper-string-parser@^7.27.1": version "7.27.1" resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687" integrity sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA== @@ -359,17 +352,7 @@ "@babel/template" "^7.25.0" "@babel/types" "^7.25.0" -"@babel/highlight@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d" - integrity sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw== - dependencies: - "@babel/helper-validator-identifier" "^7.24.7" - chalk "^2.4.2" - js-tokens "^4.0.0" - picocolors "^1.0.0" - -"@babel/parser@^7.14.0", "@babel/parser@^7.16.8", "@babel/parser@^7.23.0", "@babel/parser@^7.23.9", "@babel/parser@^7.25.0", "@babel/parser@^7.25.4", "@babel/parser@^7.27.1", "@babel/parser@^7.27.2": +"@babel/parser@^7.14.0", "@babel/parser@^7.16.8", "@babel/parser@^7.23.9", "@babel/parser@^7.25.0", "@babel/parser@^7.25.4", "@babel/parser@^7.27.1", "@babel/parser@^7.27.2": version "7.27.2" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.27.2.tgz#577518bedb17a2ce4212afd052e01f7df0941127" integrity sha512-QYLs8299NA7WM/bZAdp+CviYYkVoYXlDW2rzliy3chxd1PQjej7JORuMJDJXJUb9g0TT+B99EwaVLKmX+sPXWw== @@ -609,7 +592,7 @@ dependencies: regenerator-runtime "^0.13.11" -"@babel/template@^7.18.10", "@babel/template@^7.20.7", "@babel/template@^7.22.15", "@babel/template@^7.24.7", "@babel/template@^7.25.0": +"@babel/template@^7.18.10", "@babel/template@^7.20.7", "@babel/template@^7.24.7", "@babel/template@^7.25.0": version "7.27.2" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.27.2.tgz#fa78ceed3c4e7b63ebf6cb39e5852fca45f6809d" integrity sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw== @@ -631,7 +614,7 @@ debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.16.8", "@babel/types@^7.18.13", "@babel/types@^7.18.6", "@babel/types@^7.20.0", "@babel/types@^7.20.7", "@babel/types@^7.21.0", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.24.7", "@babel/types@^7.25.0", "@babel/types@^7.25.2", "@babel/types@^7.25.4", "@babel/types@^7.27.1": +"@babel/types@^7.0.0", "@babel/types@^7.16.8", "@babel/types@^7.18.13", "@babel/types@^7.18.6", "@babel/types@^7.20.0", "@babel/types@^7.20.7", "@babel/types@^7.21.0", "@babel/types@^7.24.7", "@babel/types@^7.25.0", "@babel/types@^7.25.2", "@babel/types@^7.25.4", "@babel/types@^7.27.1": version "7.27.1" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.27.1.tgz#9defc53c16fc899e46941fc6901a9eea1c9d8560" integrity sha512-+EzkxvLNfiUeKMgy/3luqfsCWFRXLb7U6wNQTk60tovuckwB15B191tJWvpp4HjiQWdJkCxO3Wbvc6jlk3Xb2Q== @@ -3259,15 +3242,17 @@ resolved "https://registry.yarnpkg.com/@redux-saga/types/-/types-1.2.1.tgz#9403f51c17cae37edf870c6bc0c81c1ece5ccef8" integrity sha512-1dgmkh+3so0+LlBWRhGA33ua4MYr7tUOj+a9Si28vUi0IUFNbff1T3sgpeDJI/LaC75bBYnQ0A3wXjn0OrRNBA== -"@reduxjs/toolkit@^1.9.7": - version "1.9.7" - resolved "https://registry.yarnpkg.com/@reduxjs/toolkit/-/toolkit-1.9.7.tgz#7fc07c0b0ebec52043f8cb43510cf346405f78a6" - integrity sha512-t7v8ZPxhhKgOKtU+uyJT13lu4vL7az5aFi4IdoDs/eS548edn2M8Ik9h8fxgvMjGoAUVFSt6ZC1P5cWmQ014QQ== +"@reduxjs/toolkit@^2": + version "2.8.1" + resolved "https://registry.yarnpkg.com/@reduxjs/toolkit/-/toolkit-2.8.1.tgz#85a50572627bce1e6cfbc3803b31a3290f5f344d" + integrity sha512-GLjHS13LiBdiuxSJvfWs3+Cx5yt97mCbuVlDteTusS6VRksPhoWviO8L1e3Re1G94m6lkw/l4pjEEyyNaGf19g== dependencies: - immer "^9.0.21" - redux "^4.2.1" - redux-thunk "^2.4.2" - reselect "^4.1.8" + "@standard-schema/spec" "^1.0.0" + "@standard-schema/utils" "^0.3.0" + immer "^10.0.3" + redux "^5.0.1" + redux-thunk "^3.1.0" + reselect "^5.1.0" "@repeaterjs/repeater@^3.0.4": version "3.0.4" @@ -3591,6 +3576,16 @@ resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.18.0.tgz#8e77a02a09ecce957255a2f48c9a7178ec191908" integrity sha512-yfORGUIPgLck41qyN7nbwJRAx17/jAIXCTanHOJZhB6PJ1iAk/84b/xlsVKFSyNyLXIj0dhppoE0+CRws7wlzA== +"@standard-schema/spec@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@standard-schema/spec/-/spec-1.0.0.tgz#f193b73dc316c4170f2e82a881da0f550d551b9c" + integrity sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA== + +"@standard-schema/utils@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@standard-schema/utils/-/utils-0.3.0.tgz#3d5e608f16c2390c10528e98e59aef6bf73cae7b" + integrity sha512-e7Mew686owMaPJVNNLs55PUvgz371nKgwsc4vxE49zsODpJEnxgxRo2y/OKrqueavXgZNMDVj3DdHFlaSAeU8g== + "@szmarczak/http-timer@^4.0.5": version "4.0.6" resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.6.tgz#b4a914bb62e7c272d4e5989fe4440f812ab1d807" @@ -4181,14 +4176,6 @@ dependencies: "@types/unist" "*" -"@types/hoist-non-react-statics@^3.3.1": - version "3.3.1" - resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz#1124aafe5118cb591977aeb1ceaaed1070eb039f" - integrity sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA== - dependencies: - "@types/react" "*" - hoist-non-react-statics "^3.3.0" - "@types/http-cache-semantics@*", "@types/http-cache-semantics@^4.0.2": version "4.0.4" resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz#b979ebad3919799c979b17c72621c0bc0a31c6c4" @@ -4305,11 +4292,6 @@ dependencies: "@types/retry" "*" -"@types/prop-types@*": - version "15.7.5" - resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf" - integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== - "@types/qs@*", "@types/qs@^6.9.7": version "6.9.7" resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" @@ -4320,20 +4302,16 @@ resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc" integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== -"@types/react-dom@^18": - version "18.0.11" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.0.11.tgz#321351c1459bc9ca3d216aefc8a167beec334e33" - integrity sha512-O38bPbI2CWtgw/OoQoY+BRelw7uysmXbWvw3nLWO21H1HSh+GOlqPuXshJfjmpNlKiiSDG9cc1JZAaMmVdcTlw== - dependencies: - "@types/react" "*" +"@types/react-dom@^19": + version "19.1.4" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-19.1.4.tgz#51bd9589ad43fd02a1e6a63690b9b6eb0be678e7" + integrity sha512-WxYAszDYgsMV31OVyoG4jbAgJI1Gw0Xq9V19zwhy6+hUUJlJIdZ3r/cbdmTqFv++SktQkZ/X+46yGFxp5XJBEg== -"@types/react@*", "@types/react@^18": - version "18.0.28" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.28.tgz#accaeb8b86f4908057ad629a26635fe641480065" - integrity sha512-RD0ivG1kEztNBdoAK7lekI9M+azSnitIn85h4iOiaLjaTrMjzslhaqCGaI4IyCJ1RljWiLCEu4jyrLLgqxBTew== +"@types/react@^19": + version "19.1.4" + resolved "https://registry.yarnpkg.com/@types/react/-/react-19.1.4.tgz#4d125f014d6ac26b4759775698db118701e314fe" + integrity sha512-EB1yiiYdvySuIITtD5lhW4yPyJ31RkJkkDw794LaQYrxCSaQV/47y5o1FMC4zF9ZyjUjzJMZwbovEnT5yHTW6g== dependencies: - "@types/prop-types" "*" - "@types/scheduler" "*" csstype "^3.0.2" "@types/responselike@^1.0.0": @@ -4348,11 +4326,6 @@ resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.2.tgz#ed279a64fa438bb69f2480eda44937912bb7480a" integrity sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow== -"@types/scheduler@*": - version "0.16.2" - resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39" - integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew== - "@types/secp256k1@^4.0.1": version "4.0.3" resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.3.tgz#1b8e55d8e00f08ee7220b4d59a6abe89c37a901c" @@ -4383,10 +4356,10 @@ resolved "https://registry.yarnpkg.com/@types/unist/-/unist-3.0.3.tgz#acaab0f919ce69cce629c2d4ed2eb4adc1b6c20c" integrity sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q== -"@types/use-sync-external-store@^0.0.3": - version "0.0.3" - resolved "https://registry.yarnpkg.com/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz#b6725d5f4af24ace33b36fafd295136e75509f43" - integrity sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA== +"@types/use-sync-external-store@^0.0.6": + version "0.0.6" + resolved "https://registry.yarnpkg.com/@types/use-sync-external-store/-/use-sync-external-store-0.0.6.tgz#60be8d21baab8c305132eb9cb912ed497852aadc" + integrity sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg== "@types/web3-provider-engine@^14.0.0": version "14.0.1" @@ -10320,13 +10293,6 @@ hmac-drbg@^1.0.1: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" - integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== - dependencies: - react-is "^16.7.0" - homedir-polyfill@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" @@ -10518,10 +10484,10 @@ immediate@3.3.0, immediate@^3.2.3: resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.3.0.tgz#1aef225517836bcdf7f2a2de2600c79ff0269266" integrity sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q== -immer@^9.0.21: - version "9.0.21" - resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.21.tgz#1e025ea31a40f24fb064f1fef23e931496330176" - integrity sha512-bc4NBHqOqSfRW7POMkHd51LvClaeMXpm8dx0e8oE2GORbq5aRK7Bxl4FyzVLdGtLmvLKL7BTDBG5ACQm4HWjTA== +immer@^10.0.3: + version "10.1.1" + resolved "https://registry.yarnpkg.com/immer/-/immer-10.1.1.tgz#206f344ea372d8ea176891545ee53ccc062db7bc" + integrity sha512-s2MPrmjovJcoMaHtx6K11Ra7oD05NT97w1IC5zpMkT6Atjr7H8LjaDd81iIxUYpMKSRRNMJE703M1Fhr/TctHw== immutable@5.0.3: version "5.0.3" @@ -11326,15 +11292,6 @@ iterall@^1.2.2: resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.3.0.tgz#afcb08492e2915cbd8a0884eb93a8c94d0d72fea" integrity sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg== -jackspeak@^2.0.3: - version "2.3.6" - resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.3.6.tgz#647ecc472238aee4b06ac0e461acc21a8c505ca8" - integrity sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ== - dependencies: - "@isaacs/cliui" "^8.0.2" - optionalDependencies: - "@pkgjs/parseargs" "^0.11.0" - jackspeak@^3.1.2: version "3.4.3" resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.3.tgz#8833a9d89ab4acde6188942bd1c53b6390ed5a8a" @@ -11458,11 +11415,6 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== - jsesc@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.1.0.tgz#74d335a234f67ed19907fdadfac7ccf9d409825d" @@ -12250,6 +12202,11 @@ lodash.lowerfirst@^4.3.1: resolved "https://registry.yarnpkg.com/lodash.lowerfirst/-/lodash.lowerfirst-4.3.1.tgz#de3c7b12e02c6524a0059c2f6cb7c5c52655a13d" integrity sha512-UUKX7VhP1/JL54NXg2aq/E1Sfnjjes8fNYTNkPU8ZmsaVeBvPHKdbNaN79Re5XRL01u6wbq3j0cbYZj71Fcu5w== +lodash.memoize@4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== + lodash.memoize@~3.0.3: version "3.0.4" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-3.0.4.tgz#2dcbd2c287cbc0a55cc42328bd0c736150d53e3f" @@ -12315,6 +12272,11 @@ lodash.truncate@^4.4.2: resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== +lodash.uniqby@4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz#d99c07a669e9e6d24e1362dfe266c67616af1302" + integrity sha512-e/zcLx6CSbmaEgFHCA7BnoQKyCtKMxnuWrJygbwPs/AIn+IMKl66L8/s+wBUn5LRw2pZx3bUHibiV1b6aTWIww== + lodash.uppercase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.uppercase/-/lodash.uppercase-4.3.0.tgz#c404abfd1469f93931f9bb24cf6cc7d57059bc73" @@ -12776,7 +12738,7 @@ minimatch@9.0.3: dependencies: brace-expansion "^2.0.1" -minimatch@9.0.5, minimatch@^9.0.0, minimatch@^9.0.1, minimatch@^9.0.4, minimatch@^9.0.5: +minimatch@9.0.5, minimatch@^9.0.0, minimatch@^9.0.4, minimatch@^9.0.5: version "9.0.5" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== @@ -14342,7 +14304,7 @@ path-root@^0.1.1: dependencies: path-root-regex "^0.1.0" -path-scurry@^1.10.1, path-scurry@^1.11.1, path-scurry@^1.6.1: +path-scurry@^1.11.1, path-scurry@^1.6.1: version "1.11.1" resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.11.1.tgz#7960a668888594a0720b12a911d1a742ab9f11d2" integrity sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA== @@ -15042,15 +15004,14 @@ rc@1.2.8: minimist "^1.2.0" strip-json-comments "~2.0.1" -react-dom@^18: - version "18.2.0" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d" - integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g== +react-dom@^19: + version "19.1.0" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-19.1.0.tgz#133558deca37fa1d682708df8904b25186793623" + integrity sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g== dependencies: - loose-envify "^1.1.0" - scheduler "^0.23.0" + scheduler "^0.26.0" -react-is@^16.13.1, react-is@^16.7.0: +react-is@^16.13.1: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== @@ -15067,24 +15028,18 @@ react-native-fetch-api@^3.0.0: dependencies: p-defer "^3.0.0" -react-redux@^8.1.3: - version "8.1.3" - resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-8.1.3.tgz#4fdc0462d0acb59af29a13c27ffef6f49ab4df46" - integrity sha512-n0ZrutD7DaX/j9VscF+uTALI3oUPa/pO4Z3soOBIjuRn/FzVu6aehhysxZCLi6y7duMf52WNZGMl7CtuK5EnRw== +react-redux@^9: + version "9.2.0" + resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-9.2.0.tgz#96c3ab23fb9a3af2cb4654be4b51c989e32366f5" + integrity sha512-ROY9fvHhwOD9ySfrF0wmvu//bKCQ6AeZZq1nJNtbDC+kk5DuSuNX/n6YWYF/SYy7bSba4D4FSz8DJeKY/S/r+g== dependencies: - "@babel/runtime" "^7.12.1" - "@types/hoist-non-react-statics" "^3.3.1" - "@types/use-sync-external-store" "^0.0.3" - hoist-non-react-statics "^3.3.2" - react-is "^18.0.0" - use-sync-external-store "^1.0.0" + "@types/use-sync-external-store" "^0.0.6" + use-sync-external-store "^1.4.0" -react@^18: - version "18.2.0" - resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" - integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== - dependencies: - loose-envify "^1.1.0" +react@^19: + version "19.1.0" + resolved "https://registry.yarnpkg.com/react/-/react-19.1.0.tgz#926864b6c48da7627f004795d6cce50e90793b75" + integrity sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg== read-cmd-shim@4.0.0, read-cmd-shim@^4.0.0: version "4.0.0" @@ -15286,10 +15241,10 @@ redux-saga@1.0.0: dependencies: "@redux-saga/core" "^1.0.0" -redux-thunk@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.4.2.tgz#b9d05d11994b99f7a91ea223e8b04cf0afa5ef3b" - integrity sha512-+P3TjtnP0k/FEjcBL5FZpoovtvrTNT/UXd4/sluaSyrURlSlhLSzEdfsTBW7WsKB6yPvgd7q/iZPICFjW4o57Q== +redux-thunk@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-3.1.0.tgz#94aa6e04977c30e14e892eae84978c1af6058ff3" + integrity sha512-NW2r5T6ksUKXCabzhL9z+h206HQw/NJkcLm1GPImRQ8IzfXwRGqjVhKJGauHirT0DAuyy6hjdnMZaRoAcy0Klw== redux@^3.7.2: version "3.7.2" @@ -15301,13 +15256,18 @@ redux@^3.7.2: loose-envify "^1.1.0" symbol-observable "^1.0.3" -redux@^4.0.4, redux@^4.2.1: +redux@^4.0.4: version "4.2.1" resolved "https://registry.yarnpkg.com/redux/-/redux-4.2.1.tgz#c08f4306826c49b5e9dc901dee0452ea8fce6197" integrity sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w== dependencies: "@babel/runtime" "^7.9.2" +redux@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/redux/-/redux-5.0.1.tgz#97fa26881ce5746500125585d5642c77b6e9447b" + integrity sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w== + regenerator-runtime@^0.13.11: version "0.13.11" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" @@ -15437,11 +15397,16 @@ reselect-tree@^1.3.7: json-pointer "^0.6.1" reselect "^4.0.0" -reselect@^4.0.0, reselect@^4.1.8: +reselect@^4.0.0: version "4.1.8" resolved "https://registry.yarnpkg.com/reselect/-/reselect-4.1.8.tgz#3f5dc671ea168dccdeb3e141236f69f02eaec524" integrity sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ== +reselect@^5.1.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/reselect/-/reselect-5.1.1.tgz#c766b1eb5d558291e5e550298adb0becc24bb72e" + integrity sha512-K/BG6eIky/SBpzfHZv/dd+9JBFiS4SWV7FIujVyJRux6e45+73RaUHXLmIR1f7WOMaQ0U1km6qwklRQxpJJY0w== + resolve-alpn@^1.0.0, resolve-alpn@^1.2.0: version "1.2.1" resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.2.1.tgz#b7adbdac3546aaaec20b45e7d8265927072726f9" @@ -15681,12 +15646,10 @@ sc-istanbul@^0.4.5: which "^1.1.1" wordwrap "^1.0.0" -scheduler@^0.23.0: - version "0.23.0" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe" - integrity sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw== - dependencies: - loose-envify "^1.1.0" +scheduler@^0.26.0: + version "0.26.0" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.26.0.tgz#4ce8a8c2a2095f13ea11bf9a445be50c555d6337" + integrity sha512-NlHwttCI/l5gCPR3D1nNXtWABUmBwvZpEQiD4IXSbIDq8BzLIK/7Ir5gTFSGZDUu37K5cMNp0hFtzO38sC7gWA== schema-utils@^3.1.1, schema-utils@^3.2.0: version "3.3.0" @@ -16989,11 +16952,6 @@ tmp@^0.2.0, tmp@~0.2.1: dependencies: rimraf "^3.0.0" -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== - to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" @@ -17669,10 +17627,10 @@ urlpattern-polyfill@^9.0.0: resolved "https://registry.yarnpkg.com/urlpattern-polyfill/-/urlpattern-polyfill-9.0.0.tgz#bc7e386bb12fd7898b58d1509df21d3c29ab3460" integrity sha512-WHN8KDQblxd32odxeIgo83rdVDE2bvdkb86it7bMhYZwWKJz0+O0RK/eZiHYnM+zgt/U7hAHOlCQGfjjvSkw2g== -use-sync-external-store@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a" - integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA== +use-sync-external-store@^1.4.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.5.0.tgz#55122e2a3edd2a6c106174c27485e0fd59bcfca0" + integrity sha512-Rb46I4cGGVBmjamjphe8L/UnvJD+uPPtTkNvX5mZgqdbavhI4EbgIWJiIHXJ8bc/i9EQGPRh4DwEURJ552Do0A== utf-8-validate@5.0.7: version "5.0.7" From 278818c63f9d0fbe5dc530a600a66cab8d6cc44e Mon Sep 17 00:00:00 2001 From: Kaspar Kallas Date: Tue, 13 May 2025 10:03:18 +0300 Subject: [PATCH 2/5] fix lodash usage --- packages/sdk-redux/CHANGELOG.md | 4 +--- packages/sdk-redux/package.json | 2 ++ yarn.lock | 25 ++++++++++++++++++++++--- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/packages/sdk-redux/CHANGELOG.md b/packages/sdk-redux/CHANGELOG.md index 94e3ec0397..724c4d41b4 100644 --- a/packages/sdk-redux/CHANGELOG.md +++ b/packages/sdk-redux/CHANGELOG.md @@ -9,12 +9,10 @@ All notable changes to the SDK-redux will be documented in this file. ## [0.7.0] -### Added ### Changed - [BREAKING] update to @reduxjs/toolkit 2 - [BREAKING] leave only ESM support (no CommonJS) - -### Fixed +- use lodash's smaller direct libraries ## [0.6.1] - 2024-08-01 diff --git a/packages/sdk-redux/package.json b/packages/sdk-redux/package.json index f493758c1b..77c146153d 100644 --- a/packages/sdk-redux/package.json +++ b/packages/sdk-redux/package.json @@ -17,6 +17,8 @@ "devDependencies": { "@reduxjs/toolkit": "^2", "@types/promise-retry": "^1.1.6", + "@types/lodash.memoize": "^4.1.7", + "@types/lodash.uniqby": "^4.7.9", "@types/react": "^19", "@types/react-dom": "^19", "react": "^19", diff --git a/yarn.lock b/yarn.lock index abfe283564..a18f06fd2c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4208,6 +4208,25 @@ dependencies: "@types/node" "*" +"@types/lodash.memoize@^4.1.7": + version "4.1.9" + resolved "https://registry.yarnpkg.com/@types/lodash.memoize/-/lodash.memoize-4.1.9.tgz#9f8912d39b6e450c0d342a2b74c99d331bf2016b" + integrity sha512-glY1nQuoqX4Ft8Uk+KfJudOD7DQbbEDF6k9XpGncaohW3RW4eSWBlx6AA0fZCrh40tZcQNH4jS/Oc59J6Eq+aw== + dependencies: + "@types/lodash" "*" + +"@types/lodash.uniqby@^4.7.9": + version "4.7.9" + resolved "https://registry.yarnpkg.com/@types/lodash.uniqby/-/lodash.uniqby-4.7.9.tgz#10bacba9cf3263c6e07ae11d953de6ada6605104" + integrity sha512-rjrXji/seS6BZJRgXrU2h6FqxRVufsbq/HE0Tx0SdgbtlWr2YmD/M64BlYEYYlaMcpZwy32IYVkMfUMYlPuv0w== + dependencies: + "@types/lodash" "*" + +"@types/lodash@*": + version "4.17.16" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.16.tgz#94ae78fab4a38d73086e962d0b65c30d816bfb0a" + integrity sha512-HX7Em5NYQAXKW+1T+FiuG27NGwzJfCX3s1GjOa7ujxZa52kjJLOr4FUxT+giF6Tgxv1e+/czV/iTtBw27WTU9g== + "@types/lodash@^4.17.7": version "4.17.7" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.7.tgz#2f776bcb53adc9e13b2c0dfd493dfcbd7de43612" @@ -4322,9 +4341,9 @@ "@types/node" "*" "@types/retry@*": - version "0.12.2" - resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.2.tgz#ed279a64fa438bb69f2480eda44937912bb7480a" - integrity sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow== + version "0.12.5" + resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.5.tgz#f090ff4bd8d2e5b940ff270ab39fd5ca1834a07e" + integrity sha512-3xSjTp3v03X/lSQLkczaN9UIEwJMoMCA1+Nb5HfbJEQWogdeQIyVtTvxPXDQjZ5zws8rFQfVfRdz03ARihPJgw== "@types/secp256k1@^4.0.1": version "4.0.3" From 891991baa98f632f08b8e86e9ddde29378703337 Mon Sep 17 00:00:00 2001 From: Kaspar Kallas Date: Tue, 13 May 2025 15:58:55 +0300 Subject: [PATCH 3/5] fix build output --- packages/sdk-redux/package.json | 5 ++--- packages/sdk-redux/tsconfig.json | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/sdk-redux/package.json b/packages/sdk-redux/package.json index 77c146153d..7cf4accd15 100644 --- a/packages/sdk-redux/package.json +++ b/packages/sdk-redux/package.json @@ -37,11 +37,10 @@ "homepage": "https://docs.superfluid.finance/", "keywords": [], "license": "MIT", - "main": "dist/main/index.js", "module": "dist/module/index.js", "peerDependencies": { "@reduxjs/toolkit": ">=2", - "@superfluid-finance/sdk-core": ">0.7.0" + "@superfluid-finance/sdk-core": ">=0.7.0" }, "repository": { "type": "git", @@ -64,7 +63,7 @@ "cloc": "sh tasks/cloc.sh" }, "sideEffects": [ - "./src/sdkReduxConfig.ts" + "./dist/module/sdkReduxConfig.js" ], "typings": "dist/module/index.d.ts" } diff --git a/packages/sdk-redux/tsconfig.json b/packages/sdk-redux/tsconfig.json index ed53fea881..9ba5ab3bb8 100644 --- a/packages/sdk-redux/tsconfig.json +++ b/packages/sdk-redux/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "incremental": true, "target": "ESNext", - "outDir": "dist/main", + "outDir": "dist/module", "rootDir": "src", "moduleResolution": "node", "module": "ESNext", From 381484fe8a59b9a460a43428241faf6fde24b35e Mon Sep 17 00:00:00 2001 From: Kaspar Kallas Date: Tue, 13 May 2025 16:49:34 +0300 Subject: [PATCH 4/5] fix ModuleName --- .../sdk-redux/src/reduxSlices/argTypes.ts | 4 +- .../src/reduxSlices/rtkQuery/ModuleName.ts | 3 ++ .../rtkQuery/cacheTags/CacheTagTypes.ts | 2 +- .../invalidateSpecificCacheTagsForEvents.ts | 8 ++-- ...torAddressForNextEventToInvalidateCache.ts | 7 ++-- .../rtkQuery/createApiWithReactHooks.ts | 4 ++ .../rpcApiSlice/endpoints/allRpcEndpoints.ts | 2 +- .../rpcApiSlice/endpoints/flowArgs.ts | 2 +- .../rpcApiSlice/endpoints/flowEndpoints.ts | 6 +-- .../rpcApiSlice/endpoints/indexArgs.ts | 2 +- .../rpcApiSlice/endpoints/indexEndpoints.ts | 4 +- .../rpcApiSlice/endpoints/superTokenArgs.ts | 2 +- .../endpoints/superTokenEndpoints.ts | 12 +++--- .../rtkQuery/rpcApiSlice/rpcApiSlice.ts | 8 ++-- .../rtkQuery/rpcApiSlice/rpcBaseQuery.ts | 4 +- .../rpcApiSlice/rpcEndpointBuilder.ts | 6 +-- .../endpoints/allSubgraphEndpoints.ts | 2 +- .../subgraphApiSlice/endpoints/baseArgs.ts | 4 +- .../endpoints/baseEndpoints.ts | 4 +- .../subgraphApiSlice/endpoints/entityArgs.ts | 30 ++++++------- .../endpoints/entityEndpoints.ts | 42 +++++++++---------- .../subgraphApiSlice/endpoints/eventArgs.ts | 12 +++--- .../endpoints/eventEndpoints.ts | 26 ++++++------ ...eSpecificCacheTagsFromRelevantAddresses.ts | 2 +- .../subgraphApiSlice/subgraphApiSlice.ts | 6 +-- .../subgraphApiSlice/subgraphBaseQuery.ts | 4 +- .../subgraphEndpointBuilder.ts | 6 +-- .../transactionTrackerSlice/ethersError.ts | 2 +- .../registerNewTransaction.ts | 4 +- .../initiateNewTransactionTrackingThunk.ts | 4 +- ...iateOldPendingTransactionsTrackingThunk.ts | 2 +- .../thunks/trackPendingTransactionThunk.ts | 10 ++--- .../trackedTransaction.ts | 2 +- .../transactionTrackerAdapter.ts | 4 +- .../trySerializeTransaction.ts | 4 +- packages/sdk-redux/src/sdkReduxConfig.ts | 10 ++--- .../sdk-redux/src/sdkReduxInitialization.ts | 8 ++-- packages/sdk-redux/src/typings/global.d.ts | 2 +- 38 files changed, 133 insertions(+), 133 deletions(-) create mode 100644 packages/sdk-redux/src/reduxSlices/rtkQuery/ModuleName.ts diff --git a/packages/sdk-redux/src/reduxSlices/argTypes.ts b/packages/sdk-redux/src/reduxSlices/argTypes.ts index d829ddbcca..70c4a832d0 100644 --- a/packages/sdk-redux/src/reduxSlices/argTypes.ts +++ b/packages/sdk-redux/src/reduxSlices/argTypes.ts @@ -1,5 +1,5 @@ -import {ISuperTokenModifyFlowParams} from '@superfluid-finance/sdk-core'; -import {Signer} from 'ethers'; +import {type ISuperTokenModifyFlowParams} from '@superfluid-finance/sdk-core'; +import {type Signer} from 'ethers'; import {mutationOverridesKey, mutationSignerKey} from '../utils'; diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/ModuleName.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/ModuleName.ts new file mode 100644 index 0000000000..37a7319d4d --- /dev/null +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/ModuleName.ts @@ -0,0 +1,3 @@ +import {ApiModules} from '@reduxjs/toolkit/query'; + +export type ModuleName = keyof ApiModules; diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/cacheTags/CacheTagTypes.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/cacheTags/CacheTagTypes.ts index f600d05435..7c6f978ce0 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/cacheTags/CacheTagTypes.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/cacheTags/CacheTagTypes.ts @@ -1,5 +1,5 @@ import {insertIf, typeGuard} from '../../../utils'; -import {NothingString} from '../../argTypes'; +import {type NothingString} from '../../argTypes'; /** * Cache tag types for queries. Read more about caching from RTK-Query documentation: https://redux-toolkit.js.org/rtk-query/usage/automated-refetching#cache-tags diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/cacheTags/invalidateSpecificCacheTagsForEvents.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/cacheTags/invalidateSpecificCacheTagsForEvents.ts index b6bfcd6406..9e0d962007 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/cacheTags/invalidateSpecificCacheTagsForEvents.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/cacheTags/invalidateSpecificCacheTagsForEvents.ts @@ -1,6 +1,6 @@ -import {AnyAction, ThunkDispatch} from '@reduxjs/toolkit'; -import {AllEvents} from '@superfluid-finance/sdk-core'; -import {uniqBy} from 'lodash'; +import {type ThunkDispatch, type UnknownAction} from '@reduxjs/toolkit'; +import {type AllEvents} from '@superfluid-finance/sdk-core'; +import uniqBy from 'lodash.uniqBy'; import {getRpcApiSlice, getSubgraphApiSlice} from '../../../sdkReduxConfig'; @@ -21,7 +21,7 @@ export const getSpecificCacheTagsToInvalidateForEvents = (chainId: number, event export const invalidateSpecificCacheTagsForEvents = ( chainId: number, events: AllEvents[], - dispatch: ThunkDispatch + dispatch: ThunkDispatch ) => { const tagsToInvalidate = getSpecificCacheTagsToInvalidateForEvents(chainId, events); diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/cacheTags/monitorAddressForNextEventToInvalidateCache.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/cacheTags/monitorAddressForNextEventToInvalidateCache.ts index 3ec784337d..8c11a2fcd2 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/cacheTags/monitorAddressForNextEventToInvalidateCache.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/cacheTags/monitorAddressForNextEventToInvalidateCache.ts @@ -1,9 +1,8 @@ -import {AnyAction} from '@reduxjs/toolkit'; -import {ThunkDispatch} from '@reduxjs/toolkit'; +import {type ThunkDispatch, type UnknownAction} from '@reduxjs/toolkit'; import {getFramework} from '../../../sdkReduxConfig'; import {MillisecondTimes} from '../../../utils'; -import {TransactionInfo} from '../../argTypes'; +import {type TransactionInfo} from '../../argTypes'; import {invalidateSpecificCacheTagsForEvents} from './invalidateSpecificCacheTagsForEvents'; @@ -16,7 +15,7 @@ import {invalidateSpecificCacheTagsForEvents} from './invalidateSpecificCacheTag export const monitorAddressForNextEventToInvalidateCache = async ( address: string, transactionInfo: TransactionInfo, - dispatch: ThunkDispatch + dispatch: ThunkDispatch ) => { const framework = await getFramework(transactionInfo.chainId); framework.query.on( diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/createApiWithReactHooks.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/createApiWithReactHooks.ts index f74787b959..03872a0b17 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/createApiWithReactHooks.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/createApiWithReactHooks.ts @@ -1,8 +1,12 @@ import {createApi} from '@reduxjs/toolkit/query/react'; +import {initializeRpcApiSlice} from '../../sdkReduxInitialization'; + /** * For creating RTK-Query API (e.g. "sfApi") with auto-generated React Hooks. * * Read more: https://redux-toolkit.js.org/rtk-query/api/created-api/hooks */ export const createApiWithReactHooks = createApi; + +initializeRpcApiSlice((options) => createApi(options)); diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/allRpcEndpoints.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/allRpcEndpoints.ts index cec32e49b7..231b8e2244 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/allRpcEndpoints.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/allRpcEndpoints.ts @@ -1,4 +1,4 @@ -import {RpcEndpointBuilder} from '../rpcEndpointBuilder'; +import {type RpcEndpointBuilder} from '../rpcEndpointBuilder'; import {createFlowEndpoints} from './flowEndpoints'; import {createIndexEndpoints} from './indexEndpoints'; diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/flowArgs.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/flowArgs.ts index 9dcf6c1a49..0f0eeec666 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/flowArgs.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/flowArgs.ts @@ -1,4 +1,4 @@ -import {BaseSuperTokenMutation, NothingString} from '../../../argTypes'; +import {type BaseSuperTokenMutation, type NothingString} from '../../../argTypes'; /** * Create a flow of the token of this class. diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/flowEndpoints.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/flowEndpoints.ts index 6df2bebb54..eb29a19c34 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/flowEndpoints.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/flowEndpoints.ts @@ -1,9 +1,9 @@ import {getFramework} from '../../../../sdkReduxConfig'; -import {TransactionInfo} from '../../../argTypes'; +import {type TransactionInfo} from '../../../argTypes'; import {registerNewTransactionAndReturnQueryFnResult} from '../../../transactionTrackerSlice/registerNewTransaction'; -import {RpcEndpointBuilder} from '../rpcEndpointBuilder'; +import {type RpcEndpointBuilder} from '../rpcEndpointBuilder'; -import {FlowCreateMutation, FlowDeleteMutation, FlowUpdateMutation} from './flowArgs'; +import {type FlowCreateMutation, type FlowDeleteMutation, type FlowUpdateMutation} from './flowArgs'; export const createFlowEndpoints = (builder: RpcEndpointBuilder) => ({ flowCreate: builder.mutation({ diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/indexArgs.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/indexArgs.ts index 9e134d17f0..397489c7ed 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/indexArgs.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/indexArgs.ts @@ -1,4 +1,4 @@ -import {BaseSuperTokenMutation, NothingString} from '../../../argTypes'; +import {type BaseSuperTokenMutation, type NothingString} from '../../../argTypes'; /** * Creates an IDA Index. diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/indexEndpoints.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/indexEndpoints.ts index 7a2247c566..ab9f315550 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/indexEndpoints.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/indexEndpoints.ts @@ -1,7 +1,7 @@ import {getFramework} from '../../../../sdkReduxConfig'; -import {TransactionInfo} from '../../../argTypes'; +import {type TransactionInfo} from '../../../argTypes'; import {registerNewTransactionAndReturnQueryFnResult} from '../../../transactionTrackerSlice/registerNewTransaction'; -import {RpcEndpointBuilder} from '../rpcEndpointBuilder'; +import {type RpcEndpointBuilder} from '../rpcEndpointBuilder'; import { IndexCreateMutation, diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/superTokenArgs.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/superTokenArgs.ts index 3b5e78473d..39d5624e99 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/superTokenArgs.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/superTokenArgs.ts @@ -1,4 +1,4 @@ -import {BaseQuery, BaseSuperTokenMutation} from '../../../argTypes'; +import {type BaseQuery, type BaseSuperTokenMutation} from '../../../argTypes'; /** * Downgrade `amount` SuperToken's. diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/superTokenEndpoints.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/superTokenEndpoints.ts index 34ef4c646b..0708e6f189 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/superTokenEndpoints.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/superTokenEndpoints.ts @@ -1,16 +1,16 @@ import {NativeAssetSuperToken, WrapperSuperToken} from '@superfluid-finance/sdk-core'; import {getFramework} from '../../../../sdkReduxConfig'; -import {TransactionInfo} from '../../../argTypes'; +import {type TransactionInfo} from '../../../argTypes'; import {registerNewTransactionAndReturnQueryFnResult} from '../../../transactionTrackerSlice/registerNewTransaction'; import {createGeneralTags, createSpecificTags} from '../../cacheTags/CacheTagTypes'; -import {RpcEndpointBuilder} from '../rpcEndpointBuilder'; +import {type RpcEndpointBuilder} from '../rpcEndpointBuilder'; import { - SuperTokenDowngradeMutation, - SuperTokenTransferMutation, - SuperTokenUpgradeAllowanceQuery, - SuperTokenUpgradeMutation, + type SuperTokenDowngradeMutation, + type SuperTokenTransferMutation, + type SuperTokenUpgradeAllowanceQuery, + type SuperTokenUpgradeMutation, } from './superTokenArgs'; export const createSuperTokenEndpoints = (builder: RpcEndpointBuilder) => ({ diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/rpcApiSlice.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/rpcApiSlice.ts index ef94701d4d..2784204ce1 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/rpcApiSlice.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/rpcApiSlice.ts @@ -1,15 +1,13 @@ import {type CreateApi} from '@reduxjs/toolkit/query'; -import {coreModuleName} from '@reduxjs/toolkit/query'; import {typeGuard} from '../../../utils'; +import {type ModuleName} from '../ModuleName'; import {cacheTagTypes} from '../cacheTags/CacheTagTypes'; import {getSerializeQueryArgs} from '../getSerializeQueryArgs'; import {rpcBaseQuery} from './rpcBaseQuery'; -import {RpcEndpointBuilder} from './rpcEndpointBuilder'; -import {RpcReducerPath} from './rpcReducerPath'; - -type ModuleName = typeof coreModuleName; +import {type RpcEndpointBuilder} from './rpcEndpointBuilder'; +import {type RpcReducerPath} from './rpcReducerPath'; export const createRpcApiSlice = (createRtkQueryApi: CreateApi) => createRtkQueryApi({ diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/rpcBaseQuery.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/rpcBaseQuery.ts index 7304eb4b1e..0e98481ef2 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/rpcBaseQuery.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/rpcBaseQuery.ts @@ -1,5 +1,5 @@ -import {SerializedError} from '@reduxjs/toolkit'; -import {BaseQueryFn} from '@reduxjs/toolkit/dist/query'; +import {type SerializedError} from '@reduxjs/toolkit'; +import {type BaseQueryFn} from '@reduxjs/toolkit/query'; export const rpcBaseQuery = (): BaseQueryFn> => () => { throw new Error('All queries & mutations must use the `queryFn` definition syntax.'); diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/rpcEndpointBuilder.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/rpcEndpointBuilder.ts index 97981a10a6..8db8984264 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/rpcEndpointBuilder.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/rpcApiSlice/rpcEndpointBuilder.ts @@ -1,8 +1,8 @@ import {type EndpointBuilder} from '@reduxjs/toolkit/query'; -import {CacheTagType} from '../cacheTags/CacheTagTypes'; +import {type CacheTagType} from '../cacheTags/CacheTagTypes'; -import {RpcBaseQuery} from './rpcBaseQuery'; -import {RpcReducerPath} from './rpcReducerPath'; +import {type RpcBaseQuery} from './rpcBaseQuery'; +import {type RpcReducerPath} from './rpcReducerPath'; export type RpcEndpointBuilder = EndpointBuilder; diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/allSubgraphEndpoints.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/allSubgraphEndpoints.ts index c6d330b36c..738928fb26 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/allSubgraphEndpoints.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/allSubgraphEndpoints.ts @@ -1,4 +1,4 @@ -import {SubgraphEndpointBuilder} from '../subgraphEndpointBuilder'; +import {type SubgraphEndpointBuilder} from '../subgraphEndpointBuilder'; import {createBaseEndpoints} from './baseEndpoints'; import {createEntityEndpoints} from './entityEndpoints'; diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/baseArgs.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/baseArgs.ts index 75e6389b40..24879c51cd 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/baseArgs.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/baseArgs.ts @@ -1,6 +1,6 @@ -import {DocumentNode} from 'graphql'; +import {type DocumentNode} from 'graphql'; -import {BaseQuery, NothingString} from '../../../argTypes'; +import {type BaseQuery, type NothingString} from '../../../argTypes'; export interface CustomSubgraphQuery extends BaseQuery { document: string | DocumentNode; diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/baseEndpoints.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/baseEndpoints.ts index dad66e3e49..e0471100a8 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/baseEndpoints.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/baseEndpoints.ts @@ -2,9 +2,9 @@ import {getFramework, getSubgraphClient} from '../../../../sdkReduxConfig'; import {MillisecondTimes} from '../../../../utils'; import {invalidateSpecificCacheTagsForEvents} from '../../cacheTags/invalidateSpecificCacheTagsForEvents'; import {CacheTime} from '../../cacheTime'; -import {SubgraphEndpointBuilder} from '../subgraphEndpointBuilder'; +import {type SubgraphEndpointBuilder} from '../subgraphEndpointBuilder'; -import {CustomSubgraphQuery, MonitorForEventsToInvalidateCacheMutation} from './baseArgs'; +import {type CustomSubgraphQuery, type MonitorForEventsToInvalidateCacheMutation} from './baseArgs'; export const createBaseEndpoints = (builder: SubgraphEndpointBuilder) => ({ custom: builder.query({ diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/entityArgs.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/entityArgs.ts index b351e97114..7026f523d2 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/entityArgs.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/entityArgs.ts @@ -1,19 +1,19 @@ import { - AccountListQuery, - AccountTokenSnapshotListQuery, - AccountTokenSnapshotLogListQuery, - FlowOperatorListQuery, - IndexListQuery, - IndexSubscriptionsListQuery, - PoolDistributorsListQuery, - PoolListQuery, - PoolMembersListQuery, - StreamListQuery, - StreamPeriodListQuery, - SubgraphGetQuery, - TokenListQuery, - TokenStatisticListQuery, - TokenStatisticLogListQuery, + type AccountListQuery, + type AccountTokenSnapshotListQuery, + type AccountTokenSnapshotLogListQuery, + type FlowOperatorListQuery, + type IndexListQuery, + type IndexSubscriptionsListQuery, + type PoolDistributorsListQuery, + type PoolListQuery, + type PoolMembersListQuery, + type StreamListQuery, + type StreamPeriodListQuery, + type SubgraphGetQuery, + type TokenListQuery, + type TokenStatisticListQuery, + type TokenStatisticLogListQuery, } from '@superfluid-finance/sdk-core'; export interface AccountTokenSnapshotQuery extends SubgraphGetQuery { diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/entityEndpoints.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/entityEndpoints.ts index 666a254e84..ddda7ab788 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/entityEndpoints.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/entityEndpoints.ts @@ -1,38 +1,38 @@ import { - Account, + type Account, AccountQueryHandler, - AccountTokenSnapshot, - AccountTokenSnapshotLog, + type AccountTokenSnapshot, + type AccountTokenSnapshotLog, AccountTokenSnapshotLogQueryHandler, AccountTokenSnapshotQueryHandler, - FlowOperator, + type FlowOperator, FlowOperatorQueryHandler, - ILightEntity, - Index, + type ILightEntity, + type Index, IndexQueryHandler, - IndexSubscription, + type IndexSubscription, IndexSubscriptionQueryHandler, - PagedResult, - Pool, - PoolDistributor, + type PagedResult, + type Pool, + type PoolDistributor, PoolDistributorQueryHandler, - PoolMember, + type PoolMember, PoolMemberQueryHandler, PoolQueryHandler, - RelevantAddressProviderFromFilter, - RelevantAddressProviderFromResult, - Stream, - StreamPeriod, + type RelevantAddressProviderFromFilter, + type RelevantAddressProviderFromResult, + type Stream, + type StreamPeriod, StreamPeriodQueryHandler, StreamQueryHandler, - SubgraphGetQuery, + type SubgraphGetQuery, SubgraphGetQueryHandler, - SubgraphListQuery, + type SubgraphListQuery, SubgraphListQueryHandler, - Token, + type Token, TokenQueryHandler, - TokenStatistic, - TokenStatisticLog, + type TokenStatistic, + type TokenStatisticLog, TokenStatisticLogQueryHandler, TokenStatisticQueryHandler, } from '@superfluid-finance/sdk-core'; @@ -41,7 +41,7 @@ import {getSubgraphClient} from '../../../../sdkReduxConfig'; import {createGeneralTags} from '../../cacheTags/CacheTagTypes'; import {CacheTime} from '../../cacheTime'; import {provideSpecificCacheTagsFromRelevantAddresses} from '../provideSpecificCacheTagsFromRelevantAddresses'; -import {SubgraphEndpointBuilder} from '../subgraphEndpointBuilder'; +import {type SubgraphEndpointBuilder} from '../subgraphEndpointBuilder'; import { AccountQuery, diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/eventArgs.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/eventArgs.ts index c0c9b74a72..d20b4c864c 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/eventArgs.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/eventArgs.ts @@ -1,10 +1,10 @@ import { - EventListQuery, - FlowUpdatedEventListQuery, - IndexUpdatedEventListQuery, - SubgraphGetQuery, - SubscriptionUnitsUpdatedEventListQuery, - TransferEventListQuery, + type EventListQuery, + type FlowUpdatedEventListQuery, + type IndexUpdatedEventListQuery, + type SubgraphGetQuery, + type SubscriptionUnitsUpdatedEventListQuery, + type TransferEventListQuery, } from '@superfluid-finance/sdk-core'; export interface EventQuery extends SubgraphGetQuery { diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/eventEndpoints.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/eventEndpoints.ts index 62eded110f..59a9193581 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/eventEndpoints.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/eventEndpoints.ts @@ -1,21 +1,21 @@ import { - AllEvents, + type AllEvents, EventQueryHandler, - FlowUpdatedEvent, + type FlowUpdatedEvent, FlowUpdatedEventQueryHandler, - ILightEntity, - IndexUpdatedEvent, + type ILightEntity, + type IndexUpdatedEvent, IndexUpdatedEventQueryHandler, - PagedResult, - RelevantAddressProviderFromFilter, - RelevantAddressProviderFromResult, - SubgraphGetQuery, + type PagedResult, + type RelevantAddressProviderFromFilter, + type RelevantAddressProviderFromResult, + type SubgraphGetQuery, SubgraphGetQueryHandler, - SubgraphListQuery, + type SubgraphListQuery, SubgraphListQueryHandler, - SubscriptionUnitsUpdatedEvent, + type SubscriptionUnitsUpdatedEvent, SubscriptionUnitsUpdatedEventQueryHandler, - TransferEvent, + type TransferEvent, TransferEventQueryHandler, } from '@superfluid-finance/sdk-core'; @@ -23,9 +23,9 @@ import {getSubgraphClient} from '../../../../sdkReduxConfig'; import {createGeneralTags} from '../../cacheTags/CacheTagTypes'; import {CacheTime} from '../../cacheTime'; import {provideSpecificCacheTagsFromRelevantAddresses} from '../provideSpecificCacheTagsFromRelevantAddresses'; -import {SubgraphEndpointBuilder} from '../subgraphEndpointBuilder'; +import {type SubgraphEndpointBuilder} from '../subgraphEndpointBuilder'; -import { +import type { EventQuery, EventsQuery, FlowUpdatedEventQuery, diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/provideSpecificCacheTagsFromRelevantAddresses.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/provideSpecificCacheTagsFromRelevantAddresses.ts index 5894224b67..eed3d11c0c 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/provideSpecificCacheTagsFromRelevantAddresses.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/provideSpecificCacheTagsFromRelevantAddresses.ts @@ -1,4 +1,4 @@ -import {RelevantAddresses} from '@superfluid-finance/sdk-core'; +import {type RelevantAddresses} from '@superfluid-finance/sdk-core'; import {createMostSpecificTag} from '../cacheTags/CacheTagTypes'; diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/subgraphApiSlice.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/subgraphApiSlice.ts index 6906e5ea79..9f397262d0 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/subgraphApiSlice.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/subgraphApiSlice.ts @@ -1,16 +1,14 @@ import {type CreateApi} from '@reduxjs/toolkit/query'; -import {coreModuleName} from '@reduxjs/toolkit/query'; import {typeGuard} from '../../../utils'; +import {type ModuleName} from '../ModuleName'; import {cacheTagTypes} from '../cacheTags/CacheTagTypes'; import {CacheTime} from '../cacheTime'; import {getSerializeQueryArgs} from '../getSerializeQueryArgs'; -type ModuleName = typeof coreModuleName; - import {subgraphBaseQuery} from './subgraphBaseQuery'; import {SubgraphEndpointBuilder} from './subgraphEndpointBuilder'; -import {SubgraphReducerPath} from './subgraphReducerPath'; +import {type SubgraphReducerPath} from './subgraphReducerPath'; export const createSubgraphApiSlice = (createRtkQueryApi: CreateApi) => createRtkQueryApi({ diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/subgraphBaseQuery.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/subgraphBaseQuery.ts index 7adea0e395..dfc49ac2a3 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/subgraphBaseQuery.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/subgraphBaseQuery.ts @@ -1,5 +1,5 @@ -import {SerializedError} from '@reduxjs/toolkit'; -import {BaseQueryFn} from '@reduxjs/toolkit/dist/query'; +import {type SerializedError} from '@reduxjs/toolkit'; +import {type BaseQueryFn} from '@reduxjs/toolkit/query'; export const subgraphBaseQuery = (): BaseQueryFn> => () => { throw new Error('All queries & mutations must use the `queryFn` definition syntax.'); diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/subgraphEndpointBuilder.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/subgraphEndpointBuilder.ts index c470db86c9..fff84500a1 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/subgraphEndpointBuilder.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/subgraphEndpointBuilder.ts @@ -1,8 +1,8 @@ import {type EndpointBuilder} from '@reduxjs/toolkit/query'; -import {CacheTagType} from '../cacheTags/CacheTagTypes'; +import {type CacheTagType} from '../cacheTags/CacheTagTypes'; -import {SubgraphBaseQuery} from './subgraphBaseQuery'; -import {SubgraphReducerPath} from './subgraphReducerPath'; +import {type SubgraphBaseQuery} from './subgraphBaseQuery'; +import {type SubgraphReducerPath} from './subgraphReducerPath'; export type SubgraphEndpointBuilder = EndpointBuilder; diff --git a/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/ethersError.ts b/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/ethersError.ts index a076829cfc..2681f0798d 100644 --- a/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/ethersError.ts +++ b/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/ethersError.ts @@ -1,6 +1,6 @@ import {ethers} from 'ethers'; -import {NewTransactionResponse} from './registerNewTransaction'; +import {type NewTransactionResponse} from './registerNewTransaction'; export type EthersError = Error & { code: ethers.errors; diff --git a/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/registerNewTransaction.ts b/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/registerNewTransaction.ts index ad70941304..ecc17bceaf 100644 --- a/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/registerNewTransaction.ts +++ b/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/registerNewTransaction.ts @@ -1,8 +1,8 @@ -import {ThunkDispatch} from '@reduxjs/toolkit'; +import {type ThunkDispatch} from '@reduxjs/toolkit'; import {providers} from 'ethers'; import {initiateNewTransactionTrackingThunk} from './thunks/initiateNewTransactionTrackingThunk'; -import {TransactionTitle} from './transactionTitle'; +import {type TransactionTitle} from './transactionTitle'; /** * A simpler TransactionResponse type, similar to wagmi's SendTransactionResult, diff --git a/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/thunks/initiateNewTransactionTrackingThunk.ts b/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/thunks/initiateNewTransactionTrackingThunk.ts index 317e24a031..92eb8fff84 100644 --- a/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/thunks/initiateNewTransactionTrackingThunk.ts +++ b/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/thunks/initiateNewTransactionTrackingThunk.ts @@ -2,8 +2,8 @@ import {createAsyncThunk} from '@reduxjs/toolkit'; import {ethers} from 'ethers'; import {getTransactionTrackerSlice} from '../../../sdkReduxConfig'; -import {NewTransactionResponse} from '../registerNewTransaction'; -import {TransactionTitle} from '../transactionTitle'; +import {type NewTransactionResponse} from '../registerNewTransaction'; +import {type TransactionTitle} from '../transactionTitle'; import {transactionTrackerSlicePrefix} from '../transactionTrackerSlice'; import {trySerializeTransaction} from '../trySerializeTransaction'; diff --git a/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/thunks/initiateOldPendingTransactionsTrackingThunk.ts b/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/thunks/initiateOldPendingTransactionsTrackingThunk.ts index b25189bb2f..638a6e175e 100644 --- a/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/thunks/initiateOldPendingTransactionsTrackingThunk.ts +++ b/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/thunks/initiateOldPendingTransactionsTrackingThunk.ts @@ -2,7 +2,7 @@ import {createAsyncThunk} from '@reduxjs/toolkit'; import {ethers} from 'ethers'; import {transactionTrackerSelectors} from '../transactionTrackerAdapter'; -import {TransactionTrackerReducer, transactionTrackerSlicePrefix} from '../transactionTrackerSlice'; +import {type TransactionTrackerReducer, transactionTrackerSlicePrefix} from '../transactionTrackerSlice'; import {trackPendingTransactionThunk} from './trackPendingTransactionThunk'; diff --git a/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/thunks/trackPendingTransactionThunk.ts b/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/thunks/trackPendingTransactionThunk.ts index e30d8b4c2a..516e9c64c4 100644 --- a/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/thunks/trackPendingTransactionThunk.ts +++ b/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/thunks/trackPendingTransactionThunk.ts @@ -1,18 +1,18 @@ // Having a single "track" action makes it easy to use transaction tracking logic. import {ErrorCode} from '@ethersproject/logger'; -import {createAsyncThunk, Dispatch} from '@reduxjs/toolkit'; +import {createAsyncThunk, type Dispatch} from '@reduxjs/toolkit'; import {EventQueryHandler} from '@superfluid-finance/sdk-core'; import {ethers, logger} from 'ethers'; import promiseRetry from 'promise-retry'; import {getFramework, getRpcApiSlice, getSubgraphApiSlice, getTransactionTrackerSlice} from '../../../sdkReduxConfig'; import {MillisecondTimes} from '../../../utils'; -import {TransactionInfo} from '../../argTypes'; +import {type TransactionInfo} from '../../argTypes'; import {createGeneralTags} from '../../rtkQuery/cacheTags/CacheTagTypes'; -import {EthersError} from '../ethersError'; -import {NewTransactionResponse} from '../registerNewTransaction'; +import {type EthersError} from '../ethersError'; +import {type NewTransactionResponse} from '../registerNewTransaction'; import {transactionTrackerSelectors} from '../transactionTrackerAdapter'; -import {TransactionTrackerReducer, transactionTrackerSlicePrefix} from '../transactionTrackerSlice'; +import {type TransactionTrackerReducer, transactionTrackerSlicePrefix} from '../transactionTrackerSlice'; import {trySerializeTransaction} from '../trySerializeTransaction'; import {initiateNewTransactionTrackingThunk} from './initiateNewTransactionTrackingThunk'; diff --git a/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/trackedTransaction.ts b/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/trackedTransaction.ts index c9411e4e37..cc228956e4 100644 --- a/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/trackedTransaction.ts +++ b/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/trackedTransaction.ts @@ -1,6 +1,6 @@ import {ethers} from 'ethers'; -import {TransactionTitle} from './transactionTitle'; +import {type TransactionTitle} from './transactionTitle'; export type TransactionStatus = 'Pending' | 'Succeeded' | 'Failed' | 'Replaced' | 'Unknown'; diff --git a/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/transactionTrackerAdapter.ts b/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/transactionTrackerAdapter.ts index c33fe64a8c..4e37a17c7e 100644 --- a/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/transactionTrackerAdapter.ts +++ b/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/transactionTrackerAdapter.ts @@ -1,7 +1,7 @@ import {createEntityAdapter} from '@reduxjs/toolkit'; -import {TrackedTransaction} from './trackedTransaction'; -import {TransactionTrackerReducer, transactionTrackerSlicePrefix} from './transactionTrackerSlice'; +import {type TrackedTransaction} from './trackedTransaction'; +import {type TransactionTrackerReducer, transactionTrackerSlicePrefix} from './transactionTrackerSlice'; export const transactionTrackerAdapter = createEntityAdapter({ sortComparer: (a) => a.timestampMs, diff --git a/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/trySerializeTransaction.ts b/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/trySerializeTransaction.ts index a4d9905d80..9bed8954cc 100644 --- a/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/trySerializeTransaction.ts +++ b/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/trySerializeTransaction.ts @@ -1,5 +1,5 @@ -import {SignatureLike} from '@ethersproject/bytes'; -import {ethers, Transaction} from 'ethers'; +import {type SignatureLike} from '@ethersproject/bytes'; +import {ethers, type Transaction} from 'ethers'; /** * The use-case arose from Gnosis Safe transaction serialization failing. diff --git a/packages/sdk-redux/src/sdkReduxConfig.ts b/packages/sdk-redux/src/sdkReduxConfig.ts index e5b12b0461..1d303e3cc3 100644 --- a/packages/sdk-redux/src/sdkReduxConfig.ts +++ b/packages/sdk-redux/src/sdkReduxConfig.ts @@ -1,12 +1,12 @@ -import {Framework} from '@superfluid-finance/sdk-core'; -import {Signer} from 'ethers'; +import {type Framework} from '@superfluid-finance/sdk-core'; +import {type Signer} from 'ethers'; import {memoize} from 'lodash'; // NOTE: This file is marked for side-effects inside the package.json for efficient tree-shaking. -import {RpcApiSliceEmpty} from './reduxSlices/rtkQuery/rpcApiSlice/rpcApiSlice'; -import {SubgraphApiSliceEmpty} from './reduxSlices/rtkQuery/subgraphApiSlice/subgraphApiSlice'; -import {TransactionTrackerSlice} from './reduxSlices/transactionTrackerSlice/transactionTrackerSlice'; +import {type RpcApiSliceEmpty} from './reduxSlices/rtkQuery/rpcApiSlice/rpcApiSlice'; +import {type SubgraphApiSliceEmpty} from './reduxSlices/rtkQuery/subgraphApiSlice/subgraphApiSlice'; +import {type TransactionTrackerSlice} from './reduxSlices/transactionTrackerSlice/transactionTrackerSlice'; interface FrameworkLocator { getFramework: (chainId: number) => Promise; diff --git a/packages/sdk-redux/src/sdkReduxInitialization.ts b/packages/sdk-redux/src/sdkReduxInitialization.ts index aacfe1a8f3..35e3d8062f 100644 --- a/packages/sdk-redux/src/sdkReduxInitialization.ts +++ b/packages/sdk-redux/src/sdkReduxInitialization.ts @@ -1,14 +1,12 @@ -import {CreateApi} from '@reduxjs/toolkit/query'; -import {coreModuleName} from '@reduxjs/toolkit/query'; -import {Framework} from '@superfluid-finance/sdk-core'; +import {type CreateApi} from '@reduxjs/toolkit/query'; +import {type Framework} from '@superfluid-finance/sdk-core'; +import {type ModuleName} from './reduxSlices/rtkQuery/ModuleName'; import {createRpcApiSlice} from './reduxSlices/rtkQuery/rpcApiSlice/rpcApiSlice'; import {createSubgraphApiSlice} from './reduxSlices/rtkQuery/subgraphApiSlice/subgraphApiSlice'; import {createTransactionTrackerSlice} from './reduxSlices/transactionTrackerSlice/transactionTrackerSlice'; import {getConfig} from './sdkReduxConfig'; -type ModuleName = typeof coreModuleName; - /** * For initializing "rpcApiSlice" Redux slice. * diff --git a/packages/sdk-redux/src/typings/global.d.ts b/packages/sdk-redux/src/typings/global.d.ts index bd1f84a38f..374e9c2abe 100644 --- a/packages/sdk-redux/src/typings/global.d.ts +++ b/packages/sdk-redux/src/typings/global.d.ts @@ -1,4 +1,4 @@ -import SdkReduxConfig from '../sdkReduxConfig'; +import { type SdkReduxConfig } from '../sdkReduxConfig'; // Solution inspired by: https://stackoverflow.com/a/69429093 declare global { From 4f75a75c7e51ef0f4572882d936e67c8c27a6f0d Mon Sep 17 00:00:00 2001 From: Kaspar Kallas Date: Tue, 13 May 2025 16:56:57 +0300 Subject: [PATCH 5/5] fix typo --- .../rtkQuery/cacheTags/invalidateSpecificCacheTagsForEvents.ts | 2 +- packages/sdk-redux/src/sdkReduxConfig.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/cacheTags/invalidateSpecificCacheTagsForEvents.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/cacheTags/invalidateSpecificCacheTagsForEvents.ts index 9e0d962007..fcb5f0f02c 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/cacheTags/invalidateSpecificCacheTagsForEvents.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/cacheTags/invalidateSpecificCacheTagsForEvents.ts @@ -1,6 +1,6 @@ import {type ThunkDispatch, type UnknownAction} from '@reduxjs/toolkit'; import {type AllEvents} from '@superfluid-finance/sdk-core'; -import uniqBy from 'lodash.uniqBy'; +import uniqBy from 'lodash.uniqby'; import {getRpcApiSlice, getSubgraphApiSlice} from '../../../sdkReduxConfig'; diff --git a/packages/sdk-redux/src/sdkReduxConfig.ts b/packages/sdk-redux/src/sdkReduxConfig.ts index 1d303e3cc3..8f1ccb0479 100644 --- a/packages/sdk-redux/src/sdkReduxConfig.ts +++ b/packages/sdk-redux/src/sdkReduxConfig.ts @@ -1,6 +1,6 @@ import {type Framework} from '@superfluid-finance/sdk-core'; import {type Signer} from 'ethers'; -import {memoize} from 'lodash'; +import memoize from 'lodash.memoize'; // NOTE: This file is marked for side-effects inside the package.json for efficient tree-shaking.