-
Notifications
You must be signed in to change notification settings - Fork 44
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
Open/close channel txid show instead of success #1867
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Above
Sure but, closechannel returns a list of transactions since it closes multiple channels.
Correct but I'm lost here, a little help would be awesome as I mentioned in the third element in my PR description. @raladev @sangaman |
Imo fine as is. |
Yes, we can and should. |
Let me know when I can implement it please @erkarl, also @sangaman could you please help me with showing txid for lnd grpc openchannel call, I'm really confused there. |
If these two are done, good from my side |
Still having issue with:
:( |
@rsercano u need to convert this base64 string to hex format
base64 -> bytes -> hex in python:
|
it seems that connext client is returning txid for withdraw(closechannel) call @rsercano |
Oh yes, that should work in this PR if not the case yet. |
@@ -780,7 +780,8 @@ class LndClient extends SwapClient { | |||
await this.connectPeerAddresses(uris); | |||
} | |||
|
|||
await this.openChannelSync(remoteIdentifier, units, pushUnits); | |||
const openResponse = await this.openChannelSync(remoteIdentifier, units, pushUnits); | |||
return openResponse.hasFundingTxidStr() ? openResponse.getFundingTxidStr() : base64ToHex(openResponse.getFundingTxidBytes_asB64()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this ternary statement here? I think just return base64ToHex(openResponse.getFundingTxidBytes_asB64())
is enough to keep things simple. Might be worth tidying up but I don't think it's necessarily worth holding up the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the documentation this's the field that actually should have transaction id, so I thought it would worth to check it with this statement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which documentation?
|
15c61db
to
0669a3f
Compare
Done. Btw in spots like this the trick I've learned is to do Are you able to run one more quick check @raladev ? I can give it a quick manual test too later today. |
Thank you @sangaman |
attempts to resolve #1860
Unfortunately I couldn't test connext even I implemented open channel response for txhash, because my connext somehow returns 500 always :(
Connext closechannel (withdraw) doesn't return a tx hash, so I returned an empty array and added a TODO to this part, let me know if that's not correct.
Finally lnd swap client doesn't return tx id for me instead it returns https://github.com/lightningnetwork/lnd/blob/3ae46d81f4a2edad06ef778b2940d9b06386d93b/lnrpc/rpc.proto#L779 so I used it and converted it to object and then to string (https://github.com/ExchangeUnion/xud/compare/openclosechannel-txid-show?expand=1#diff-f1d7503e017b27e9c93329057cd73f05R784), not sure if that's the correct way, please let me know. But no worries if it returns tx id string I print it instead of converting bytes.