-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question to FAILED_LOW_FEE and Sweep #3
Comments
This is total banans. Just figured out that the following amounts dont work: whyever the ... this is.... ?!?!? |
The WoS API doesn't behave logically and since they're closed source I unfortunately can't really explain why.
That seems really absurd. How do you replicate this? Create an invoice for I'd be curious to see what the WoS app itself is doing to pay invoices of those amounts. |
Yes, but not via invoice but instead via the [email protected] way, that you have provided some time ago in this issue. Let me know, if you were able to replicate it.
Sending these amounts via the app works somehow |
127 satoshis also doesnt work |
Okay, I guess I've figured it out partly: |
I tested paying from a Here's what I did: ctx, cancel := context.WithCancel(context.Background())
defer cancel()
creds1 := &Credentials{
APISecret: "xxxxxxxxxxxxxxxx",
APIToken: "xxxxxxxxxxxxxxxx",
}
wallet1, err := creds1.OpenWallet(ctx, nil)
if err != nil {
t.Fatal(err)
}
bal1, err := wallet1.Balance(ctx)
if err != nil {
t.Fatal(err)
}
jsonPrint("bal1", bal1)
addr1, err := ParseLightningAddress("[email protected]")
if err != nil {
t.Fatal(err)
}
p1, err := wallet1.PayLightningAddress(ctx, addr1, "", 0.00000048)
if err != nil {
t.Fatal(err)
} The payments worked, though oddly i didn't always receive the exact correct amounts on the other side. This might be due to the fact that the WoS API uses floating point numbers to represent amounts, instead of integers with guaranteed precision. So far that's my only theory as to why this is happening. |
I have an explanation for the imprecise payment amounts. The walletofsatoshi API uses integers with millisat amounts when paying a lightning address, but floating point numbers everywhere else. Perhaps the floating point conversion from BTC to millisat amounts (inside my golang code) is causing problems for you. On my side, it seems to result in situations where I say "Pay 127 sats" but the receiver actually gets I suppose the easy solution here is to simply change the |
That's all it does - The |
@eliaspfeffer See #4 |
When sending normal amounts via Lightning, I sometimes get the FAILED_LOW_FEE error. Sometimes I can work around it by splitting the amount I originally wanted to send into smaller amounts and always when I have 1 Satoshi left, then I cant continue sending this 1 remaining satoshi, except of when I sweep the lightning wallet.
So first question: Why does the FAILED_LOW_FEE error even exist? Doesnt make sense, as wos probably has their nodes running all in one node anyways
Second question: Does someone know how you can always avoid the FAILED_LOW_FEE error? I have tried doubling the minimum balance of 1 Sat per failed sending approach, but this only sometimes work. Sometimes it doesnt work for an entire day, no matter what I try. Most of the times it doesnt work, when I dont have big liquidity in the wallet (less than 1E-4 Btc)
Third question: What does sweeping actually do except of sending the entire amount (including the normally minimum 1 Sat per wallet)? I've tested if the wallet can receive sats again. Answer: yes. So does it do anything else than what I've mentioned? Is it a good idea to always use the sweeping mechanism, when sending between wallets, when I then can send it back anyways? Or will the wallet maybe get deactivated in future or what?
https://github.com/conduition/wos/blob/73f3eda457047fb995de7c3100eb19086f11560c/wallet.go#L526C23-L526C37
The text was updated successfully, but these errors were encountered: