Commit a6e46623 authored by Moody Salem's avatar Moody Salem Committed by GitHub

chore: bump ethers and regenerate lockfile (#1666)

* bump ethers

* regenerate lockfile

* update code style

* Fix code style issues with ESLint

* remove unused useRef
Co-authored-by: default avatarLint Action <lint-action@samuelmeuli.com>
parent 9353c783
...@@ -5,7 +5,10 @@ import { useActiveWeb3React } from 'hooks/web3' ...@@ -5,7 +5,10 @@ import { useActiveWeb3React } from 'hooks/web3'
export default function useAddTokenToMetamask( export default function useAddTokenToMetamask(
currencyToAdd: Currency | undefined currencyToAdd: Currency | undefined
): { addToken: () => void; success: boolean | undefined } { ): {
addToken: () => void
success: boolean | undefined
} {
const { library } = useActiveWeb3React() const { library } = useActiveWeb3React()
const token: Token | undefined = currencyToAdd?.wrapped const token: Token | undefined = currencyToAdd?.wrapped
......
...@@ -8,7 +8,11 @@ import useENSName from './useENSName' ...@@ -8,7 +8,11 @@ import useENSName from './useENSName'
*/ */
export default function useENS( export default function useENS(
nameOrAddress?: string | null nameOrAddress?: string | null
): { loading: boolean; address: string | null; name: string | null } { ): {
loading: boolean
address: string | null
name: string | null
} {
const validated = isAddress(nameOrAddress) const validated = isAddress(nameOrAddress)
const reverseLookup = useENSName(validated ? validated : undefined) const reverseLookup = useENSName(validated ? validated : undefined)
const lookup = useENSAddress(nameOrAddress) const lookup = useENSAddress(nameOrAddress)
......
import { useCallback, useMemo, useRef } from 'react' import { useCallback, useMemo } from 'react'
import { useDispatch, useSelector } from 'react-redux' import { useDispatch, useSelector } from 'react-redux'
import { AppDispatch, AppState } from '../index' import { AppDispatch, AppState } from '../index'
import { Field, typeInput } from './actions' import { Field, typeInput } from './actions'
...@@ -18,9 +18,7 @@ export function useMintState(): AppState['mint'] { ...@@ -18,9 +18,7 @@ export function useMintState(): AppState['mint'] {
return useSelector<AppState, AppState['mint']>((state) => state.mint) return useSelector<AppState, AppState['mint']>((state) => state.mint)
} }
export function useMintActionHandlers( export function useMintActionHandlers(noLiquidity: boolean | undefined): {
noLiquidity: boolean | undefined
): {
onFieldAInput: (typedValue: string) => void onFieldAInput: (typedValue: string) => void
onFieldBInput: (typedValue: string) => void onFieldBInput: (typedValue: string) => void
} { } {
......
...@@ -88,7 +88,10 @@ export function useHasPendingApproval(tokenAddress: string | undefined, spender: ...@@ -88,7 +88,10 @@ export function useHasPendingApproval(tokenAddress: string | undefined, spender:
// return null if not done loading, return undefined if not found // return null if not done loading, return undefined if not found
export function useUserHasSubmittedClaim( export function useUserHasSubmittedClaim(
account?: string account?: string
): { claimSubmitted: boolean; claimTxn: TransactionDetails | undefined } { ): {
claimSubmitted: boolean
claimTxn: TransactionDetails | undefined
} {
const allTransactions = useAllTransactions() const allTransactions = useAllTransactions()
// get the txn if it has been submitted // get the txn if it has been submitted
......
...@@ -17,7 +17,9 @@ import { Erc20Interface } from 'abis/types/Erc20' ...@@ -17,7 +17,9 @@ import { Erc20Interface } from 'abis/types/Erc20'
*/ */
export function useETHBalances( export function useETHBalances(
uncheckedAddresses?: (string | undefined)[] uncheckedAddresses?: (string | undefined)[]
): { [address: string]: CurrencyAmount<Currency> | undefined } { ): {
[address: string]: CurrencyAmount<Currency> | undefined
} {
const { chainId } = useActiveWeb3React() const { chainId } = useActiveWeb3React()
const multicallContract = useMulticall2Contract() const multicallContract = useMulticall2Contract()
......
import { Web3Provider, Network } from '@ethersproject/providers' import { Web3Provider } from '@ethersproject/providers'
class WorkaroundWeb3Provider extends Web3Provider {
private _detectNetworkResult: Promise<Network> | null = null
async detectNetwork(): Promise<Network> {
return this._detectNetworkResult ?? (this._detectNetworkResult = this._uncachedDetectNetwork())
}
}
export default function getLibrary(provider: any): Web3Provider { export default function getLibrary(provider: any): Web3Provider {
const library = new WorkaroundWeb3Provider( const library = new Web3Provider(
provider, provider,
typeof provider.chainId === 'number' typeof provider.chainId === 'number'
? provider.chainId ? provider.chainId
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment