${translate("transpage.tchange1")}
${this.txInfo}
this.decline(e)} dialog-dismiss>${translate("transpage.tchange2")}
this.confirm(e)} dialog-confirm autofocus>${translate("transpage.tchange3")}
`
}
firstUpdated() {
// ...
}
requestTransaction(transaction) {
this.shadowRoot.getElementById('confirmDialog').open()
this.transaction = transaction
this.txInfo = transaction.render(html)
return new Promise((resolve, reject) => {
this._resolve = resolve
this._reject = reject
})
}
confirm(e) {
this._resolve({
success: true
})
}
decline(e) {
const rejecterror = get("transactions.declined")
this._reject(new Error(rejecterror))
}
stateChanged(state) {
this.loggedIn = state.app.loggedIn
}
}
window.customElements.define('confirm-transaction-dialog', ConfirmTransactionDialog)
const txDialog = document.createElement('confirm-transaction-dialog')
export const requestTransactionDialog = document.body.appendChild(txDialog)