Uniswap permit function

Hello, I try to use the permit function from UniswapV2

 function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external {
        require(deadline >= block.timestamp, 'UniswapV2: EXPIRED');
        bytes32 digest = keccak256(
            abi.encodePacked(
                '\x19\x01',
                DOMAIN_SEPARATOR,
                keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline))
            )
        );
        address recoveredAddress = ecrecover(digest, v, r, s);
        require(recoveredAddress != address(0) && recoveredAddress == owner, 'UniswapV2: INVALID_SIGNATURE');
        _approve(owner, spender, value);
    }

I am running the solidity code on Remix and I started developing the UI part

import React, { useContext, useEffect } from 'react';
import Context from './../Context';

interface IContext {
  web3: any;
  account: any;
  isAddress(address: any): any;
  web3Modal: any;
}

export const MigratorComp = () => {
  const context = useContext(Context) as IContext;

  const spender = '0xd9145CCE52D386f254917e481eB44e9943F39138';

  useEffect(() => {
    console.log('Migrator');
  }, []);

  const createPermitData = async () => {
    // const account = context.account;
    const from = context.web3.utils.toChecksumAddress(
      '0x5B38Da6a701c568545dCfcB03FcB875f56beddC4'
    );

    const nonce = await context.web3.eth.getTransactionCount(from, 'pending');

    const message = {
      owner: '0x5B38Da6a701c568545dCfcB03FcB875f56beddC4',
      spender: spender,
      value: '1000',
      nonce: nonce,
      deadline: Math.trunc((Date.now() + 120 * 1000) / 1000),
    };
const typedData = {
      types: {
        EIP712Domain: [
          {
            name: 'name',
            type: 'string',
          },
          {
            name: 'version',
            type: 'string',
          },
          {
            name: 'chainId',
            type: 'uint256',
          },
          {
            name: 'verifyingContract',
            type: 'address',
          },
        ],
        Permit: [
          {
            name: 'owner',
            type: 'address',
          },
          {
            name: 'spender',
            type: 'address',
          },
          {
            name: 'value',
            type: 'uint256',
          },
          {
            name: 'deadline',
            type: 'uint256',
          },
        ],
      },
      primaryType: 'Permit',
      domain: {
        name: 'Blueberry Migrator',
        version: '1',
        chainId: 56,
        verifyingContract: '0xd9145CCE52D386f254917e481eB44e9943F39138',
      },
      message: message,
    };

    return {
      typedData,
      message,
    };
  };

  const signData = async (fromAddress: any) => {
    const account = context.account;
    const from = context.web3.utils.toChecksumAddress(account);

    const msg = await createPermitData();
    const sign = await window.ethereum.request({
      method: 'eth_signTypedData_v4',
      params: [from, JSON.stringify(msg.typedData)],
    });

    const r = sign.slice(0, 66);
    const s = '0x' + sign.slice(66, 130);
    const v = Number('0x' + sign.slice(130, 132));

    console.log(r, s, v);
    console.log(msg.message);

    // return { v, r, s };
  };
};

But if I pass the parameters here

address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s

Here are the r, v, s

0x956a31dd788c6f8dd0ebbbabe335676fbe7153287e3649345e01dac9d734a52d 0x64fe30030b0450dc25c5aef90c5428872dd2b6dfea1bcc1e11599675f6f2f4ca 28

Here is the error I am getting:

transact to UniswapV2ERC20.permit errored: Error encoding arguments: Error: value out-of-bounds (argument=null value="0x956a31dd788c6f8dd0ebbbabe335676fbe7153287e3649345e01dac9d734a52d" code=INVALID_ARGUMENT version=abi/5.5.0)