Open ralyodio opened 8 months ago
Is it is possible after the user connects its wallet, using cip30 api. It should be something like:
const cborBalance = await api.getBalance()
const balance = Cardano.Value.from_bytes(Buffer.from(cborBalance, "hex")).coin().to_str()
ok cool. maybe i'll work on that.
Neither Cardano
nor api
are exposed in the wallet button component.
There are many ways to go around it, one could be adding a method that calculates the balance to cardano.tsx then in App.tsx when the wallet is updated (updateWallet) calculate the balance and store it in the App.tsx state. Then pass that state to the wallet component.
is it possible to show wallet balance?