diff options
author | Frankie <frankie.pangilinan@consensys.net> | 2016-08-13 06:41:59 +0800 |
---|---|---|
committer | Frankie <frankie.pangilinan@consensys.net> | 2016-08-13 06:41:59 +0800 |
commit | b4c9a5225947f9aadac5fd1bb23fde64740d774a (patch) | |
tree | bd6af9ce87c7cbedc6aa2a6afe0e7f6ce424b49f /ui/app/components/coinbase-form.js | |
parent | 2fc26fb264ba0df7e4fc60128c6cbe19d3141beb (diff) | |
download | tangerine-wallet-browser-b4c9a5225947f9aadac5fd1bb23fde64740d774a.tar tangerine-wallet-browser-b4c9a5225947f9aadac5fd1bb23fde64740d774a.tar.gz tangerine-wallet-browser-b4c9a5225947f9aadac5fd1bb23fde64740d774a.tar.bz2 tangerine-wallet-browser-b4c9a5225947f9aadac5fd1bb23fde64740d774a.tar.lz tangerine-wallet-browser-b4c9a5225947f9aadac5fd1bb23fde64740d774a.tar.xz tangerine-wallet-browser-b4c9a5225947f9aadac5fd1bb23fde64740d774a.tar.zst tangerine-wallet-browser-b4c9a5225947f9aadac5fd1bb23fde64740d774a.zip |
Change buy forms so that they are their own view and add Qr-code
Diffstat (limited to 'ui/app/components/coinbase-form.js')
-rw-r--r-- | ui/app/components/coinbase-form.js | 44 |
1 files changed, 10 insertions, 34 deletions
diff --git a/ui/app/components/coinbase-form.js b/ui/app/components/coinbase-form.js index 5ab6b507a..efd05ec96 100644 --- a/ui/app/components/coinbase-form.js +++ b/ui/app/components/coinbase-form.js @@ -22,12 +22,13 @@ function CoinbaseForm() { CoinbaseForm.prototype.render = function () { var props = this.props - var amount = props.accountDetail.amount - var address = props.accountDetail.buyAddress + var amount = props.buyView.amount + var address = props.buyView.buyAddress return h('.flex-column', { style: { - margin: '10px', + // margin: '10px', + padding: '25px', }, }, [ h('.flex-column', { @@ -35,35 +36,10 @@ CoinbaseForm.prototype.render = function () { alignItems: 'flex-start', }, }, [ - h('.flex-column', [ + h('.flex-row', [ h('div', 'Address:'), - h('.input-container', { - style: {}, - }, [ - h('input.buy-inputs', { - type: 'text', - style: { - boxSizing: 'border-box', - width: '317px', - height: '20px', - padding: ' 12px 0px 12px 1px ', - }, - defaultValue: address, - onChange: this.handleAddress.bind(this), - }), - h('i.fa.fa-pencil-square-o.edit-text', { - style: { - fontSize: '12px', - color: '#F7861C', - position: 'relative', - bottom: '8px', - right: '11px', - }, - }), - - ]), + h('.ellip-address', address), ]), - h('.flex-row', [ h('div', 'Amount: $'), h('.input-container', [ @@ -119,7 +95,7 @@ CoinbaseForm.prototype.render = function () { }, 'Continue to Coinbase'), h('button', { - onClick: () => props.dispatch(actions.backToAccountDetail(props.accounts.address)), + onClick: () => props.dispatch(actions.backTobuyView(props.accounts.address)), }, 'Cancel'), ]), ]) @@ -132,12 +108,12 @@ CoinbaseForm.prototype.handleAddress = function (event) { } CoinbaseForm.prototype.toCoinbase = function () { var props = this.props - var amount = props.accountDetail.amount - var address = props.accountDetail.buyAddress + var amount = props.buyView.amount + var address = props.buyView.buyAddress var message if (isValidAddress(address) && isValidAmountforCoinBase(amount).valid) { - props.dispatch(actions.buyEth(address, props.accountDetail.amount)) + props.dispatch(actions.buyEth(address, props.buyView.amount)) } else if (!isValidAmountforCoinBase(amount).valid) { message = isValidAmountforCoinBase(amount).message return props.dispatch(actions.showWarning(message)) |