I would to use window.cardano
when a user just "enter" to website. Sometimes window.cardano is still undefined
How can i solve this problem? I try to use await window.cardano
but is not a Promise.
I try to use this code in a react useEffect:
let cardanoExist = await window.cardano
if (cardanoExist) {
let namiExist = await window.cardano.nami
if (namiExist) { \\ do some stuff } else {return}
} else {
return
}
}
But sometimes window.cardano
is undefined
, also if i have installed, for example, nami wallet
Thanks!