From 01dc847515f81b3e29d2ecfe51e8b888db3cf063 Mon Sep 17 00:00:00 2001 From: Jack Mallers Date: Sat, 11 Nov 2017 12:07:03 -0600 Subject: [PATCH] fix(pending channel): fix pending channel styles --- app/components/Channels/OpenPendingChannel.js | 2 +- .../Channels/OpenPendingChannel.scss | 4 ++-- app/reducers/channels.js | 19 +++++++++++++++++-- app/routes/channels/components/Channels.js | 2 ++ 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/app/components/Channels/OpenPendingChannel.js b/app/components/Channels/OpenPendingChannel.js index f83054b3..d833d5b9 100644 --- a/app/components/Channels/OpenPendingChannel.js +++ b/app/components/Channels/OpenPendingChannel.js @@ -6,7 +6,7 @@ import styles from './OpenPendingChannel.scss' const OpenPendingChannel = ({ ticker, channel: { channel }, currentTicker, explorerLinkBase }) => (
  • shell.openExternal(`${explorerLinkBase}/tx/${channel.channel_point.split(':')[0]}`)}> -

    Status: Pending

    +

    Pending

    Remote Pubkey diff --git a/app/components/Channels/OpenPendingChannel.scss b/app/components/Channels/OpenPendingChannel.scss index 2308a785..a191915e 100644 --- a/app/components/Channels/OpenPendingChannel.scss +++ b/app/components/Channels/OpenPendingChannel.scss @@ -2,7 +2,7 @@ .channel { position: relative; - background: $white; + background: $lightgrey; padding: 10px; display: flex; flex-direction: row; @@ -13,7 +13,7 @@ opacity: 0.5; .pending { - color: $green; + color: $main; position: absolute; top: 0; left: 10px; diff --git a/app/reducers/channels.js b/app/reducers/channels.js index 57309216..48f1420f 100644 --- a/app/reducers/channels.js +++ b/app/reducers/channels.js @@ -190,7 +190,7 @@ const ACTION_HANDLERS = { [GET_CHANNELS]: state => ({ ...state, channelsLoading: true }), [RECEIVE_CHANNELS]: (state, { channels, pendingChannels }) => ( - { ...state, channelsLoading: false, channels, pendingChannels } + { ...state, channelsLoading: false, channels, pendingChannels: state.pendingChannels } ), [OPENING_CHANNEL]: state => ({ ...state, openingChannel: true }), @@ -248,7 +248,22 @@ const initialState = { channels: [], pendingChannels: { total_limbo_balance: '', - pending_open_channels: [], + pending_open_channels: [ + { + "channel": { + "remote_node_pub": "0368b02d9e4a44bb156660cf48ed7492445c7cb95435c86125e74953047c7706e3", + "channel_point": "01de1cddaf47637b71c37e019f42746aa1135351a4e4539d983ca95f12049a82:0", + "capacity": "16777216", + "local_balance": "16768528", + "remote_balance": "0" + }, + "confirmation_height": 0, + "blocks_till_open": 0, + "commit_fee": "8688", + "commit_weight": "600", + "fee_per_kw": "12000" + } + ], pending_closing_channels: [], pending_force_closing_channels: [] }, diff --git a/app/routes/channels/components/Channels.js b/app/routes/channels/components/Channels.js index 0f6dcb63..312ed5a1 100644 --- a/app/routes/channels/components/Channels.js +++ b/app/routes/channels/components/Channels.js @@ -41,6 +41,8 @@ class Channels extends Component { setCurrentChannel } = this.props + console.log('allChannels: ', allChannels) + return (