aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-05-25 09:00:07 +0800
committerDan <danjm.com@gmail.com>2018-05-25 10:30:55 +0800
commit0de765aa25637cd85e22eebd11b6c4c8a32faf14 (patch)
tree93f96c9b3cc59c32c22a9c5b9866186cd2bf6da5 /ui/app
parentdc2b5d0ef47be2125e58018470539d65d0d64c75 (diff)
downloadtangerine-wallet-browser-0de765aa25637cd85e22eebd11b6c4c8a32faf14.tar
tangerine-wallet-browser-0de765aa25637cd85e22eebd11b6c4c8a32faf14.tar.gz
tangerine-wallet-browser-0de765aa25637cd85e22eebd11b6c4c8a32faf14.tar.bz2
tangerine-wallet-browser-0de765aa25637cd85e22eebd11b6c4c8a32faf14.tar.lz
tangerine-wallet-browser-0de765aa25637cd85e22eebd11b6c4c8a32faf14.tar.xz
tangerine-wallet-browser-0de765aa25637cd85e22eebd11b6c4c8a32faf14.tar.zst
tangerine-wallet-browser-0de765aa25637cd85e22eebd11b6c4c8a32faf14.zip
Clean up for send refactor PR.
Diffstat (limited to 'ui/app')
-rw-r--r--ui/app/components/send_/send-content/send-from-row/from-dropdown/from-dropdown.component.js2
-rw-r--r--ui/app/components/send_/send-content/send-to-row/send-to-row.component.js2
-rw-r--r--ui/app/components/send_/send-content/send-to-row/tests/send-to-row-component.test.js2
-rw-r--r--ui/app/components/send_/send-footer/tests/send-footer-container.test.js14
-rw-r--r--ui/app/components/send_/tests/send-component.test.js2
5 files changed, 7 insertions, 15 deletions
diff --git a/ui/app/components/send_/send-content/send-from-row/from-dropdown/from-dropdown.component.js b/ui/app/components/send_/send-content/send-from-row/from-dropdown/from-dropdown.component.js
index bf95c50fb..418766cd9 100644
--- a/ui/app/components/send_/send-content/send-from-row/from-dropdown/from-dropdown.component.js
+++ b/ui/app/components/send_/send-content/send-from-row/from-dropdown/from-dropdown.component.js
@@ -35,7 +35,7 @@ export default class FromDropdown extends Component {
closeDropdown={closeDropdown}
onSelect={onSelect}
activeAddress={selectedAccount.address}
- />},
+ />}
</div>
}
diff --git a/ui/app/components/send_/send-content/send-to-row/send-to-row.component.js b/ui/app/components/send_/send-content/send-to-row/send-to-row.component.js
index a54608259..901ae97e9 100644
--- a/ui/app/components/send_/send-content/send-to-row/send-to-row.component.js
+++ b/ui/app/components/send_/send-content/send-to-row/send-to-row.component.js
@@ -37,7 +37,7 @@ export default class SendToRow extends Component {
return (
<SendRowWrapper
errorType={'to'}
- label={`${this.context.t('to')}:`}
+ label={`${this.context.t('to')}`}
showError={inError}
>
<EnsInput
diff --git a/ui/app/components/send_/send-content/send-to-row/tests/send-to-row-component.test.js b/ui/app/components/send_/send-content/send-to-row/tests/send-to-row-component.test.js
index df6ad6fe8..e58695210 100644
--- a/ui/app/components/send_/send-content/send-to-row/tests/send-to-row-component.test.js
+++ b/ui/app/components/send_/send-content/send-to-row/tests/send-to-row-component.test.js
@@ -81,7 +81,7 @@ describe('SendToRow Component', function () {
assert.equal(errorType, 'to')
- assert.equal(label, 'to_t:')
+ assert.equal(label, 'to_t')
assert.equal(showError, false)
})
diff --git a/ui/app/components/send_/send-footer/tests/send-footer-container.test.js b/ui/app/components/send_/send-footer/tests/send-footer-container.test.js
index e9d4eb04d..9a616777e 100644
--- a/ui/app/components/send_/send-footer/tests/send-footer-container.test.js
+++ b/ui/app/components/send_/send-footer/tests/send-footer-container.test.js
@@ -16,7 +16,6 @@ const utilsStubs = {
addressIsNew: sinon.stub().returns(true),
constructTxParams: sinon.stub().returns('mockConstructedTxParams'),
constructUpdatedTx: sinon.stub().returns('mockConstructedUpdatedTxParams'),
- formShouldBeDisabled: sinon.stub().returns('mockFormShouldBeDisabled'),
}
proxyquire('../send-footer.container.js', {
@@ -53,27 +52,18 @@ describe('send-footer container', () => {
it('should map the correct properties to props', () => {
assert.deepEqual(mapStateToProps('mockState'), {
amount: 'mockAmount:mockState',
- disabled: 'mockFormShouldBeDisabled',
selectedToken: 'mockSelectedToken:mockState',
editingTransactionId: 'mockEditingTransactionId:mockState',
from: 'mockFromObject:mockState',
gasLimit: 'mockGasLimit:mockState',
gasPrice: 'mockGasPrice:mockState',
+ gasTotal: 'mockGasTotal:mockState',
inError: 'mockInError:mockState',
- isToken: true,
to: 'mockTo:mockState',
toAccounts: 'mockToAccounts:mockState',
+ tokenBalance: 'mockTokenBalance:mockState',
unapprovedTxs: 'mockUnapprovedTxs:mockState',
})
- assert.deepEqual(
- utilsStubs.formShouldBeDisabled.getCall(0).args[0],
- {
- inError: 'mockInError:mockState',
- selectedToken: 'mockSelectedToken:mockState',
- tokenBalance: 'mockTokenBalance:mockState',
- gasTotal: 'mockGasTotal:mockState',
- }
- )
})
})
diff --git a/ui/app/components/send_/tests/send-component.test.js b/ui/app/components/send_/tests/send-component.test.js
index 60b160333..8aeab36b4 100644
--- a/ui/app/components/send_/tests/send-component.test.js
+++ b/ui/app/components/send_/tests/send-component.test.js
@@ -142,6 +142,7 @@ describe('Send Component', function () {
it('should not call updateSendTokenBalance or this.updateGas if network === prevNetwork', () => {
SendTransactionScreen.prototype.updateGas.resetHistory()
+ propsMethodSpies.updateSendTokenBalance.resetHistory()
wrapper.instance().componentDidUpdate({
from: {
balance: 'balanceChanged',
@@ -168,6 +169,7 @@ describe('Send Component', function () {
it('should call updateSendTokenBalance and this.updateGas with the correct params', () => {
SendTransactionScreen.prototype.updateGas.resetHistory()
+ propsMethodSpies.updateSendTokenBalance.resetHistory()
wrapper.instance().componentDidUpdate({
from: {
balance: 'balanceChanged',