aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/metamask-controller.js
diff options
context:
space:
mode:
authorbrunobar79 <brunobar79@gmail.com>2018-07-24 10:10:57 +0800
committerbrunobar79 <brunobar79@gmail.com>2018-07-24 10:10:57 +0800
commitd5929e5c42e230fc0a52337f86b5850e68516563 (patch)
tree12514016dd7e0612b9ad724637e8a855b3ac0f46 /app/scripts/metamask-controller.js
parentf7ad978474f42eb96f4f6c79376391504cf228c1 (diff)
downloadtangerine-wallet-browser-d5929e5c42e230fc0a52337f86b5850e68516563.tar
tangerine-wallet-browser-d5929e5c42e230fc0a52337f86b5850e68516563.tar.gz
tangerine-wallet-browser-d5929e5c42e230fc0a52337f86b5850e68516563.tar.bz2
tangerine-wallet-browser-d5929e5c42e230fc0a52337f86b5850e68516563.tar.lz
tangerine-wallet-browser-d5929e5c42e230fc0a52337f86b5850e68516563.tar.xz
tangerine-wallet-browser-d5929e5c42e230fc0a52337f86b5850e68516563.tar.zst
tangerine-wallet-browser-d5929e5c42e230fc0a52337f86b5850e68516563.zip
added qr code scanner icon in send transaction
Diffstat (limited to 'app/scripts/metamask-controller.js')
-rw-r--r--app/scripts/metamask-controller.js9
1 files changed, 2 insertions, 7 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 62d707432..f67d4edf8 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -660,20 +660,15 @@ module.exports = class MetamaskController extends EventEmitter {
scanQrCode () {
return new Promise((resolve, reject) => {
- console.log('QR-SCANNER: intializing QR code scanner feature (MM controller)')
// Tell contentscript to inject the QR reader
- this.platform.sendMessage('qr-code-scanner-init')
- console.log('QR-SCANNER: message to initialize has been sent (MM controller)')
+ this.platform.sendMessageToActiveTab('qr-code-scanner-init')
// Wait for the scanner to send something back
this.platform.addMessageListener(({ action, data }) => {
- console.log('QR-SCANNER: message received (MM controller)', action, data)
if (action && action === 'qr-code-scanner-data') {
const normalizedAddress = data.replace('ethereum:', '')
- console.log('QR-SCANNER: resolving promise!', normalizedAddress)
- return Promise.resolve(normalizedAddress)
+ resolve(normalizedAddress)
}
})
- console.log('QR-SCANNER: now listening (MM controller)')
})
}