Getting error when running swap function 1Inch plugin

Hi, I just coded my first dex using React and following the 1Inch youtube tutorial! Almost there but when I try to complete the swap I get an error…Please excuse the mess of code. Thanks!

    useEffect(() => {
      async function init() {
        await Moralis.initPlugins();
        await Moralis.enable();
        listAvailableTokens();
      }
  
      init();
  
      // token info from 1inch
      const listAvailableTokens = async () => {
        const result = await Moralis.Plugins.oneInch.getSupportedTokens({
          chain: "eth", // The blockchain you want to use (eth/bsc/polygon)
        });
        const tokensObject = await result.tokens;
        setTokens(tokensObject)
        // const tokensImg = Object.values(tokensObject).map(val => val.logoURI);
        // setImgVal(tokensImg)
      };
    }, []);

    const getQuote = async function() {
      if(!fromAmount)
      return;
    
      let amount = Number(fromAmount) * 10**fromTokenDecimals;
      const quote = await Moralis.Plugins.oneInch.quote({
        chain: 'eth',
        fromTokenAddress: tokenAddress,
        toTokenAddress: totokenAddress,
        amount: amount,
      })
      console.log(quote)
      setToAmount(quote.toTokenAmount.length < 40 ? (quote.toTokenAmount / 10**quote.toToken.decimals).toFixed(8) : 'Too Much!');
      setGasAmount(quote.estimatedGas)
      
      if(fromAmount) {
        setOrder(true)
      }
    }

    async function trySwap() {
      let address = Moralis.User.current().get("ethAddress");
      let amount = Number(fromAmount) * 10**fromTokenDecimals;
      if (tokenSymbol !== "ETH") {
        const allowance = await Moralis.Plugins.oneInch.hasAllowance({
          chain: "eth", // The blockchain you want to use (eth/bsc/polygon)
          fromTokenAddress: tokenAddress, // The token you want to swap
          fromAddress: address, // Your wallet address
          amount: amount,
        });
        console.log(allowance);
        console.log(address)
        if (!allowance) {
          await Moralis.Plugins.oneInch.approve({
            chain: "eth", // The blockchain you want to use (eth/bsc/polygon)
            tokenAddress: tokenAddress, // The token you want to swap
            fromAddress: address, // Your wallet address
          });
        }
      }
      try {
        await doSwap(address, amount);
        alert("Swap Complete");
      } catch (error) {
        console.log(error);
      }
    }
    
    function doSwap(userAddress, amount) {
      return Moralis.Plugins.oneInch.swap({
        chain: "eth", // The blockchain you want to use (eth/bsc/polygon)
        fromTokenAddress: tokenAddress, // The token you want to swap
        toTokenAddress: totokenAddress, // The token you want to receive
        amount: amount,
        fromAddress: userAddress, // Your wallet address
        slippage: 1,
      });
    }

what is the error that you get?

Hi, I get this message when I submit the swap-

The development server has disconnected.
Refresh the page if necessary. webpackHotDevClient.js:76
[HMR] Waiting for update signal from WDS... log.js:24
./node_modules/moralis/lib/browser/MoralisWalletConnectProvider.js
Module not found: Can't resolve '@walletconnect/web3-provider' in 'C:\Users\Jamie\Desktop\Builds\dex-build\node_modules\moralis\lib\browser' webpackHotDevClient.js:138
You are accessing the MetaMask window.web3.currentProvider shim. This property is deprecated; use window.ethereum instead. For details, see: https://docs.metamask.io/guide/provider-migration.html#replacing-window-web3 inpage.js:1:49382
MetaMask: The event 'close' is deprecated and may be removed in the future. Please use 'disconnect' instead.
For more information, see: https://eips.ethereum.org/EIPS/eip-1193#disconnect inpage.js:1:43460
MetaMask: 'ethereum.enable()' is deprecated and may be removed in the future. Please use the 'eth_requestAccounts' RPC method instead.
For more information, see: https://eips.ethereum.org/EIPS/eip-1102 inpage.js:1:43582
Object { fromToken: {…}, toToken: {…}, toTokenAmount: "6517620480556641885924", fromTokenAmount: "1000000000000000000", protocols: (1) […], estimatedGas: 229386 }
TokenContext.js:57
Error: Something went wrong
undefined
    _callee6 MoralisWeb3.js:634
    Babel 11
    doSwap TokenContext.js:95
    trySwap TokenContext.js:87
    React 14
    unstable_runWithPriority scheduler.development.js:468
    React 15
    js index.js:5
    js main.chunk.js:3105
    Webpack 7
TokenContext.js:90

at a first look look it seems that you need to install walletconnect