import { ethers } from 'ethers' ; declare let window ; const getBalance = async ( address ) => { try { const provider = new ethers . providers . Web3Provider ( window . ethereum ) ; const balance = undefined ; if ( ! balance ) { throw new Error ( 'Please complete the code' ) ; } return { balance : balance . toString ( ) , } ; } catch ( error ) { return { error : error . message , } ; } } ; export default getBalance ;