Ask for a destination only when sats are sent
This commit is contained in:
1 parent
4d1dbb8c49
commit
3070d57868
1 file changed
+9
@@ -345,6 +345,15 @@
|
|||||||
if (!spec.to) {
|
if (!spec.to) {
|
||||||
Skuld.setFieldValue("to_market", "");
|
Skuld.setFieldValue("to_market", "");
|
||||||
}
|
}
|
||||||
|
// An empty destination is a withdrawal, and only kroner can be withdrawn
|
||||||
|
// (docs/spec.md section 3.11).
|
||||||
|
var destination = document.querySelector('[name="to_market"]');
|
||||||
|
var kroner = Skuld.fieldValue("leg_out_currency") === "nok";
|
||||||
|
destination.required = Boolean(spec.to) && !kroner;
|
||||||
|
var destinationHint = document.querySelector("[data-destination-hint]");
|
||||||
|
if (destinationHint) {
|
||||||
|
destinationHint.hidden = !spec.to || !kroner;
|
||||||
|
}
|
||||||
|
|
||||||
group("market").hidden = !spec.market;
|
group("market").hidden = !spec.market;
|
||||||
var marketSelect = document.querySelector('[name="market_id"]');
|
var marketSelect = document.querySelector('[name="market_id"]');
|
||||||
|
|||||||
Reference in new issue
Block a user