Closed ghost closed 2 years ago
this doesnt fix the problem just updates the readme.
it is working fine. the update is that the cardano object has to be used as window.cardano.selectedWallet instead of window.cardano
I must be daft, but my window.cardano object does not have a selectedWallet method so this wouldn't work @augustineashal ?
Edit: I figured it out for if one wants to implement this just for nami. Then instead of passing window.cardano one should pass a returned object of window.cardano.nami.enable()
. This returned object of the Nami library doesn't implement the "isEnabled()" method itself, that's only available on the top level window.cardano.nami object. As such, remove any calls to isEnabled() and enable() from nami-wallet-api and everything should work again fine.
We would probably need to update the library to reflect this.
Some other aspects have changed, such as getRewardAddress
is now getRewardAddresses
. This I know breaks the delegate
function.
I've forked and working on fixing based on the CIP:30 changes that I know of relating to the delegate function: https://github.com/CyberCyclone/nami-wallet-api
This Nami API implementation is deprecated soon. Please follow the API under the window.cardano.nami namespace. For more information check out CIP-30: https://github.com/cardano-foundation/CIPs/tree/master/CIP-0030