mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
connected wallet view dropdown button with real data
This commit is contained in:
parent
53c91591b3
commit
a3f96951c2
@ -11,7 +11,6 @@ const selectors = require('../selectors')
|
||||
module.exports = connect(mapStateToProps, mapDispatchToProps)(WalletView)
|
||||
|
||||
function mapStateToProps (state) {
|
||||
|
||||
return {
|
||||
network: state.metamask.network,
|
||||
sidebarOpen: state.appState.sidebarOpen,
|
||||
@ -25,8 +24,8 @@ function mapStateToProps (state) {
|
||||
|
||||
function mapDispatchToProps (dispatch) {
|
||||
return {
|
||||
showSendPage: () => {dispatch(actions.showSendPage())},
|
||||
hideSidebar: () => {dispatch(actions.hideSidebar())},
|
||||
showSendPage: () => { dispatch(actions.showSendPage()) },
|
||||
hideSidebar: () => { dispatch(actions.hideSidebar()) },
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,7 +37,7 @@ function WalletView () {
|
||||
const noop = () => {}
|
||||
|
||||
WalletView.prototype.render = function () {
|
||||
const { network, responsiveDisplayClassname, style, identities, selectedAddress } = this.props
|
||||
const { network, responsiveDisplayClassname, style, identities, selectedAddress, selectedIdentity } = this.props
|
||||
|
||||
return h('div.wallet-view.flex-column' + (responsiveDisplayClassname || ''), {
|
||||
style: {},
|
||||
@ -46,7 +45,7 @@ WalletView.prototype.render = function () {
|
||||
|
||||
// TODO: Separate component: wallet account details
|
||||
h('div.flex-column', {
|
||||
style: {}
|
||||
style: {},
|
||||
}, [
|
||||
|
||||
h('div.flex-row.account-options-menu', {
|
||||
@ -92,9 +91,9 @@ WalletView.prototype.render = function () {
|
||||
]),
|
||||
|
||||
h('span.account-name', {
|
||||
style: {}
|
||||
style: {},
|
||||
}, [
|
||||
'Account 1'
|
||||
selectedIdentity.name,
|
||||
]),
|
||||
|
||||
h(AccountDropdowns, {
|
||||
@ -103,30 +102,31 @@ WalletView.prototype.render = function () {
|
||||
left: 'calc(50% + 28px + 5.5px)',
|
||||
top: '19.5%',
|
||||
},
|
||||
selected: selectedAddress,
|
||||
selectedAddress,
|
||||
network,
|
||||
identities,
|
||||
enableAccountsSelector: true,
|
||||
}, []),
|
||||
]),
|
||||
|
||||
]),
|
||||
|
||||
h(Content, {
|
||||
title: 'Wallet',
|
||||
amount: '1001.124 ETH',
|
||||
fiatValue: '$300,000.00 USD',
|
||||
active: true,
|
||||
title: 'Wallet',
|
||||
amount: '1001.124 ETH',
|
||||
fiatValue: '$300,000.00 USD',
|
||||
active: true,
|
||||
}),
|
||||
|
||||
// Wallet contents
|
||||
h(Content, {
|
||||
title: "Total Token Balance",
|
||||
amount: "45.439 ETH",
|
||||
fiatValue: "$13,000.00 USD",
|
||||
title: 'Total Token Balance',
|
||||
amount: '45.439 ETH',
|
||||
fiatValue: '$13,000.00 USD',
|
||||
active: false,
|
||||
style: {
|
||||
marginTop: '1.3em',
|
||||
}
|
||||
})
|
||||
},
|
||||
}),
|
||||
])
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user