diff --git a/packages/auth-browser/src/lib/chains/eth.ts b/packages/auth-browser/src/lib/chains/eth.ts index 33d15ac64..3fad3d159 100644 --- a/packages/auth-browser/src/lib/chains/eth.ts +++ b/packages/auth-browser/src/lib/chains/eth.ts @@ -1,20 +1,22 @@ import { Buffer as BufferPolyfill } from 'buffer'; -import depd from 'depd'; import { hexlify } from '@ethersproject/bytes'; import { Web3Provider, JsonRpcSigner } from '@ethersproject/providers'; import { toUtf8Bytes } from '@ethersproject/strings'; - import { verifyMessage } from '@ethersproject/wallet'; +import { injected, walletConnect } from '@wagmi/connectors' +import { connect as wagmiConnect, disconnect as wagmiDisconnect, getWalletClient, Config } from '@wagmi/core'; +import depd from 'depd'; import { ethers } from 'ethers'; import { getAddress } from 'ethers/lib/utils'; import { SiweMessage } from 'siwe'; - -// @ts-ignore: If importing 'nacl' directly, the built files will use .default instead import * as nacl from 'tweetnacl'; import * as naclUtil from 'tweetnacl-util'; +import { http } from 'viem'; +import { + createConfig, +} from 'wagmi'; -// @ts-ignore: If importing 'nacl' directly, the built files will use .default instead import { ELeft, ERight, @@ -40,13 +42,6 @@ import { import { getStorageItem } from '@lit-protocol/misc-browser'; import { AuthSig, AuthCallbackParams, LITEVMChain } from '@lit-protocol/types'; -import { - createConfig, -} from 'wagmi'; -import { connect as wagmiConnect, disconnect as wagmiDisconnect, getWalletClient, Config } from '@wagmi/core'; -import { injected, walletConnect } from '@wagmi/connectors' -import { http } from 'viem'; - const deprecated = depd('lit-js-sdk:auth-browser:index'); if (globalThis && typeof globalThis.Buffer === 'undefined') { @@ -404,6 +399,7 @@ export const connectWeb3 = async ({ throw new Error('No wallet client found'); } + // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore - Create Web3Provider from wallet client const web3 = new Web3Provider(walletClient); diff --git a/packages/auth-browser/src/lib/chains/sol.ts b/packages/auth-browser/src/lib/chains/sol.ts index 6be0f19a1..11711ad26 100644 --- a/packages/auth-browser/src/lib/chains/sol.ts +++ b/packages/auth-browser/src/lib/chains/sol.ts @@ -8,12 +8,9 @@ import { NoWalletException, UnknownError, } from '@lit-protocol/constants'; - -import { IProvider, AuthSig } from '@lit-protocol/types'; import { log } from '@lit-protocol/misc'; import { getStorageItem } from '@lit-protocol/misc-browser'; -// import { toString as uint8arrayToString } from 'uint8arrays'; - +import { IProvider, AuthSig } from '@lit-protocol/types'; import { uint8arrayFromString, uint8arrayToString,