From 4665e9332be6983035253edccadb4b1ce22ec9a1 Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Sun, 10 Jan 2021 09:33:30 -0400 Subject: [PATCH] use types from common --- utils/lightningServices/types.ts | 32 -------------------------------- utils/lightningServices/v2.js | 6 +----- 2 files changed, 1 insertion(+), 37 deletions(-) diff --git a/utils/lightningServices/types.ts b/utils/lightningServices/types.ts index 6e3c2f33..4b8b5781 100644 --- a/utils/lightningServices/types.ts +++ b/utils/lightningServices/types.ts @@ -131,35 +131,3 @@ export interface Services { walletUnlocker: Record router: Record } - -export interface Utxo { - /** - * The type of address. - */ - address_type: unknown - - /** - * The address. - */ - address: string - - /** - * The value of the unspent coin in satoshis. - */ - amount_sat: number - - /** - * The pkscript in hex. - */ - pk_script: string - - /** - * The outpoint in format txid:n. - */ - outpoint: unknown - - /** - * The number of confirmations for the Utxo. - */ - confirmations: number -} diff --git a/utils/lightningServices/v2.js b/utils/lightningServices/v2.js index bda5f6ee..e9d5d0cc 100644 --- a/utils/lightningServices/v2.js +++ b/utils/lightningServices/v2.js @@ -420,14 +420,10 @@ const newAddress = (type = 0) => { }) } -/** - * @typedef {import('./types').Utxo} Utxo - */ - /** * @param {number} minConfs * @param {number} maxConfs - * @returns {Promise} + * @returns {Promise} */ const listUnspent = (minConfs = 3, maxConfs = 6) => Common.makePromise((res, rej) => {