feat: populate external outputs in lwk#505
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
77a1c04 to
c55bd8d
Compare
| if maybeOutput == nil { | ||
| if address := output.UnconfidentialAddress(convertNetwork(w.backend.cfg.Network)); address != nil { | ||
| result.Address = (*address).String() | ||
| } | ||
| if amount := output.Value(); amount != nil { | ||
| result.Amount = *amount | ||
| } | ||
| } else { | ||
| result.Address = (*maybeOutput).Address().String() | ||
| result.Amount = (*maybeOutput).Unblinded().Value() | ||
| result.IsOurAddress = true |
There was a problem hiding this comment.
How should we treat non L-BTC outputs?
There was a problem hiding this comment.
Have them amount 0? We only wanna deal with BTC
| require.True(t, slices.ContainsFunc(tx.Outputs, func(o onchain.TransactionOutput) bool { | ||
| return o.Address == addressInfo.Address | ||
| })) | ||
| fee := int64(tx.Outputs[len(tx.Outputs)-1].Amount) |
There was a problem hiding this comment.
Checking for the script pubkey having 0 length would be more robust
No description provided.