Open kilrau opened 4 years ago
For example funds from this failed swap don't show anywhere in xud:
lndbtc:
"pending_htlcs": [
{
"incoming": true,
"amount": "10000",
"hash_lock": "928a7b6caf95b590b78db560db427dd6731a2f208c11b394ede420599ba3e927",
"expiration_height": 640526
}
],
connext:
bash-5.0# curl -H 'Content-Type: application/json' http://0.0.0.0:5040/hashlock-status/0x928a7b6caf95b590b78db560db427dd6731a2f208c11b394ede420599ba3e927/0x0000000000000000000000000000000000000000 | jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 438 100 438 0 0 863 0 --:--:-- --:--:-- --:--:-- 863
{
"senderIdentifier": "indraABC",
"receiverIdentifier": "indraABC",
"assetId": "0x0000000000000000000000000000000000000000",
"amount": "100000000000000",
"lockHash": "0x928a7b6caf95b590b78db560db427dd6731a2f208c11b394ede420599ba3e927",
"status": "PENDING",
"preImage": "0x0000000000000000000000000000000000000000000000000000000000000000",
"expiry": "10517875"
}
Getting the amount of funds locked up via /hashlock-status
endpoint might not be the best solution because of the complexity it adds on xud level to track the payments. Perhaps connext client can consider displaying this information in the response of /balance
endpoint? Or a more general /getinfo
endpoint?
Agree. Wdyt? @ArjunBhuptani
Also, currently the connext client doesn't seem to account for funds locked in an htlc. The balance reported is still the same. We propose to add 4 different balances to the connext client (either in one /balance
endpoint or 4 different endpoints ):
Moved this to P2 since we are depending on changes from connext side: https://github.com/connext/rest-api-client/issues/66
Follow-up of https://github.com/ExchangeUnion/xud/pull/1680, needed for https://github.com/ExchangeUnion/xud/issues/1673: since we now treat a swap as atomically completed upon reaching
PreimageResolved
from maker's perspective, we should show balance that is currently in swap recovery with xud trying to claim the htlc but still didn't manage to do so (and might go on-chain at some point) aspending
ingetbalance
.In other words: in addition to new pending channels, any balance in pending htlc should show as
pending
undergetbalance
.Currently this balance isn't shown anywhere and the user would see a successfully completed swap, deducted outgoing asset balance, but nothing added for the incoming asset's balance (where is my money?).