mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-27 02:37:08 +01:00
fix coin selection
This commit is contained in:
parent
e36338d903
commit
d0a95f5a69
2 changed files with 9 additions and 1 deletions
|
@ -447,8 +447,12 @@ namespace BTCPayServer.Tests
|
|||
s.Driver.FindElement(By.Id("advancedSettings")).Click();
|
||||
s.Driver.FindElement(By.Id("toggleInputSelection")).Click();
|
||||
s.Driver.WaitForElement(By.Id(spentOutpoint.ToString()));
|
||||
Assert.Equal("true", s.Driver.FindElement(By.Name("InputSelection")).GetAttribute("value").ToLowerInvariant());
|
||||
var el = s.Driver.FindElement(By.Id(spentOutpoint.ToString()));
|
||||
s.Driver.FindElement(By.Id(spentOutpoint.ToString())).Click();
|
||||
var inputSelectionSelect = s.Driver.FindElement(By.Name("SelectedInputs"));
|
||||
Assert.Equal(1, inputSelectionSelect.FindElements(By.CssSelector("[selected]")).Count);
|
||||
|
||||
var bob = new Key().PubKey.Hash.GetAddress(Network.RegTest);
|
||||
SetTransactionOutput(s, 0, bob, 0.3m);
|
||||
s.Driver.FindElement(By.Id("SendMenu")).Click();
|
||||
|
|
|
@ -179,7 +179,11 @@ $(function () {
|
|||
res.splice(this.selectedInputs.indexOf(item.outpoint),1);
|
||||
}
|
||||
|
||||
$("#SelectedInputs").val(res);
|
||||
$("select option").each(function(){
|
||||
var selected = res.indexOf($(this).attr("value")) !== -1;
|
||||
$(this).attr("selected",selected? "selected": null);
|
||||
});
|
||||
|
||||
this.selectedInputs = res;
|
||||
$(".crypto-balance-link").text(this.selectedAmount);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue