Browse Source
fix: honour currency when opening channel
Ensure that the currently active unit of account is honoured when
opening a new channel.
Fix #523
Also see #604
renovate/lint-staged-8.x
Tom Kirkpatrick
7 years ago
No known key found for this signature in database
GPG Key ID: 72203A8EC5967EA8
1 changed files with
3 additions and
2 deletions
-
app/reducers/channels.js
|
@ -183,8 +183,9 @@ export const receiveChannels = (event, { channels, pendingChannels }) => dispatc |
|
|
dispatch({ type: RECEIVE_CHANNELS, channels, pendingChannels }) |
|
|
dispatch({ type: RECEIVE_CHANNELS, channels, pendingChannels }) |
|
|
|
|
|
|
|
|
// Send IPC event for opening a channel
|
|
|
// Send IPC event for opening a channel
|
|
|
export const openChannel = ({ pubkey, host, local_amt }) => dispatch => { |
|
|
export const openChannel = ({ pubkey, host, local_amt }) => (dispatch, getState) => { |
|
|
const localamt = btc.btcToSatoshis(local_amt) |
|
|
const state = getState() |
|
|
|
|
|
const localamt = btc.convert(state.ticker.currency, 'sats', local_amt) |
|
|
|
|
|
|
|
|
dispatch(openingChannel()) |
|
|
dispatch(openingChannel()) |
|
|
dispatch(addLoadingPubkey(pubkey)) |
|
|
dispatch(addLoadingPubkey(pubkey)) |
|
|