aepp-sdk-js
aepp-sdk-js copied to clipboard
Still fetching from `nodes` when using wallet
When leaving out nodes from the SDK params, I get an error fetching the chain height, although the wallet was initialised.
This can be reproduced in this branch, I've set debugger points which show how the address is being fetched, plus the balance (testnet node url is hardcoded in there, my bad), but when the height is to be fetched, an error is thrown. Whereas if you uncomment the disabled nodes code in https://github.com/nikita-fuchs/nftminter/blob/still_fetching_from_nodeURL/src/app/services/aeternity.service.ts#L74, everything works fine.
This would work if you pass connectNode option to connectToWallet
https://github.com/nikita-fuchs/nftminter/blob/2e5c0580618dda710ae2bd097e6fc38f6a140501/src/app/services/aeternity.service.ts#L98
https://docs.aeternity.com/aepp-sdk-js/v12.1.3/api/classes/AeSdkAepp.html#connectToWallet
But this should not be necessary? The wallet has a connection to a node, it doesn't need to get one passed in order to work.
This is how it is implemented now, proxying requests through wallet a bit more difficult to implement, but we will consider this