From 9313095b1671c4bc102823c1f1854509f373abfa Mon Sep 17 00:00:00 2001 From: Vladimir Grichina Date: Mon, 18 May 2020 19:11:56 -0700 Subject: [PATCH] More lint fixes --- middleware/ledger.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/middleware/ledger.js b/middleware/ledger.js index 538e06ed..a4757cd1 100644 --- a/middleware/ledger.js +++ b/middleware/ledger.js @@ -1,4 +1,4 @@ -const { Signer, utils: { PublicKey, key_pair: { KeyType } } } = require('near-api-js'); +const { utils: { PublicKey, key_pair: { KeyType } } } = require('near-api-js'); const { createClient } = require('near-ledger-js'); const { default: TransportNodeHid } = require('@ledgerhq/hw-transport-node-hid'); @@ -23,15 +23,15 @@ module.exports = async function useLedgerSigner({ useLedger, hdKeyPath, newHdKey let cachedPublicKey; let signer = { - async getPublicKey(accountId, networkId) { + async getPublicKey() { // NOTE: Public key is cached to avoid confirming on Ledger multiple times if (!cachedPublicKey) { cachedPublicKey = await getPublicKeyForPath(hdKeyPath); } return cachedPublicKey; }, - async signMessage(message, accountId, networkId) { - const publicKey = await this.getPublicKey(accountId, networkId); + async signMessage(message) { + const publicKey = await this.getPublicKey(); console.log('Waiting for confirmation on Ledger...'); const signature = await client.sign(message); return { signature, publicKey };