From edd800d3825820dc6ce626491f796ef2ff2558a1 Mon Sep 17 00:00:00 2001 From: sachaaaaa Date: Wed, 7 Aug 2019 17:41:17 +1000 Subject: [PATCH] Make linter happy --- app/sql.js | 23 ++++++++++++++++------- libtextsecure/account_manager.js | 1 - 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/app/sql.js b/app/sql.js index 7d151169f..8911ce294 100644 --- a/app/sql.js +++ b/app/sql.js @@ -775,9 +775,7 @@ async function updateSchema(instance) { await updateLokiSchema(instance); } -const LOKI_SCHEMA_VERSIONS = [ - updateToLokiSchemaVersion2, -]; +const LOKI_SCHEMA_VERSIONS = [updateToLokiSchemaVersion2]; async function updateToLokiSchemaVersion2(currentVersion, instance) { if (currentVersion >= 2) { @@ -808,7 +806,9 @@ async function updateToLokiSchemaVersion2(currentVersion, instance) { } async function updateLokiSchema(instance) { - const result = await instance.get("SELECT name FROM sqlite_master WHERE type = 'table' AND name='loki_schema'"); + const result = await instance.get( + "SELECT name FROM sqlite_master WHERE type = 'table' AND name='loki_schema'" + ); if (!result) { await createLokiSchemaTable(instance); } @@ -818,7 +818,11 @@ async function updateLokiSchema(instance) { `Current loki schema version: ${lokiSchemaVersion};`, `Most recent schema version: ${LOKI_SCHEMA_VERSIONS.length};` ); - for (let index = 0, max = LOKI_SCHEMA_VERSIONS.length; index < max; index += 1) { + for ( + let index = 0, max = LOKI_SCHEMA_VERSIONS.length; + index < max; + index += 1 + ) { const runSchemaUpdate = LOKI_SCHEMA_VERSIONS[index]; // Yes, we really want to do this asynchronously, in order @@ -828,7 +832,9 @@ async function updateLokiSchema(instance) { } async function getLokiSchemaVersion(instance) { - const result = await instance.get('SELECT version FROM loki_schema WHERE version = (SELECT MAX(version) FROM loki_schema);'); + const result = await instance.get( + 'SELECT version FROM loki_schema WHERE version = (SELECT MAX(version) FROM loki_schema);' + ); if (!result.version) { return 0; } @@ -1237,7 +1243,10 @@ async function getPairingAuthorisation(issuerPubKey, secondaryDevicePubKey) { async function createOrUpdatePairingAuthorisation(data) { const { issuerPubKey, secondaryDevicePubKey, signature } = data; - const existing = await getPairingAuthorisation(issuerPubKey, secondaryDevicePubKey); + const existing = await getPairingAuthorisation( + issuerPubKey, + secondaryDevicePubKey + ); // prevent adding duplicate entries if (existing) { return; diff --git a/libtextsecure/account_manager.js b/libtextsecure/account_manager.js index 7ad16c766..11a6b6d6f 100644 --- a/libtextsecure/account_manager.js +++ b/libtextsecure/account_manager.js @@ -3,7 +3,6 @@ textsecure, libsignal, libloki, - Whisper, mnemonic, btoa, Signal,