|
|
|
@ -103,7 +103,7 @@ SendTransactionScreen.prototype.renderCopy = function () { |
|
|
|
|
|
|
|
|
|
const tokenText = selectedToken ? 'tokens' : 'ETH' |
|
|
|
|
|
|
|
|
|
return h('div', [ |
|
|
|
|
return h('div.send-v2__form-header-copy', [ |
|
|
|
|
|
|
|
|
|
h('div.send-v2__copy', `Only send ${tokenText} to an Ethereum address.`), |
|
|
|
|
|
|
|
|
@ -126,9 +126,6 @@ SendTransactionScreen.prototype.renderHeader = function () { |
|
|
|
|
|
|
|
|
|
]), |
|
|
|
|
|
|
|
|
|
this.renderTitle(), |
|
|
|
|
|
|
|
|
|
this.renderCopy(), |
|
|
|
|
]) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -157,6 +154,7 @@ SendTransactionScreen.prototype.renderFromRow = function () { |
|
|
|
|
|
|
|
|
|
h('div.send-v2__form-label', 'From:'), |
|
|
|
|
|
|
|
|
|
h('div.send-v2__form-field', [ |
|
|
|
|
h(FromDropdown, { |
|
|
|
|
dropdownOpen, |
|
|
|
|
accounts: fromAccounts, |
|
|
|
@ -166,6 +164,7 @@ SendTransactionScreen.prototype.renderFromRow = function () { |
|
|
|
|
closeDropdown: () => this.setState({ dropdownOpen: false }), |
|
|
|
|
conversionRate, |
|
|
|
|
}), |
|
|
|
|
]), |
|
|
|
|
|
|
|
|
|
]) |
|
|
|
|
} |
|
|
|
@ -199,12 +198,14 @@ SendTransactionScreen.prototype.renderToRow = function () { |
|
|
|
|
|
|
|
|
|
]), |
|
|
|
|
|
|
|
|
|
h('div.send-v2__form-field', [ |
|
|
|
|
h(ToAutoComplete, { |
|
|
|
|
to, |
|
|
|
|
accounts: toAccounts, |
|
|
|
|
onChange: this.handleToChange, |
|
|
|
|
inError: Boolean(errors.to), |
|
|
|
|
}), |
|
|
|
|
]), |
|
|
|
|
|
|
|
|
|
]) |
|
|
|
|
} |
|
|
|
@ -245,7 +246,7 @@ SendTransactionScreen.prototype.validateAmount = function (value) { |
|
|
|
|
conversionRate: amountConversionRate, |
|
|
|
|
}, |
|
|
|
|
) |
|
|
|
|
console.log(`sufficientBalance`, sufficientBalance); |
|
|
|
|
|
|
|
|
|
const amountLessThanZero = conversionGreaterThan( |
|
|
|
|
{ value: 0, fromNumericBase: 'dec' }, |
|
|
|
|
{ value: amount, fromNumericBase: 'hex' }, |
|
|
|
@ -277,6 +278,7 @@ SendTransactionScreen.prototype.renderAmountRow = function () { |
|
|
|
|
this.renderErrorMessage('amount'), |
|
|
|
|
]), |
|
|
|
|
|
|
|
|
|
h('div.send-v2__form-field', [ |
|
|
|
|
h(CurrencyDisplay, { |
|
|
|
|
inError: Boolean(errors.amount), |
|
|
|
|
primaryCurrency, |
|
|
|
@ -287,6 +289,7 @@ SendTransactionScreen.prototype.renderAmountRow = function () { |
|
|
|
|
handleChange: this.handleAmountChange, |
|
|
|
|
validate: this.validateAmount, |
|
|
|
|
}), |
|
|
|
|
]), |
|
|
|
|
|
|
|
|
|
]) |
|
|
|
|
} |
|
|
|
@ -302,6 +305,8 @@ SendTransactionScreen.prototype.renderGasRow = function () { |
|
|
|
|
|
|
|
|
|
h('div.send-v2__form-label', 'Gas fee:'), |
|
|
|
|
|
|
|
|
|
h('div.send-v2__form-field', [ |
|
|
|
|
|
|
|
|
|
h(GasFeeDisplay, { |
|
|
|
|
gasTotal, |
|
|
|
|
conversionRate, |
|
|
|
@ -312,7 +317,9 @@ SendTransactionScreen.prototype.renderGasRow = function () { |
|
|
|
|
onClick: showCustomizeGasModal, |
|
|
|
|
}, [ |
|
|
|
|
h('i.fa.fa-sliders.send-v2__sliders-icon'), |
|
|
|
|
])
|
|
|
|
|
]), |
|
|
|
|
|
|
|
|
|
]),
|
|
|
|
|
|
|
|
|
|
]) |
|
|
|
|
} |
|
|
|
@ -325,10 +332,12 @@ SendTransactionScreen.prototype.renderMemoRow = function () { |
|
|
|
|
|
|
|
|
|
h('div.send-v2__form-label', 'Transaction Memo:'), |
|
|
|
|
|
|
|
|
|
h('div.send-v2__form-field', [ |
|
|
|
|
h(MemoTextArea, { |
|
|
|
|
memo, |
|
|
|
|
onChange: (event) => updateSendMemo(event.target.value), |
|
|
|
|
}), |
|
|
|
|
}) |
|
|
|
|
]), |
|
|
|
|
|
|
|
|
|
]) |
|
|
|
|
} |
|
|
|
@ -336,6 +345,14 @@ SendTransactionScreen.prototype.renderMemoRow = function () { |
|
|
|
|
SendTransactionScreen.prototype.renderForm = function () { |
|
|
|
|
return h('div.send-v2__form', {}, [ |
|
|
|
|
|
|
|
|
|
h('div.sendV2__form-header', [ |
|
|
|
|
|
|
|
|
|
this.renderTitle(), |
|
|
|
|
|
|
|
|
|
this.renderCopy(), |
|
|
|
|
|
|
|
|
|
]), |
|
|
|
|
|
|
|
|
|
this.renderFromRow(), |
|
|
|
|
|
|
|
|
|
this.renderToRow(), |
|
|
|
|