Closed callebtc closed 10 months ago
The code in cashu-ts runs as per protocol, but it is not so straight forward to follow why. I think it would make sense to implement it in the way @callebtc proposed.
Right now:
0 -> -Infinity
this works because -infinity will be smaller than 0 and we won't enter the loop. So 0 messages get created
1 -> 0
which equates to falsy and thus we return 1 and create one message
changing to the code proposed would make it easier to understand what's happening
changing to the code proposed would make it easier to understand what's happening
We have a test and its works soo.... 😜😅
changing to the code proposed would make it easier to understand what's happening
We have a test and its works soo.... 😜😅
Never argue with JS! 🫨
changing to the code proposed would make it easier to understand what's happening
We have a test and its works soo.... 😜😅
Never argue with JS! 🫨
Never argue with my tests
If the fee reserve is
0 sat
, the log will fail. Therefore