diff --git a/app/components/Home/WalletLauncher.js b/app/components/Home/WalletLauncher.js index 9a02d251..fa18f2ff 100644 --- a/app/components/Home/WalletLauncher.js +++ b/app/components/Home/WalletLauncher.js @@ -46,7 +46,7 @@ class WalletLauncher extends React.Component { walletName = wallet => { if (wallet.type === 'local') { - return wallet.alias || `Wallet #${wallet.id}` + return wallet.name || `Wallet #${wallet.id}` } return wallet.host.split(':')[0] } diff --git a/app/components/Home/WalletUnlocker.js b/app/components/Home/WalletUnlocker.js index 650bb1df..b9ee6080 100644 --- a/app/components/Home/WalletUnlocker.js +++ b/app/components/Home/WalletUnlocker.js @@ -76,7 +76,7 @@ class WalletUnlocker extends React.Component { walletName = wallet => { if (wallet.type === 'local') { - return wallet.alias || `Wallet #${wallet.id}` + return wallet.name || `Wallet #${wallet.id}` } return wallet.host.split(':')[0] } diff --git a/app/components/Home/WalletsMenu.js b/app/components/Home/WalletsMenu.js index 69980abe..f5e0ce28 100644 --- a/app/components/Home/WalletsMenu.js +++ b/app/components/Home/WalletsMenu.js @@ -6,7 +6,7 @@ import { Text, Truncate } from 'components/UI' const walletName = wallet => { if (wallet.type === 'local') { - return wallet.alias || `Wallet #${wallet.id}` + return wallet.name || `Wallet #${wallet.id}` } return wallet.host.split(':')[0] } diff --git a/app/lib/lnd/config.js b/app/lib/lnd/config.js index c2b9b633..1db2066f 100644 --- a/app/lib/lnd/config.js +++ b/app/lib/lnd/config.js @@ -30,6 +30,7 @@ export const networks = { // Type definition for for local connection settings. type LndConfigSettingsLocalType = {| + name?: string, alias?: string, autopilot?: boolean, autopilotMaxchannels?: number, @@ -42,6 +43,7 @@ type LndConfigSettingsLocalType = {| // Type definition for for custom connection settings. type LndConfigSettingsCustomType = {| + name?: string, host: string, cert: string, macaroon: string @@ -49,6 +51,7 @@ type LndConfigSettingsCustomType = {| // Type definition for for BTCPay Server connection settings. type LndConfigSettingsBtcPayServerType = {| + name?: string, string: string, host: string, macaroon: string @@ -90,6 +93,7 @@ const safeUntildify = (val: ?T): ?T => (typeof val === 'string' ? untildify(v class LndConfig { static SETTINGS_PROPS = { local: [ + 'name', 'alias', 'autopilot', 'autopilotMaxchannels', @@ -99,11 +103,12 @@ class LndConfig { 'autopilotPrivate', 'autopilotMinconfs' ], - custom: ['host', 'cert', 'macaroon'], - btcpayserver: ['host', 'macaroon', 'string'] + custom: ['name', 'host', 'cert', 'macaroon'], + btcpayserver: ['name', 'host', 'macaroon', 'string'] } static SETTINGS_DEFAULTS = { + name: null, autopilot: true, autopilotMaxchannels: 5, autopilotMinchansize: 20000, @@ -124,6 +129,7 @@ class LndConfig { cert: ?string macaroon: ?string string: ?string + name: ?string alias: ?string autopilot: ?boolean autopilotMaxchannels: ?number