aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/send/send.component.js
diff options
context:
space:
mode:
authorbrunobar79 <brunobar79@gmail.com>2018-07-24 09:27:51 +0800
committerbrunobar79 <brunobar79@gmail.com>2018-07-24 09:27:51 +0800
commitf7ad978474f42eb96f4f6c79376391504cf228c1 (patch)
treebe472127595385f8c8558213a58b7d1a470ad760 /ui/app/components/send/send.component.js
parent02091486094dcc818096ce13a22cdc140a2e8347 (diff)
downloadtangerine-wallet-browser-f7ad978474f42eb96f4f6c79376391504cf228c1.tar.gz
tangerine-wallet-browser-f7ad978474f42eb96f4f6c79376391504cf228c1.tar.zst
tangerine-wallet-browser-f7ad978474f42eb96f4f6c79376391504cf228c1.zip
camera working back and forth
Diffstat (limited to 'ui/app/components/send/send.component.js')
-rw-r--r--ui/app/components/send/send.component.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/ui/app/components/send/send.component.js b/ui/app/components/send/send.component.js
index 6f1b20c55..5e967251d 100644
--- a/ui/app/components/send/send.component.js
+++ b/ui/app/components/send/send.component.js
@@ -38,12 +38,19 @@ export default class SendTransactionScreen extends PersistentForm {
updateAndSetGasTotal: PropTypes.func,
updateSendErrors: PropTypes.func,
updateSendTokenBalance: PropTypes.func,
+ scanQrCode: PropTypes.func,
};
static contextTypes = {
t: PropTypes.func,
};
+ scanQrCode = async () => {
+ const scannedAddress = await this.props.scanQrCode()
+ console.log('QR-SCANNER: Got address (UI)', scannedAddress)
+ this.updateGas({ to: scannedAddress })
+ }
+
updateGas ({ to: updatedToAddress, amount: value } = {}) {
const {
amount,
@@ -170,7 +177,10 @@ export default class SendTransactionScreen extends PersistentForm {
return (
<div className="page-container">
<SendHeader history={history}/>
- <SendContent updateGas={(updateData) => this.updateGas(updateData)}/>
+ <SendContent
+ updateGas={(updateData) => this.updateGas(updateData)}
+ scanQrCode={_ => this.scanQrCode()}
+ />
<SendFooter history={history}/>
</div>
)