vulpemventures / marina

Liquid Wallet browser extension
MIT License
37 stars 19 forks source link

`await marina.getAccountInfo()` returns undefine for MainAccount #355

Closed tiero closed 2 years ago

tiero commented 2 years ago

on MainAccount f I do await marina.getAccountInfo() will get Uncaught Error: Account undefined not found

Originally posted by @tiero in https://github.com/vulpemventures/marina/issues/345#issuecomment-1145945204

louisinger commented 2 years ago

GetAccountInfo expects an accountID as parameter: https://github.com/vulpemventures/marina-provider/blob/master/src/provider.ts#L48 Not the expected behaviour ?

(The idea is to be able to get the info before switching)

tiero commented 2 years ago

We should return the main account info if undefined. Moreover, we should return the descriptor that represents the bip84 derivation