aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/send/send-content/send-from-row/send-from-row.component.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/send/send-content/send-from-row/send-from-row.component.js')
-rw-r--r--ui/app/components/send/send-content/send-from-row/send-from-row.component.js51
1 files changed, 7 insertions, 44 deletions
diff --git a/ui/app/components/send/send-content/send-from-row/send-from-row.component.js b/ui/app/components/send/send-content/send-from-row/send-from-row.component.js
index b6de9d222..f8aa084d8 100644
--- a/ui/app/components/send/send-content/send-from-row/send-from-row.component.js
+++ b/ui/app/components/send/send-content/send-from-row/send-from-row.component.js
@@ -1,64 +1,27 @@
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import SendRowWrapper from '../send-row-wrapper/'
-import FromDropdown from './from-dropdown/'
+import AccountListItem from '../../account-list-item'
export default class SendFromRow extends Component {
-
static propTypes = {
- closeFromDropdown: PropTypes.func,
- conversionRate: PropTypes.number,
from: PropTypes.object,
- fromAccounts: PropTypes.array,
- fromDropdownOpen: PropTypes.bool,
- openFromDropdown: PropTypes.func,
- tokenContract: PropTypes.object,
- updateSendFrom: PropTypes.func,
- setSendTokenBalance: PropTypes.func,
}
static contextTypes = {
t: PropTypes.func,
}
- async handleFromChange (newFrom) {
- const {
- updateSendFrom,
- tokenContract,
- setSendTokenBalance,
- } = this.props
-
- if (tokenContract) {
- const usersToken = await tokenContract.balanceOf(newFrom.address)
- setSendTokenBalance(usersToken)
- }
-
- updateSendFrom(newFrom)
- }
-
render () {
- const {
- closeFromDropdown,
- conversionRate,
- from,
- fromAccounts,
- fromDropdownOpen,
- openFromDropdown,
- } = this.props
+ const { t } = this.context
+ const { from } = this.props
return (
- <SendRowWrapper label={`${this.context.t('from')}:`}>
- <FromDropdown
- accounts={fromAccounts}
- closeDropdown={() => closeFromDropdown()}
- conversionRate={conversionRate}
- dropdownOpen={fromDropdownOpen}
- onSelect={newFrom => this.handleFromChange(newFrom)}
- openDropdown={() => openFromDropdown()}
- selectedAccount={from}
- />
+ <SendRowWrapper label={`${t('from')}:`}>
+ <div className="send-v2__from-dropdown">
+ <AccountListItem account={from} />
+ </div>
</SendRowWrapper>
)
}
-
}