prettify
This commit is contained in:
parent
9e37581f79
commit
ceccbb0df3
@ -100,7 +100,7 @@ export async function displayEmojis(text: string) {
|
||||
|
||||
// Verify Other address
|
||||
export function initAddressInput() {
|
||||
const container = getCorrectDOM('login-4nk-component') as HTMLElement;
|
||||
const container = getCorrectDOM('login-4nk-component') as HTMLElement
|
||||
const addressInput = container.querySelector('#addressInput') as HTMLInputElement;
|
||||
const emojiDisplay = container.querySelector('#emoji-display-2');
|
||||
const okButton = container.querySelector('#okButton') as HTMLButtonElement;
|
||||
@ -148,13 +148,13 @@ export function initAddressInput() {
|
||||
}
|
||||
|
||||
async function onOkButtonClick() {
|
||||
const container = getCorrectDOM('login-4nk-component') as HTMLElement;
|
||||
const container = getCorrectDOM('login-4nk-component') as HTMLElement
|
||||
const secondDeviceAddress = (container.querySelector('#addressInput') as HTMLInputElement).value;
|
||||
try {
|
||||
// Connect to target, if necessary
|
||||
await prepareAndSendPairingTx(secondDeviceAddress);
|
||||
} catch (e) {
|
||||
console.error(`onOkButtonClick error: ${e}`);
|
||||
console.error(`onOkButtonClick error: ${e}`);
|
||||
}
|
||||
}
|
||||
|
||||
@ -184,7 +184,7 @@ export async function prepareAndSendPairingTx(secondDeviceAddress: string) {
|
||||
|
||||
export async function generateQRCode(spAddress: string) {
|
||||
try {
|
||||
const container = getCorrectDOM('login-4nk-component') as HTMLElement;
|
||||
const container = getCorrectDOM('login-4nk-component') as HTMLElement
|
||||
const currentUrl = 'https://' + window.location.host;
|
||||
const url = await QRCode.toDataURL(currentUrl + '?sp_address=' + spAddress);
|
||||
const qrCode = container?.querySelector('.qr-code img');
|
||||
|
Loading…
x
Reference in New Issue
Block a user