feature/default_network_editable
Dan 7 years ago
parent 18f8583529
commit a82631791e
  1. 4
      ui/app/accounts/import/index.js
  2. 2
      ui/app/accounts/import/json.js
  3. 2
      ui/app/accounts/new-account/create-form.js
  4. 2
      ui/app/components/account-dropdowns.js
  5. 4
      ui/app/components/buy-button-subview.js
  6. 2
      ui/app/components/dropdowns/components/account-dropdowns.js
  7. 4
      ui/app/components/modals/new-account-modal.js
  8. 2
      ui/app/components/modals/notification-modal.js
  9. 1
      ui/app/components/network-display.js
  10. 5
      ui/app/components/pending-tx/confirm-deploy-contract.js
  11. 2
      ui/app/components/pending-tx/confirm-send-token.js
  12. 1
      ui/app/components/send/send-v2-container.js
  13. 4
      ui/app/components/sender-to-recipient.js
  14. 1
      ui/app/settings.js

@ -17,14 +17,13 @@ function AccountImportSubview () {
} }
AccountImportSubview.prototype.getMenuItemTexts = function () { AccountImportSubview.prototype.getMenuItemTexts = function () {
return [ return [
this.props.t('privateKey'), this.props.t('privateKey'),
this.props.t('jsonFile'), this.props.t('jsonFile'),
] ]
} }
AccountImportSubview.prototype.render = function () { AccountImportSubview.prototype.render = function () {
const props = this.props
const state = this.state || {} const state = this.state || {}
const menuItems = this.getMenuItemTexts() const menuItems = this.getMenuItemTexts()
const { type } = state const { type } = state
@ -75,7 +74,6 @@ AccountImportSubview.prototype.render = function () {
} }
AccountImportSubview.prototype.renderImportView = function () { AccountImportSubview.prototype.renderImportView = function () {
const props = this.props
const state = this.state || {} const state = this.state || {}
const { type } = state const { type } = state
const menuItems = this.getMenuItemTexts() const menuItems = this.getMenuItemTexts()

@ -112,7 +112,7 @@ JsonImportSubview.propTypes = {
goHome: PropTypes.func, goHome: PropTypes.func,
displayWarning: PropTypes.func, displayWarning: PropTypes.func,
importNewJsonAccount: PropTypes.func, importNewJsonAccount: PropTypes.func,
localeMessages: PropTypes.object, t: PropTypes.func,
} }
const mapStateToProps = state => { const mapStateToProps = state => {

@ -61,7 +61,7 @@ NewAccountCreateForm.propTypes = {
createAccount: PropTypes.func, createAccount: PropTypes.func,
goHome: PropTypes.func, goHome: PropTypes.func,
numberOfExistingAccounts: PropTypes.number, numberOfExistingAccounts: PropTypes.number,
localeMessages: PropTypes.object, t: PropTypes.object,
} }
const mapStateToProps = state => { const mapStateToProps = state => {

@ -300,7 +300,7 @@ AccountDropdowns.propTypes = {
style: PropTypes.object, style: PropTypes.object,
enableAccountOptions: PropTypes.bool, enableAccountOptions: PropTypes.bool,
enableAccountsSelector: PropTypes.bool, enableAccountsSelector: PropTypes.bool,
localeMessages: PropTypes.object, t: PropTypes.func,
} }
const mapDispatchToProps = (dispatch) => { const mapDispatchToProps = (dispatch) => {

@ -143,7 +143,7 @@ BuyButtonSubview.prototype.primarySubview = function () {
case '4': case '4':
case '42': case '42':
const networkName = networkNames[network] const networkName = networkNames[network]
const label = `${networkName} ${t('testFaucet')}` const label = `${networkName} ${this.props.t('testFaucet')}`
return ( return (
h('div.flex-column', { h('div.flex-column', {
style: { style: {
@ -203,7 +203,7 @@ BuyButtonSubview.prototype.mainnetSubview = function () {
'ShapeShift', 'ShapeShift',
], ],
subtext: { subtext: {
'Coinbase': `${t('crypto')}/${t('fiat')} (${t('usaOnly')})`, 'Coinbase': `${this.props.t('crypto')}/${this.props.t('fiat')} (${this.props.t('usaOnly')})`,
'ShapeShift': this.props.t('crypto'), 'ShapeShift': this.props.t('crypto'),
}, },
onClick: this.radioHandler.bind(this), onClick: this.radioHandler.bind(this),

@ -425,7 +425,7 @@ AccountDropdowns.propTypes = {
enableAccountsSelector: PropTypes.bool, enableAccountsSelector: PropTypes.bool,
enableAccountOption: PropTypes.bool, enableAccountOption: PropTypes.bool,
enableAccountOptions: PropTypes.bool, enableAccountOptions: PropTypes.bool,
localeMessages: PropTypes.object, t: PropTypes.func,
} }
const mapDispatchToProps = (dispatch) => { const mapDispatchToProps = (dispatch) => {

@ -11,7 +11,7 @@ class NewAccountModal extends Component {
const newAccountNumber = numberOfExistingAccounts + 1 const newAccountNumber = numberOfExistingAccounts + 1
this.state = { this.state = {
newAccountName: `${t('account')} ${newAccountNumber}`, newAccountName: `${props.t('account')} ${newAccountNumber}`,
} }
} }
@ -69,7 +69,7 @@ NewAccountModal.propTypes = {
showImportPage: PropTypes.func, showImportPage: PropTypes.func,
createAccount: PropTypes.func, createAccount: PropTypes.func,
numberOfExistingAccounts: PropTypes.number, numberOfExistingAccounts: PropTypes.number,
localeMessages: PropTypes.object, t: PropTypes.func,
} }
const mapStateToProps = state => { const mapStateToProps = state => {

@ -62,7 +62,7 @@ NotificationModal.propTypes = {
showCancelButton: PropTypes.bool, showCancelButton: PropTypes.bool,
showConfirmButton: PropTypes.bool, showConfirmButton: PropTypes.bool,
onConfirm: PropTypes.func, onConfirm: PropTypes.func,
localeMessages: PropTypes.object, t: PropTypes.func,
} }
const mapDispatchToProps = dispatch => { const mapDispatchToProps = dispatch => {

@ -38,6 +38,7 @@ class NetworkDisplay extends Component {
NetworkDisplay.propTypes = { NetworkDisplay.propTypes = {
network: PropTypes.string, network: PropTypes.string,
provider: PropTypes.object, provider: PropTypes.object,
t: PropTypes.func,
} }
const mapStateToProps = ({ metamask: { network, provider } }) => { const mapStateToProps = ({ metamask: { network, provider } }) => {

@ -32,7 +32,7 @@ class ConfirmDeployContract extends Component {
if (valid && this.verifyGasParams()) { if (valid && this.verifyGasParams()) {
this.props.sendTransaction(txMeta, event) this.props.sendTransaction(txMeta, event)
} else { } else {
this.props.displayWarning('invalidGasParams') this.props.displayWarning(this.props.t('invalidGasParams'))
this.setState({ submitting: false }) this.setState({ submitting: false })
} }
} }
@ -324,6 +324,7 @@ ConfirmDeployContract.propTypes = {
conversionRate: PropTypes.number, conversionRate: PropTypes.number,
currentCurrency: PropTypes.string, currentCurrency: PropTypes.string,
selectedAddress: PropTypes.string, selectedAddress: PropTypes.string,
t: PropTypes.func,
} }
const mapStateToProps = state => { const mapStateToProps = state => {
@ -346,7 +347,7 @@ const mapDispatchToProps = dispatch => {
return { return {
backToAccountDetail: address => dispatch(actions.backToAccountDetail(address)), backToAccountDetail: address => dispatch(actions.backToAccountDetail(address)),
cancelTransaction: ({ id }) => dispatch(actions.cancelTx({ id })), cancelTransaction: ({ id }) => dispatch(actions.cancelTx({ id })),
displayWarning: warning => actions.displayWarning(t(warning)), displayWarning: warning => actions.displayWarning(warning),
} }
} }

@ -327,7 +327,7 @@ ConfirmSendToken.prototype.renderTotalPlusGas = function () {
h('div.confirm-screen-section-column', [ h('div.confirm-screen-section-column', [
h('div.confirm-screen-row-info', `${tokenAmount} ${symbol}`), h('div.confirm-screen-row-info', `${tokenAmount} ${symbol}`),
h('div.confirm-screen-row-detail', `+ ${fiatGas} ${currentCurrency} ${t('gas')}`), h('div.confirm-screen-row-detail', `+ ${fiatGas} ${currentCurrency} ${this.props.t('gas')}`),
]), ]),
]) ])
) )

@ -53,7 +53,6 @@ function mapStateToProps (state) {
tokenContract: getSelectedTokenContract(state), tokenContract: getSelectedTokenContract(state),
unapprovedTxs: state.metamask.unapprovedTxs, unapprovedTxs: state.metamask.unapprovedTxs,
network: state.metamask.network, network: state.metamask.network,
t: t.bind(null, state.localeMessages),
} }
} }

@ -59,9 +59,9 @@ class SenderToRecipient extends Component {
SenderToRecipient.propTypes = { SenderToRecipient.propTypes = {
senderName: PropTypes.string, senderName: PropTypes.string,
senderAddress: PropTypes.string, senderAddress: PropTypes.string,
localeMessages: PropTypes.object, recipientName: PropTypes.string,
recipientName: PropTypes.string,
recipientAddress: PropTypes.string, recipientAddress: PropTypes.string,
t: PropTypes.func,
} }
module.exports = { module.exports = {

@ -459,6 +459,7 @@ Settings.propTypes = {
isMascara: PropTypes.bool, isMascara: PropTypes.bool,
updateCurrentLocale: PropTypes.func, updateCurrentLocale: PropTypes.func,
currentLocale: PropTypes.object, currentLocale: PropTypes.object,
t: PropTypes.func,
} }
const mapStateToProps = state => { const mapStateToProps = state => {

Loading…
Cancel
Save