From a715ad6a9652e477cd7143493bd5ab3af63dbcfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9lcio=20Franco?= Date: Thu, 25 Jul 2024 18:41:37 -0400 Subject: [PATCH] feat: add an option to send custom gas limit when making transfers (#1318) --- .changeset/young-jokes-dream.md | 7 + fuel-toolchain.toml | 4 +- package.json | 4 +- .../Send/components/SendSelect/SendSelect.tsx | 22 +- .../app/src/systems/Send/hooks/useSend.tsx | 226 +++++++++++------- .../src/systems/Send/machines/sendMachine.ts | 19 +- .../Transaction/components/TxFee/TxFee.tsx | 4 +- .../components/TxFee/TxFeeLoader.tsx | 2 +- .../Transaction/components/TxFee/styles.tsx | 10 +- .../components/TxFeeOptions/TxFeeOptions.tsx | 194 ++++++++------- .../TxFeeOptions/TxFeeOptions.utils.ts | 14 ++ .../Transaction/services/transaction.tsx | 31 ++- pnpm-lock.yaml | 8 +- 13 files changed, 347 insertions(+), 198 deletions(-) create mode 100644 .changeset/young-jokes-dream.md create mode 100644 packages/app/src/systems/Transaction/components/TxFeeOptions/TxFeeOptions.utils.ts diff --git a/.changeset/young-jokes-dream.md b/.changeset/young-jokes-dream.md new file mode 100644 index 0000000000..7b5d066836 --- /dev/null +++ b/.changeset/young-jokes-dream.md @@ -0,0 +1,7 @@ +--- +"@fuel-wallet/connections": minor +"@fuel-wallet/types": minor +"fuels-wallet": minor +--- + +Add `Gas Limit` input to customize transaction fees when sending a transfer diff --git a/fuel-toolchain.toml b/fuel-toolchain.toml index f823679cee..17bf446977 100644 --- a/fuel-toolchain.toml +++ b/fuel-toolchain.toml @@ -2,5 +2,5 @@ channel = "latest-2023-11-30" [components] -fuel-core = "0.24.3" -forc = "0.56.0" +fuel-core = "0.26.0" +forc = "0.59.0" diff --git a/package.json b/package.json index 9e0b85fff6..684183a981 100644 --- a/package.json +++ b/package.json @@ -115,7 +115,9 @@ "@adobe/css-tools@<4.3.2": ">=4.3.2", "@babel/traverse@<7.23.2": ">=7.23.2", "braces@<3.0.3": ">=3.0.3", - "ws": "8.17.1" + "ws@>=8.0.0 <8.17.1": ">=8.17.1", + "ws@>=7.0.0 <7.5.10": ">=7.5.10", + "ws@>=6.0.0 <6.2.3": ">=6.2.3" } } } diff --git a/packages/app/src/systems/Send/components/SendSelect/SendSelect.tsx b/packages/app/src/systems/Send/components/SendSelect/SendSelect.tsx index d3b1a0a4bf..0f369e0c30 100644 --- a/packages/app/src/systems/Send/components/SendSelect/SendSelect.tsx +++ b/packages/app/src/systems/Send/components/SendSelect/SendSelect.tsx @@ -1,12 +1,13 @@ import { cssObj } from '@fuel-ui/css'; import { Box, Form, Input, Text } from '@fuel-ui/react'; -import { motion } from 'framer-motion'; +import { AnimatePresence, motion } from 'framer-motion'; import { type BN, DECIMAL_FUEL, bn } from 'fuels'; import { useEffect, useMemo, useRef, useState } from 'react'; import { AssetSelect } from '~/systems/Asset'; import { ControlledField, Layout, + MotionFlex, MotionStack, animations, } from '~/systems/Core'; @@ -25,7 +26,7 @@ export function SendSelect({ balanceAssets, balanceAssetSelected, baseFee = bn(0), - baseGasLimit = bn(0), + minGasLimit = bn(0), tip, regularTip, fastTip, @@ -62,16 +63,15 @@ export function SendSelect({ // Adding 2 magical units to match the fake unit that is added on TS SDK (.add(1)) // and then removed on the "transaction" service (.sub(1)) const maxFee = baseFee.add(tip).add(2); + if (maxFee.gt(balanceAssetSelected)) return; - form.setValue('amount', balanceAssetSelected.sub(maxFee), { - shouldValidate: true, - }); + form.setValue('amount', balanceAssetSelected.sub(maxFee)); } }, [watchMax, balanceAssetSelected, baseFee, tip, form.setValue]); return ( - + Asset @@ -146,9 +146,11 @@ export function SendSelect({ }} /> {(errorMessage || amountFieldState.error) && ( - - {errorMessage || amountFieldState.error?.message} - + + + {errorMessage || amountFieldState.error?.message} + + )} @@ -164,7 +166,7 @@ export function SendSelect({ diff --git a/packages/app/src/systems/Send/hooks/useSend.tsx b/packages/app/src/systems/Send/hooks/useSend.tsx index d7757a4cad..632631d248 100644 --- a/packages/app/src/systems/Send/hooks/useSend.tsx +++ b/packages/app/src/systems/Send/hooks/useSend.tsx @@ -1,7 +1,7 @@ import { yupResolver } from '@hookform/resolvers/yup'; import { useInterpret, useSelector } from '@xstate/react'; import type { BN, BNInput } from 'fuels'; -import { bn, isB256, isBech32 } from 'fuels'; +import { DEFAULT_DECIMAL_UNITS, bn, isB256, isBech32 } from 'fuels'; import { useCallback, useEffect, useMemo } from 'react'; import { useForm, useWatch } from 'react-hook-form'; import { useNavigate } from 'react-router-dom'; @@ -23,11 +23,11 @@ export enum SendStatus { } const selectors = { - baseGasLimit(state: SendMachineState) { - return state.context.baseGasLimit; + minGasLimit(state: SendMachineState) { + return state.context.minGasLimit; }, - maxGasPerTx(state: SendMachineState) { - return state.context.maxGasPerTx; + maxGasLimit(state: SendMachineState) { + return state.context.maxGasLimit; }, baseFee(state: SendMachineState) { return state.context.baseFee; @@ -42,6 +42,10 @@ const selectors = { return state.matches('readyToSend'); }, error(state: SendMachineState) { + if (state.context.error?.includes('Gas limit')) { + return ''; + } + return state.context.error; }, status(txStatus?: TxRequestStatus) { @@ -60,13 +64,16 @@ const selectors = { }, }; +type BalanceAsset = { + assetId: string; + amount?: BNInput; +}; + type SchemaOptions = { - accountBalanceAssets: Array<{ - assetId: string; - amount?: BNInput; - }>; + accountBalanceAssets: BalanceAsset[]; baseFee: BN | undefined; - maxGasPerTx: BN | undefined; + minGasLimit: BN | undefined; + maxGasLimit: BN | undefined; }; const schema = yup @@ -98,7 +105,7 @@ const schema = yup return true; } - const totalAmount = value.add(baseFee.add(fees.tip)); + const totalAmount = value.add(baseFee.add(fees.tip.amount)); return totalAmount.lte(bn(balanceAssetSelected.amount)); }) .required('Amount is required'), @@ -114,41 +121,79 @@ const schema = yup }), fees: yup .object({ - tip: yup - .mixed() - .test( - 'integer', - 'Tip must be greater than or equal to 0', - (value) => { + tip: yup.object({ + amount: yup + .mixed() + .test('min', 'Tip must be greater than or equal to 0', (value) => { return value?.gte(0); - } - ) - .required('Tip is required'), - gasLimit: yup - .mixed() - .test( - 'integer', - 'Gas limit must be greater or equal to 0', - (value) => { - return value?.gte(0); - } - ) - .test({ - name: 'max', - test: (value, ctx) => { - const { maxGasPerTx } = ctx.options.context as SchemaOptions; - if (!maxGasPerTx) return false; - - if (value?.lte(maxGasPerTx)) { - return true; - } - - return ctx.createError({ - message: `Gas limit must be less or equal to ${maxGasPerTx.toString()}`, - }); - }, - }) - .required('Gas limit is required'), + }) + .test({ + name: 'max', + test: (value, ctx) => { + const { asset, amount } = ctx.from?.[2].value as SendFormValues; // Two levels up + const { accountBalanceAssets, baseFee } = ctx.options + .context as SchemaOptions; + + const balanceAssetSelected = accountBalanceAssets?.find( + ({ assetId }) => assetId === asset + ); + + // It means "baseFee" and/or "current balance" is being calculated + if (!balanceAssetSelected?.amount || !value || !baseFee) { + return true; + } + + const balance = bn(balanceAssetSelected.amount); + + const totalBlocked = baseFee.add(amount); + const totalAmount = totalBlocked.add(value); + if (totalAmount.lte(balance) || value.isZero()) { + return true; + } + + return totalAmount.lte(balance); + }, + }) + .required('Tip is required'), + text: yup.string().required('Tip is required'), + }), + gasLimit: yup.object({ + amount: yup + .mixed() + .test({ + name: 'min', + test: (value, ctx) => { + const { minGasLimit } = ctx.options.context as SchemaOptions; + + if (!minGasLimit || value?.gte(minGasLimit)) { + return true; + } + + return ctx.createError({ + path: 'fees.gasLimit', + message: `Gas limit must be greater than or equal to '${minGasLimit.toString()}'.`, + }); + }, + }) + .test({ + name: 'max', + test: (value, ctx) => { + const { maxGasLimit } = ctx.options.context as SchemaOptions; + if (!maxGasLimit) return false; + + if (value?.lte(maxGasLimit)) { + return true; + } + + return ctx.createError({ + path: 'fees.gasLimit', + message: `Gas limit must be lower than or equal to '${maxGasLimit.toString()}'.`, + }); + }, + }) + .required('Gas limit is required'), + text: yup.string().required('Gas limit is required'), + }), }) .required('Fees are required'), }) @@ -159,8 +204,14 @@ export type SendFormValues = { address: string; amount: BN; fees: { - tip: BN; - gasLimit: BN; + tip: { + amount: BN; + text: string; + }; + gasLimit: { + amount: BN; + text: string; + }; }; }; @@ -169,8 +220,14 @@ const DEFAULT_VALUES: SendFormValues = { amount: bn(0), address: '', fees: { - tip: bn(0), - gasLimit: bn(0), + tip: { + amount: bn(0), + text: '0', + }, + gasLimit: { + amount: bn(0), + text: '0', + }, }, }; @@ -203,42 +260,27 @@ export function useSend() { ); const baseFee = useSelector(service, selectors.baseFee); - const baseGasLimit = useSelector(service, selectors.baseGasLimit); - const maxGasPerTx = useSelector(service, selectors.maxGasPerTx); + const minGasLimit = useSelector(service, selectors.minGasLimit); + const maxGasLimit = useSelector(service, selectors.maxGasLimit); const errorMessage = useSelector(service, selectors.error); const form = useForm({ resolver: yupResolver(schema), - reValidateMode: 'onChange', - mode: 'onChange', + mode: 'onSubmit', defaultValues: DEFAULT_VALUES, context: { accountBalanceAssets, baseFee, - maxGasPerTx, + minGasLimit, + maxGasLimit, }, }); const tip = useWatch({ control: form.control, - name: 'fees.tip', - }); - - const gasLimit = useWatch({ - control: form.control, - name: 'fees.gasLimit', + name: 'fees.tip.amount', }); - const { isValid } = form.formState; - - const amount = useWatch({ - control: form.control, - name: 'amount', - }); - const address = useWatch({ - control: form.control, - name: 'address', - }); const assetIdSelected = useWatch({ control: form.control, name: 'asset', @@ -286,23 +328,41 @@ export function useSend() { } useEffect(() => { - if (isValid && address && assetIdSelected) { - const input: TxInputs['createTransfer'] = { - to: address, - assetId: assetIdSelected, - amount, - tip, - gasLimit, - }; - - service.send('SET_INPUT', { input }); - } - }, [isValid, service.send, address, assetIdSelected, amount, tip, gasLimit]); + const { unsubscribe } = form.watch(() => { + const { address, asset, amount } = form.getValues(); + if (!address || !asset || amount.eq(0)) { + return; + } + + form.handleSubmit((data) => { + const { address, asset, amount, fees } = data; + + const input: TxInputs['createTransfer'] = { + to: address, + assetId: asset, + amount, + tip: fees.tip.amount, + gasLimit: fees.gasLimit.amount, + }; + + service.send('SET_INPUT', { input }); + form.trigger('amount'); + })(); + }); + + return () => unsubscribe(); + }, [ + form.watch, + form.getValues, + form.trigger, + form.handleSubmit, + service.send, + ]); return { form, baseFee, - baseGasLimit, + minGasLimit, tip, regularTip, fastTip, diff --git a/packages/app/src/systems/Send/machines/sendMachine.ts b/packages/app/src/systems/Send/machines/sendMachine.ts index 48926f3074..d55d1892fb 100644 --- a/packages/app/src/systems/Send/machines/sendMachine.ts +++ b/packages/app/src/systems/Send/machines/sendMachine.ts @@ -20,10 +20,10 @@ export type MachineContext = { providerUrl?: string; address?: string; baseFee?: BN; - baseGasLimit?: BN; regularTip?: BN; fastTip?: BN; - maxGasPerTx?: BN; + minGasLimit?: BN; + maxGasLimit?: BN; input?: TxInputs['createTransfer']; error?: string; }; @@ -34,12 +34,12 @@ type EstimateDefaultTipsReturn = { }; type EstimateGasLimitReturn = { - baseGasLimit: BN; - maxGasPerTx: BN; + maxGasLimit: BN; }; type CreateTransactionReturn = { baseFee?: BN; + minGasLimit?: BN; transactionRequest?: TransactionRequest; providerUrl: string; address: string; @@ -168,19 +168,22 @@ export const sendMachine = createMachine( assignDefaultTips: assign((_ctx, ev) => ({ regularTip: ev.data.regularTip, fastTip: ev.data.fastTip, + error: undefined, })), assignGasLimit: assign((_ctx, ev) => ({ - baseGasLimit: ev.data.baseGasLimit, - maxGasPerTx: ev.data.maxGasPerTx, + maxGasLimit: ev.data.maxGasLimit, + error: undefined, })), assignInput: assign((_ctx, ev) => ({ input: ev.input, })), - assignTransactionData: assign((_ctx, ev) => ({ + assignTransactionData: assign((ctx, ev) => ({ transactionRequest: ev.data.transactionRequest, providerUrl: ev.data.providerUrl, address: ev.data.address, - baseFee: ev.data.baseFee, + baseFee: ev.data.baseFee ?? ctx.baseFee, + minGasLimit: ev.data.minGasLimit ?? ctx.minGasLimit, + error: undefined, })), }, services: { diff --git a/packages/app/src/systems/Transaction/components/TxFee/TxFee.tsx b/packages/app/src/systems/Transaction/components/TxFee/TxFee.tsx index 4b1a348832..01bde372be 100644 --- a/packages/app/src/systems/Transaction/components/TxFee/TxFee.tsx +++ b/packages/app/src/systems/Transaction/components/TxFee/TxFee.tsx @@ -29,14 +29,14 @@ export const TxFee: TxFeeComponent = ({ > {title || 'Fee (network)'} {fee diff --git a/packages/app/src/systems/Transaction/components/TxFee/TxFeeLoader.tsx b/packages/app/src/systems/Transaction/components/TxFee/TxFeeLoader.tsx index 553260d535..5500b28f0c 100644 --- a/packages/app/src/systems/Transaction/components/TxFee/TxFeeLoader.tsx +++ b/packages/app/src/systems/Transaction/components/TxFee/TxFeeLoader.tsx @@ -5,7 +5,7 @@ import { styles } from './styles'; export const TxFeeLoader = (props: ContentLoaderProps) => ( - + Fee (network) diff --git a/packages/app/src/systems/Transaction/components/TxFee/styles.tsx b/packages/app/src/systems/Transaction/components/TxFee/styles.tsx index a157ea0c0e..268e1c9c81 100644 --- a/packages/app/src/systems/Transaction/components/TxFee/styles.tsx +++ b/packages/app/src/systems/Transaction/components/TxFee/styles.tsx @@ -8,6 +8,7 @@ export const styles = { justifyContent: 'space-between', alignItems: 'center', display: 'flex', + columnGap: '$4', position: 'relative', cursor: pointer ? 'pointer' : 'auto', @@ -25,8 +26,15 @@ export const styles = { }, }), }), - text: cssObj({ + title: cssObj({ fontSize: '$sm', fontWeight: '$normal', + textWrap: 'nowrap', + }), + amount: cssObj({ + fontSize: '$sm', + fontWeight: '$normal', + wordWrap: 'break-word', + minWidth: 0, }), }; diff --git a/packages/app/src/systems/Transaction/components/TxFeeOptions/TxFeeOptions.tsx b/packages/app/src/systems/Transaction/components/TxFeeOptions/TxFeeOptions.tsx index 0ed0add6aa..079eab8b35 100644 --- a/packages/app/src/systems/Transaction/components/TxFeeOptions/TxFeeOptions.tsx +++ b/packages/app/src/systems/Transaction/components/TxFeeOptions/TxFeeOptions.tsx @@ -1,39 +1,38 @@ -import { Box, Button, Input, Text, VStack } from '@fuel-ui/react'; +import { Box, Button, Form, HStack, Input, Text, VStack } from '@fuel-ui/react'; import { AnimatePresence } from 'framer-motion'; -import { type BN, DEFAULT_DECIMAL_UNITS, bn } from 'fuels'; +import { type BN, bn } from 'fuels'; import { useEffect, useMemo, useRef, useState } from 'react'; import { useController, useFormContext } from 'react-hook-form'; import { MotionFlex, MotionStack, animations } from '~/systems/Core'; +import { createAmount } from '~/systems/Core/components/InputAmount/InputAmount'; import type { SendFormValues } from '~/systems/Send/hooks'; import { TxFee } from '../TxFee'; +import { DECIMAL_UNITS, formatTip } from './TxFeeOptions.utils'; type TxFeeOptionsProps = { baseFee: BN; - baseGasLimit: BN; + minGasLimit: BN; regularTip: BN; fastTip: BN; }; -const DECIMAL_UNITS = DEFAULT_DECIMAL_UNITS; - export const TxFeeOptions = ({ baseFee, - baseGasLimit, + minGasLimit, regularTip, fastTip, }: TxFeeOptionsProps) => { const [isAdvanced, setIsAdvanced] = useState(false); - const { control, setValue, trigger } = useFormContext(); + const { control, setValue, getValues } = useFormContext(); + const previousMinGasLimit = useRef(minGasLimit); const previousDefaultTip = useRef(regularTip); - const previousGasLimit = useRef(baseGasLimit); - const { field: tip } = useController({ + const { field: tip, fieldState: tipState } = useController({ control, name: 'fees.tip', }); - // @TODO: Enable this when the SDK gets to work with custom gas limits - const { field: _gasLimit, fieldState: _gasLimitState } = useController({ + const { field: gasLimit, fieldState: gasLimitState } = useController({ control, name: 'fees.gasLimit', }); @@ -45,13 +44,6 @@ export const TxFeeOptions = ({ ]; }, [baseFee, regularTip, fastTip]); - const tipFormatted = useMemo(() => { - return tip.value.format({ - units: DECIMAL_UNITS, - minPrecision: 0, - }); - }, [tip.value]); - const toggle = () => { setIsAdvanced((curr) => !curr); }; @@ -61,85 +53,127 @@ export const TxFeeOptions = ({ */ useEffect(() => { if (!isAdvanced) { - setValue('fees.tip', previousDefaultTip.current); - setValue('fees.gasLimit', previousGasLimit.current); + const [currentTip, currentGasLimit] = getValues([ + 'fees.tip.amount', + 'fees.gasLimit.amount', + ]); + + if (!currentGasLimit.eq(previousMinGasLimit.current)) { + setValue('fees.gasLimit', { + amount: previousMinGasLimit.current, + text: previousMinGasLimit.current.toString(), + }); + } + + if (!currentTip.eq(previousDefaultTip.current)) { + setValue('fees.tip', { + amount: previousDefaultTip.current, + text: formatTip(previousDefaultTip.current), + }); + } } - }, [isAdvanced, setValue]); + }, [isAdvanced, setValue, getValues]); return ( - + {isAdvanced ? ( - + + + - Tip - - { - const text = e.target.value; - const val = text.replaceAll(',', ''); - const units = bn.parseUnits(val, DECIMAL_UNITS); + + + Gas limit + + + { + const ignore = /[.,\-+]/g; + const val = (e.target.value || '').replaceAll( + ignore, + '' + ); + + gasLimit.onChange({ + amount: bn(val), + text: val, + }); + }} + /> + + + + + Tip + + + { + const text = e.target.value; + const { text: newText, amount } = createAmount( + text, + DECIMAL_UNITS + ); - tip.onChange(units); - trigger('amount'); - }} - /> - + tip.onChange({ + amount, + text: newText, + }); + }} + /> + + + + + {(gasLimitState.error || tipState.error) && ( + + + + {gasLimitState.error?.message || tipState.error?.message} + + + + )} - {/* @TODO: Remove this when the SDK gets to work with custom gas limits */} - {/* - Gas limit - - - { - const ignore = /[.,\-+]/g; - const val = (e.target.value || '').replaceAll(ignore, ''); - gasLimit.onChange(bn(val)); - }} - /> - - {gasLimitState.error && ( - - {gasLimitState.error.message} - - )} - - */} ) : ( - + {options.map((option) => ( { previousDefaultTip.current = option.tip; - setValue('fees.tip', option.tip); - trigger('amount'); + setValue('fees.tip', { + amount: option.tip, + text: formatTip(option.tip), + }); }} /> ))} diff --git a/packages/app/src/systems/Transaction/components/TxFeeOptions/TxFeeOptions.utils.ts b/packages/app/src/systems/Transaction/components/TxFeeOptions/TxFeeOptions.utils.ts new file mode 100644 index 0000000000..3908bc9614 --- /dev/null +++ b/packages/app/src/systems/Transaction/components/TxFeeOptions/TxFeeOptions.utils.ts @@ -0,0 +1,14 @@ +import { type BN, DEFAULT_DECIMAL_UNITS } from 'fuels'; + +export const DECIMAL_UNITS = DEFAULT_DECIMAL_UNITS; + +export const formatTip = (tip: BN) => { + if (tip.isZero()) { + return '0'; + } + + return tip.format({ + units: DECIMAL_UNITS, + precision: DECIMAL_UNITS, + }); +}; diff --git a/packages/app/src/systems/Transaction/services/transaction.tsx b/packages/app/src/systems/Transaction/services/transaction.tsx index 0a5ec7cdf1..317d0e728d 100644 --- a/packages/app/src/systems/Transaction/services/transaction.tsx +++ b/packages/app/src/systems/Transaction/services/transaction.tsx @@ -5,12 +5,10 @@ import { Address, type BN, Provider, - ScriptTransactionRequest, TransactionResponse, TransactionStatus, assembleTransactionSummary, bn, - coinQuantityfy, getTransactionSummary, getTransactionSummaryFromRequest, getTransactionsSummaries, @@ -242,15 +240,14 @@ export class TxService { const consensusParameters = provider.getChain().consensusParameters; return { - baseGasLimit: bn(1), - maxGasPerTx: consensusParameters.txParameters.maxGasPerTx, + maxGasLimit: consensusParameters.txParameters.maxGasPerTx, }; } static async createTransfer(input: TxInputs['createTransfer'] | undefined) { - const { amount, assetId, to, tip, gasLimit: gasLimitInput } = input || {}; + const { amount, assetId, to, tip, gasLimit } = input || {}; - if (!to || !assetId || !amount || !tip || !gasLimitInput) { + if (!to || !assetId || !amount || !tip || !gasLimit) { throw new Error('Missing params for transaction request'); } @@ -279,27 +276,47 @@ export class TxService { assetId, { tip: tip.isZero() ? undefined : tip, + gasLimit: gasLimit.isZero() ? undefined : gasLimit, } ); + const txCost = await provider.getTransactionCost(transactionRequest, { + resourcesOwner: wallet, + }); + const baseFee = transactionRequest.maxFee.sub( transactionRequest.tip ?? bn(0) ); return { baseFee: baseFee.sub(1), // To match maxFee calculated on TS SDK (they add 1 unit) + minGasLimit: txCost.gasUsed, transactionRequest, address: account.address, providerUrl: network.url, }; } catch (e) { attempts += 1; - console.log(e); + + // @TODO: Waiting to match with FuelError type and ErrorCode enum from "fuels" + // These types are not exported from "fuels" package, but they exists in the "@fuels-ts/errors" + if ( + e instanceof Error && + 'toObject' in e && + typeof e.toObject === 'function' + ) { + const error: { code: string } = e.toObject(); + + if (error.code === 'gas-limit-too-low') { + throw e; + } + } } } return { baseFee: undefined, + minGasLimit: undefined, transactionRequest: undefined, address: account.address, providerUrl: network.url, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 621e9b6f86..fba74f5f9d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,7 +24,9 @@ overrides: '@adobe/css-tools@<4.3.2': '>=4.3.2' '@babel/traverse@<7.23.2': '>=7.23.2' braces@<3.0.3: '>=3.0.3' - ws: 8.17.1 + ws@>=8.0.0 <8.17.1: '>=8.17.1' + ws@>=7.0.0 <7.5.10: '>=7.5.10' + ws@>=6.0.0 <6.2.3: '>=6.2.3' importers: @@ -19672,7 +19674,7 @@ packages: resolution: {integrity: sha512-wSkFeOnp+7dhn+zTThO0M4D2FEqZN9lGIWowJu5JLa2ojjtlzRwK8SkjcHZ4rLX8VnMev7kGjgQLrGs8kxy+hw==} peerDependencies: '@types/ws': ^8.0.0 - ws: 8.17.1 + ws: '>=8.17.1' xstate: ^4.37.0 peerDependenciesMeta: '@types/ws': @@ -24629,7 +24631,7 @@ packages: /isows@1.0.3(ws@8.17.1): resolution: {integrity: sha512-2cKei4vlmg2cxEjm3wVSqn8pcoRF/LX/wpifuuNquFO4SQmPwarClT+SUCA2lt+l581tTeZIPIZuIDo2jWN1fg==} peerDependencies: - ws: 8.17.1 + ws: '>=8.17.1' dependencies: ws: 8.17.1