aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorChi Kei Chan <chikeichan@gmail.com>2017-10-20 03:47:44 +0800
committerChi Kei Chan <chikeichan@gmail.com>2017-10-20 03:47:44 +0800
commit376ae032fedb99d22b7c71438ec9482d2013c78e (patch)
tree182064835bbcb717b5494bd545330f36b7f383a6 /ui
parentd3f923efefef893db31c18aa4ff4e2488a5b6448 (diff)
downloadtangerine-wallet-browser-376ae032fedb99d22b7c71438ec9482d2013c78e.tar
tangerine-wallet-browser-376ae032fedb99d22b7c71438ec9482d2013c78e.tar.gz
tangerine-wallet-browser-376ae032fedb99d22b7c71438ec9482d2013c78e.tar.bz2
tangerine-wallet-browser-376ae032fedb99d22b7c71438ec9482d2013c78e.tar.lz
tangerine-wallet-browser-376ae032fedb99d22b7c71438ec9482d2013c78e.tar.xz
tangerine-wallet-browser-376ae032fedb99d22b7c71438ec9482d2013c78e.tar.zst
tangerine-wallet-browser-376ae032fedb99d22b7c71438ec9482d2013c78e.zip
Fix selectors
Diffstat (limited to 'ui')
-rw-r--r--ui/app/app.js1
-rw-r--r--ui/app/components/account-menu/index.js5
-rw-r--r--ui/app/components/wallet-view.js4
-rw-r--r--ui/app/selectors.js4
4 files changed, 6 insertions, 8 deletions
diff --git a/ui/app/app.js b/ui/app/app.js
index de6a06a58..cf82248e4 100644
--- a/ui/app/app.js
+++ b/ui/app/app.js
@@ -207,7 +207,6 @@ App.prototype.renderAppBar = function () {
if (window.METAMASK_UI_TYPE === 'notification') {
return null
}
- console.log(this.props)
return (
h('.full-width', {
diff --git a/ui/app/components/account-menu/index.js b/ui/app/components/account-menu/index.js
index 2ebdba24a..85bd21076 100644
--- a/ui/app/components/account-menu/index.js
+++ b/ui/app/components/account-menu/index.js
@@ -35,7 +35,6 @@ function mapDispatchToProps (dispatch) {
dispatch(actions.toggleAccountMenu())
},
showConfigPage: () => {
- console.log('hihihih')
dispatch(actions.showConfigPage())
dispatch(actions.toggleAccountMenu())
},
@@ -60,7 +59,6 @@ AccountMenu.prototype.render = function () {
showConfigPage,
} = this.props
- console.log(showConfigPage)
return h(Menu, { className: 'account-menu', isShowing: isAccountMenuOpen }, [
h(CloseArea, { onClick: toggleAccountMenu }),
h(Item, {
@@ -105,11 +103,12 @@ AccountMenu.prototype.renderAccounts = function () {
showAccountDetail,
} = this.props
+ console.log({ accounts })
return Object.keys(identities).map((key, index) => {
const identity = identities[key]
const isSelected = identity.address === selected
- const balanceValue = accounts[key].balance
+ const balanceValue = accounts[key] ? accounts[key].balance : ''
const formattedBalance = balanceValue ? formatBalance(balanceValue, 6) : '...'
const simpleAddress = identity.address.substring(2).toLowerCase()
diff --git a/ui/app/components/wallet-view.js b/ui/app/components/wallet-view.js
index f06c4d512..a870a24e3 100644
--- a/ui/app/components/wallet-view.js
+++ b/ui/app/components/wallet-view.js
@@ -47,7 +47,7 @@ WalletView.prototype.renderWalletBalance = function () {
hideSidebar,
sidebarOpen,
} = this.props
-
+ console.log({ selectedAccount })
const selectedClass = selectedTokenAddress
? ''
: 'wallet-balance-wrapper--active'
@@ -63,7 +63,7 @@ WalletView.prototype.renderWalletBalance = function () {
},
[
h(BalanceComponent, {
- balanceValue: selectedAccount.balance,
+ balanceValue: selectedAccount ? selectedAccount.balance : '',
style: {},
}),
]
diff --git a/ui/app/selectors.js b/ui/app/selectors.js
index 66b7c00e4..4c3d21d33 100644
--- a/ui/app/selectors.js
+++ b/ui/app/selectors.js
@@ -67,7 +67,7 @@ function getTokenExchangeRate (state, tokenSymbol) {
return tokenExchangeRate
}
-function conversionRateSelector (state) {
+function conversionRateSelector (state) {
return state.metamask.conversionRate
}
@@ -102,7 +102,7 @@ function transactionsSelector (state) {
const transactions = state.metamask.selectedAddressTxList || []
const txsToRender = !shapeShiftTxList ? transactions.concat(unapprovedMsgs) : transactions.concat(unapprovedMsgs, shapeShiftTxList)
- console.log({txsToRender, selectedTokenAddress})
+ // console.log({txsToRender, selectedTokenAddress})
return selectedTokenAddress
? txsToRender
.filter(({ txParams: { to } }) => to === selectedTokenAddress)