nami icon indicating copy to clipboard operation
nami copied to clipboard

enable() returns API with empty object methods

Open BlakeBrown opened this issue 1 year ago • 4 comments

On JPG Store we've noticed a few users have trouble connecting Nami wallets. I recently had the problem happen to me so I did some debugging:

const enabled = await window.cardano.nami.isEnabled(); // returns true
const api = await window.cardano.nami.enable(); // returns API object
api.getBalance(); // returns empty object
api.getUnusedAddresses(); // returns empty object
api.getUsedAddresses(); // returns the error msg below
image

This for a standard wallet addr1q95tstwylvk4z4gpw2x7t07trlg2gl4nm43g6v6quy9052pcmxaj7z8ee8plnppatsx7cr6lngkncdukkqplgtxjl4dsxry9aj which has plenty of UTXOs & NFTs and has interacted with JPG Store multiple times.

What's strange is that the error seems to come & go every few days. I'll go 5 days without being able to use Nami, then 3 days it's fine, then back to this, etc.

BlakeBrown avatar Jul 25 '22 00:07 BlakeBrown

What's strange is that the error seems to come & go every few days. I'll go 5 days without being able to use Nami, then 3 days it's fine, then back to this, etc.

That's indeed really weird, since Nami didn't receive any update for some time and so nothing changed. Where do you test this? Only on jpg.store?

alessandrokonrad avatar Jul 25 '22 08:07 alessandrokonrad

What's strange is that the error seems to come & go every few days. I'll go 5 days without being able to use Nami, then 3 days it's fine, then back to this, etc.

That's indeed really weird, since Nami didn't receive any update for some time and so nothing changed. Where do you test this? Only on jpg.store?

Yes, that's correct.

BlakeBrown avatar Jul 25 '22 14:07 BlakeBrown

I have seen this as well when attempting to implement wallet login. However, I'm reasonably sure I've seen this issue occur with other wallets as well. I can't reproduce the issue currently but ill bookmark this if it appears again

NicholasMaselli avatar Jul 28 '22 02:07 NicholasMaselli