From 029fd49fe613cfd4cbd36e3ae7a49d1da1ab2d9c Mon Sep 17 00:00:00 2001 From: Mayank Date: Wed, 22 Apr 2020 20:07:57 +0530 Subject: [PATCH] channel management complete --- src/components/Channels/Channel.vue | 37 +++++++++++++++++++---------- src/components/Channels/Manage.vue | 26 ++++++++++++++++---- src/global-styles/custom.scss | 3 +++ src/store/modules/lightning.js | 10 ++++---- src/views/Lightning.vue | 2 +- 5 files changed, 55 insertions(+), 23 deletions(-) diff --git a/src/components/Channels/Channel.vue b/src/components/Channels/Channel.vue index bec2d1f..653f48b 100644 --- a/src/components/Channels/Channel.vue +++ b/src/components/Channels/Channel.vue @@ -4,11 +4,8 @@
- {{ getStatus(channel.type)['text'] }} -
+ {{ channel.status }} +
- {{ getStatus(channel.type)['text'] }} -
+ {{ channel.status }} +
{{ channel.isPrivate ? 'Private' : 'Public' }} Channel
-
+
Opened By {{ parseInt(channel.capacity).toLocaleString() }} Sats
-
+
Withdrawal Timelock
-
+
Close Channel
@@ -89,7 +95,7 @@

Are you sure you want to close this channel?

Your local channel balance of - {{ parseInt(channel.localBalance).toLocaleString() }} Sats will be returned to your Bitcoin wallet. + {{ parseInt(channel.localBalance).toLocaleString() }} Sats (excluding mining fee) will be returned to your Bitcoin wallet.

maxReceive) { @@ -227,7 +227,7 @@ const actions = { confirmedBalance += localBalance; } else if (channel.type === "PENDING_OPEN_CHANNEL") { pendingBalance += localBalance; - channel.status = "opening"; + channel.status = "Opening"; } else if ( [ "WAITING_CLOSING_CHANNEL", @@ -236,13 +236,13 @@ const actions = { ].indexOf(channel.type) > -1 ) { pendingBalance += localBalance; - channel.status = "closing"; + channel.status = "Closing"; // Lnd doesn't provide initiator or autopilot data via rpc. So, we just display a generic closing message. channel.name = "Closing Channel"; channel.purpose = "A channel that is in the process of closing"; } else { - channel.status = "unknown"; + channel.status = "Unknown"; } if (channel.name === "" && !channel.initiator) { diff --git a/src/views/Lightning.vue b/src/views/Lightning.vue index 81bdda3..cc49f92 100644 --- a/src/views/Lightning.vue +++ b/src/views/Lightning.vue @@ -105,7 +105,7 @@ - +