mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-02-23 15:14:49 +01:00
fix coin selection
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user