aepp-sdk-js icon indicating copy to clipboard operation
aepp-sdk-js copied to clipboard

Still fetching from `nodes` when using wallet

Open nikita-fuchs opened this issue 3 years ago • 3 comments

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.

nikita-fuchs avatar Sep 08 '22 13:09 nikita-fuchs

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

davidyuk avatar Sep 09 '22 06:09 davidyuk

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.

nikita-fuchs avatar Sep 09 '22 11:09 nikita-fuchs

This is how it is implemented now, proxying requests through wallet a bit more difficult to implement, but we will consider this

davidyuk avatar Sep 10 '22 20:09 davidyuk