import { Wallet } from 'ethers' ; export type WalletOrAddress = Wallet | string ; export function toAddress ( walletOrAddress ) { return typeof walletOrAddress === 'string' ? walletOrAddress : walletOrAddress . address ; }