-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Payjoin: Better UIH1 & UIH2 based selection #1473
Payjoin: Better UIH1 & UIH2 based selection #1473
Conversation
00195df
to
d2b7995
Compare
cfcd8b0
to
d359c98
Compare
psbt.Outputs.Where(o => o.Index != output.Index).Select(o => o.Value).ToArray())) | ||
|
||
foreach (var utxo in (await SelectUTXO(network, utxos, psbt.Inputs.Select(input => input.WitnessUtxo.Value.ToDecimal(MoneyUnit.BTC)), output.Value.ToDecimal(MoneyUnit.BTC), | ||
psbt.Outputs.Where(psbtOutput => psbtOutput != output).Select(psbtOutput => psbtOutput.Value.ToDecimal(MoneyUnit.BTC)))).selectedUTXO) |
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.
why do you even change this? psbtOutput => psbtOutput != output
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.
the params separate the payment output from the others to compute what the modified payment output value will be
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.
I know but before I was comparing the index, why did you modified to compare the object?
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.
ah, no clue why. Does it make a difference?
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.
reverted back t yours
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.
I don't think so, but I had a doubt that I override the .Equals
(which was a bad idea), I prefer not touching what does not break.
closes #1470
I need to add some tests.