File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 1
1
import bowser from 'bowser'
2
2
import BigNumber from 'bignumber.js'
3
3
import { get } from 'svelte/store'
4
- import ENS , { getEnsAddress } from '@ensdomains/ensjs'
5
4
6
5
import { app } from './stores'
7
6
import { WalletInterface , Ens } from './interfaces'
@@ -71,6 +70,11 @@ export function getAddress(provider: any): Promise<string | any> {
71
70
export async function getEns ( provider : any , address : string ) : Promise < Ens > {
72
71
const { networkId } = get ( app )
73
72
try {
73
+ // There is an issue with ens and ts unable to find the
74
+ // declaration file for it even though it is present.
75
+ // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
76
+ // @ts -ignore - TS7016
77
+ const { default : ENS , getEnsAddress } = await import ( '@ensdomains/ensjs' )
74
78
const ens = new ENS ( { provider, ensAddress : getEnsAddress ( networkId ) } )
75
79
const { name } = await ens . getName ( address )
76
80
const nameInterface = await ens . name ( name )
@@ -84,6 +88,7 @@ export async function getEns(provider: any, address: string): Promise<Ens> {
84
88
}
85
89
} catch ( e ) {
86
90
// Error getting ens
91
+ console . error ( e )
87
92
return { }
88
93
}
89
94
}
You can’t perform that action at this time.
0 commit comments