Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Inform ledger when Add Funds modal is closed
Browse files Browse the repository at this point in the history
Fix #3621

Auditors: @mrose17
  • Loading branch information
diracdeltas committed Sep 8, 2016
1 parent bb2e557 commit 66a08b4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/ledger.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ if (ipc) {
}
}
})

ipc.on(messages.ADD_FUNDS_CLOSED, () => {
// TODO
})
}

/*
Expand Down
4 changes: 4 additions & 0 deletions js/about/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -1250,6 +1250,10 @@ class AboutPreferences extends React.Component {
stateDiff['bitcoinOverlayVisible'] = false
}
this.setState(stateDiff)
// Tell ledger when Add Funds overlay is closed
if (isVisible === false && overlayName === 'addFunds') {
ipc.send(messages.ADD_FUNDS_CLOSED)
}
}

render () {
Expand Down
3 changes: 2 additions & 1 deletion js/constants/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ const messages = {
LEDGER_PUBLISHER: _,
LEDGER_UPDATED: _,
LEDGER_CREATE_WALLET: _,
CHECK_BITCOIN_HANDLER: _
CHECK_BITCOIN_HANDLER: _,
ADD_FUNDS_CLOSED: _
}

module.exports = mapValuesByKeys(messages)

1 comment on commit 66a08b4

@mrose17
Copy link
Member

@mrose17 mrose17 commented on 66a08b4 Sep 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! thanks!

Please sign in to comment.