nutshell icon indicating copy to clipboard operation
nutshell copied to clipboard

[Wallet] Balance in wrong mint doesn't allow spending

Open nickfarrow opened this issue 1 year ago • 2 comments

So I had the default mint in my .env, then i redeemed some ecash from another mint.

This added the new mint under cashu info.

But I was unable to pay LN invoices, with a confusing output:

cashu pay  lnbc1u1pj6wsfu...vukgns
Balance: 2500 sat
Pay 100 sat (102 sat with potential fees)? [Y/n]: Y
Paying Lightning invoice ...Exception: balance too low.

I think there's a mismatch between the wallet understanding I have a balance in some mint, and knowing to spend from the mint with balance.

A temp fix was to replace the default mint with the actual new mint in .env, so only it loaded in config and the wallet knew to spend from that mint.

nickfarrow avatar Jan 17 '24 03:01 nickfarrow

Hey there. Interesting bug. Could share your output for cashu balance -v please? I think it is trying to use the balance that is too low while you're trying to pay from another mint. It should have asked you (if you have a balance on more than one mint).

callebtc avatar Jan 23 '24 09:01 callebtc

Ahh man sorry for abandoning this one, i'm struggling to replicate..

Balance: 50 sat (pending: 0 sat) in 3 tokens

I think the workflow was something like:

  1. Try receive token, fail because wrong mint
  2. Add proper mint in .env
  3. Receive, then try send

I've also noticed since updating cashu, that the balances show for specific mints. Perhaps it has been fixed through this. Feel free to close until someone else ever runs into this!

nickfarrow avatar Mar 15 '24 14:03 nickfarrow