mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-01-19 05:33:31 +01:00
Allow more then 20 accounts when using BTCPayServer.Vault (#4430)
Closes #4410.
This commit is contained in:
parent
cdac238f6d
commit
e9deb13ce4
@ -25,7 +25,7 @@
|
|||||||
<div id="vault-status" class="mb-4"></div>
|
<div id="vault-status" class="mb-4"></div>
|
||||||
<div id="vault-xpub" class="mt-4" style="display:none;">
|
<div id="vault-xpub" class="mt-4" style="display:none;">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="addressType">Address type</label>
|
<label for="addressType" class="form-label">Address type</label>
|
||||||
<select id="addressType" name="addressType" class="form-select w-auto">
|
<select id="addressType" name="addressType" class="form-select w-auto">
|
||||||
<option value="segwit">Segwit (Recommended, cheapest fee)</option>
|
<option value="segwit">Segwit (Recommended, cheapest fee)</option>
|
||||||
<option value="segwitWrapped">Segwit wrapped (Compatible with old wallets)</option>
|
<option value="segwitWrapped">Segwit wrapped (Compatible with old wallets)</option>
|
||||||
@ -37,13 +37,8 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="accountNumber">Account</label>
|
<label for="accountNumber" class="form-label">Account</label>
|
||||||
<select id="accountNumber" name="accountNumber" class="form-select w-auto">
|
<input id="accountNumber" class="form-control" name="accountNumber" type="number" value="0" min="0" step="1" style="max-width:10ch;" />
|
||||||
@for (int i = 0; i < 20; i++)
|
|
||||||
{
|
|
||||||
<option value="@i">@i</option>
|
|
||||||
}
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
@ -245,6 +245,7 @@ var vaultui = (function () {
|
|||||||
return await self.askForXPubs();
|
return await self.askForXPubs();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
var selectedXPubs = await self.getXpubSettings();
|
var selectedXPubs = await self.getXpubSettings();
|
||||||
self.bridge.socket.send(JSON.stringify(selectedXPubs));
|
self.bridge.socket.send(JSON.stringify(selectedXPubs));
|
||||||
show(VaultFeedbacks.fetchingXpubs);
|
show(VaultFeedbacks.fetchingXpubs);
|
||||||
@ -257,6 +258,9 @@ var vaultui = (function () {
|
|||||||
show(VaultFeedbacks.fetchedXpubs);
|
show(VaultFeedbacks.fetchedXpubs);
|
||||||
self.xpub = json;
|
self.xpub = json;
|
||||||
return true;
|
return true;
|
||||||
|
} catch (err) {
|
||||||
|
showError({ error: true, message: err });
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -273,10 +277,13 @@ var vaultui = (function () {
|
|||||||
$("#vault-xpub").css("display", "none");
|
$("#vault-xpub").css("display", "none");
|
||||||
$("#vault-confirm").css("display", "none");
|
$("#vault-confirm").css("display", "none");
|
||||||
$(this).unbind();
|
$(this).unbind();
|
||||||
resolve({
|
const addressType = $("select[name=\"addressType\"]").val();
|
||||||
addressType: $("select[name=\"addressType\"]").val(),
|
const accountNumber = parseInt($("input[name=\"accountNumber\"]").val());
|
||||||
accountNumber: parseInt($("select[name=\"accountNumber\"]").val())
|
if (addressType && !isNaN(accountNumber)) {
|
||||||
});
|
resolve({ addressType, accountNumber });
|
||||||
|
} else {
|
||||||
|
reject("Provide an address type and account number")
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user