bitcoin methods tidy up
This commit is contained in:
parent
f846a7b06c
commit
d49ea51720
2 changed files with 1 additions and 6 deletions
|
|
@ -34,15 +34,12 @@ class BitcoinMethodCheckboxes {
|
||||||
this.parentElement.appendChild(this.lightningContainer);
|
this.parentElement.appendChild(this.lightningContainer);
|
||||||
}
|
}
|
||||||
|
|
||||||
buildCheckbox({ id, label }) {
|
buildCheckbox({ label }) {
|
||||||
const checkboxContainer = document.createElement('div');
|
const checkboxContainer = document.createElement('div');
|
||||||
checkboxContainer.className = 'checkbox-row';
|
checkboxContainer.className = 'checkbox-row';
|
||||||
checkboxContainer.id = `${id}-checkbox-area`;
|
|
||||||
|
|
||||||
const checkbox = document.createElement('input');
|
const checkbox = document.createElement('input');
|
||||||
checkbox.type = 'checkbox';
|
checkbox.type = 'checkbox';
|
||||||
checkbox.name = id;
|
|
||||||
checkbox.id = `${id}-checkbox`;
|
|
||||||
checkbox.checked = true;
|
checkbox.checked = true;
|
||||||
|
|
||||||
const labelElement = document.createElement('label');
|
const labelElement = document.createElement('label');
|
||||||
|
|
@ -60,7 +57,6 @@ class BitcoinMethodCheckboxes {
|
||||||
this.onchainCheckboxElement,
|
this.onchainCheckboxElement,
|
||||||
this.lightningCheckboxElement,
|
this.lightningCheckboxElement,
|
||||||
].filter((cb) => cb.checked).length;
|
].filter((cb) => cb.checked).length;
|
||||||
console.log(checkedCount);
|
|
||||||
if (checkedCount === 0) {
|
if (checkedCount === 0) {
|
||||||
clickedCheckbox.checked = true;
|
clickedCheckbox.checked = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,6 @@ class CreateOfferModal {
|
||||||
onClickCallback: async () => {
|
onClickCallback: async () => {
|
||||||
await this.createOffer();
|
await this.createOffer();
|
||||||
await this.onCreationCallback();
|
await this.onCreationCallback();
|
||||||
await this.toggleOfferCreatedAlert();
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
this.publishOfferButton.render();
|
this.publishOfferButton.render();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue