-
Notifications
You must be signed in to change notification settings - Fork 106
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
eth: locked funds remain after match revoke #1460
Comments
I'll take a look. |
I noticed that the |
That makes sense. Another issue I see is that on the last call to |
I'm pretty sure that 0.126 you see there is just a gas fee, if you mine another block it will go away. I saw the same amount there even after a successful swap. In the balance function, pending outgoing transactions are treated as locked: dcrdex/client/asset/eth/eth.go Line 382 in 8e22b7f
Shouldn't this just be subtracted from available but not part of locked? |
Hmm, that is odd. When swaps are sent, we account for those funds-in-limbo at the higher level in I think the intent may have been this: diff --git a/client/asset/eth/eth.go b/client/asset/eth/eth.go
index 67c1c74c..37b30165 100644
--- a/client/asset/eth/eth.go
+++ b/client/asset/eth/eth.go
@@ -370,9 +370,9 @@ func (eth *ExchangeWallet) balance() (*asset.Balance, error) {
return nil, err
}
- locked := eth.locked + eth.redemptionReserve + dexeth.WeiToGwei(bal.PendingOut)
+ locked := eth.locked + eth.redemptionReserve
return &asset.Balance{
- Available: dexeth.WeiToGwei(bal.Current) - locked,
+ Available: dexeth.WeiToGwei(bal.Current) - locked - dexeth.WeiToGwei(bal.PendingOut),
Locked: locked,
Immature: dexeth.WeiToGwei(bal.PendingIn),
}, nil This reminds me that the |
The locked funds are off by a small amount after refunding or any failed swap. Here after a refund. It fixes itself on dexc restart.

Originally posted by @JoeGruffins in #1455 (comment)
The text was updated successfully, but these errors were encountered: