Skip to main content

Interface: IEthersContext

Models.IEthersContext

Summary

The return type of TCreateEthersModalConnector

  • ethers compatable provider TEthersProvider
  • a callback to change the current signer
  • the current account, chainId and signer
  • callbacks to open the web3Modal, logout or change theme

Hierarchy

Properties

connector

connector: undefined | TEthersModalConnector

Overrides

Web3ReactContextInterface.connector

Defined in

src/models/ethersAppContextTypes.ts:30


provider

provider: undefined | TEthersProvider

Defined in

src/models/ethersAppContextTypes.ts:31


active

active: boolean

Overrides

Web3ReactContextInterface.active

Defined in

src/models/ethersAppContextTypes.ts:32


signer

signer: undefined | TEthersSigner

Defined in

src/models/ethersAppContextTypes.ts:33


account

account: undefined | string

Overrides

Web3ReactContextInterface.account

Defined in

src/models/ethersAppContextTypes.ts:34


chainId

chainId: undefined | number

Overrides

Web3ReactContextInterface.chainId

Defined in

src/models/ethersAppContextTypes.ts:35


changeSigner

changeSigner: undefined | (signer: Signer) => Promise<void>

Defined in

src/models/ethersAppContextTypes.ts:36


openModal

openModal: (ethersModalConnector: TEthersModalConnector, onError?: (error: Error) => void) => void

Type declaration

▸ (ethersModalConnector, onError?): void

Open web3 modal for login

Parameters
NameType
ethersModalConnectorTEthersModalConnector
onError?(error: Error) => void
Returns

void

Defined in

src/models/ethersAppContextTypes.ts:40


disconnectModal

disconnectModal: (onSuccess?: () => void) => void

Type declaration

▸ (onSuccess?): void

Parameters
NameType
onSuccess?() => void
Returns

void

Defined in

src/models/ethersAppContextTypes.ts:41


setModalTheme

setModalTheme: undefined | (theme: "light" | "dark") => void

Defined in

src/models/ethersAppContextTypes.ts:42