aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/send/send-content
diff options
context:
space:
mode:
authorDan Miller <danjm.com@gmail.com>2018-08-16 15:43:13 +0800
committerDan Miller <danjm.com@gmail.com>2018-08-27 22:14:16 +0800
commit65873e33e407b5af2c4134ddcbc48f4e81bdfa4f (patch)
treed6d1a09cb548baa35d65535a5d083510ed664003 /ui/app/components/send/send-content
parent30e49b8545a33faf2f1d1451c9135c996a6816b0 (diff)
downloadtangerine-wallet-browser-65873e33e407b5af2c4134ddcbc48f4e81bdfa4f.tar
tangerine-wallet-browser-65873e33e407b5af2c4134ddcbc48f4e81bdfa4f.tar.gz
tangerine-wallet-browser-65873e33e407b5af2c4134ddcbc48f4e81bdfa4f.tar.bz2
tangerine-wallet-browser-65873e33e407b5af2c4134ddcbc48f4e81bdfa4f.tar.lz
tangerine-wallet-browser-65873e33e407b5af2c4134ddcbc48f4e81bdfa4f.tar.xz
tangerine-wallet-browser-65873e33e407b5af2c4134ddcbc48f4e81bdfa4f.tar.zst
tangerine-wallet-browser-65873e33e407b5af2c4134ddcbc48f4e81bdfa4f.zip
Adds feature flag toggle for the hex data row on the send screen.
Diffstat (limited to 'ui/app/components/send/send-content')
-rw-r--r--ui/app/components/send/send-content/send-content.component.js3
-rw-r--r--ui/app/components/send/send-content/tests/send-content-component.test.js14
2 files changed, 15 insertions, 2 deletions
diff --git a/ui/app/components/send/send-content/send-content.component.js b/ui/app/components/send/send-content/send-content.component.js
index df7bcb7cc..9e0ce9c23 100644
--- a/ui/app/components/send/send-content/send-content.component.js
+++ b/ui/app/components/send/send-content/send-content.component.js
@@ -12,6 +12,7 @@ export default class SendContent extends Component {
static propTypes = {
updateGas: PropTypes.func,
scanQrCode: PropTypes.func,
+ showHexData: PropTypes.bool,
};
render () {
@@ -25,7 +26,7 @@ export default class SendContent extends Component {
/>
<SendAmountRow updateGas={(updateData) => this.props.updateGas(updateData)} />
<SendGasRow />
- <SendHexDataRow />
+ { this.props.showHexData ? <SendHexDataRow /> : null }
</div>
</PageContainerContent>
)
diff --git a/ui/app/components/send/send-content/tests/send-content-component.test.js b/ui/app/components/send/send-content/tests/send-content-component.test.js
index d5bb6693c..7c3a2cc2d 100644
--- a/ui/app/components/send/send-content/tests/send-content-component.test.js
+++ b/ui/app/components/send/send-content/tests/send-content-component.test.js
@@ -8,12 +8,13 @@ import SendAmountRow from '../send-amount-row/send-amount-row.container'
import SendFromRow from '../send-from-row/send-from-row.container'
import SendGasRow from '../send-gas-row/send-gas-row.container'
import SendToRow from '../send-to-row/send-to-row.container'
+import SendHexDataRow from '../send-hex-data-row/send-hex-data-row.container'
describe('SendContent Component', function () {
let wrapper
beforeEach(() => {
- wrapper = shallow(<SendContent />)
+ wrapper = shallow(<SendContent showHexData={true} />)
})
describe('render', () => {
@@ -33,6 +34,17 @@ describe('SendContent Component', function () {
assert(PageContainerContentChild.childAt(1).is(SendToRow))
assert(PageContainerContentChild.childAt(2).is(SendAmountRow))
assert(PageContainerContentChild.childAt(3).is(SendGasRow))
+ assert(PageContainerContentChild.childAt(4).is(SendHexDataRow))
+ })
+
+ it('should not render the SendHexDataRow if props.showHexData is false', () => {
+ wrapper.setProps({ showHexData: false })
+ const PageContainerContentChild = wrapper.find(PageContainerContent).children()
+ assert(PageContainerContentChild.childAt(0).is(SendFromRow))
+ assert(PageContainerContentChild.childAt(1).is(SendToRow))
+ assert(PageContainerContentChild.childAt(2).is(SendAmountRow))
+ assert(PageContainerContentChild.childAt(3).is(SendGasRow))
+ assert.equal(PageContainerContentChild.childAt(4).html(), null)
})
})
})