From ea028e750663b41d5d01ea642f7946ffbbb1287a Mon Sep 17 00:00:00 2001 From: brunobar79 Date: Thu, 26 Jul 2018 20:56:58 -0400 Subject: [PATCH] fully working without tweaking ext. permission --- package-lock.json | 64 +------------------ package.json | 2 +- .../send-content/send-content.component.js | 2 +- .../send-to-row/send-to-row.component.js | 1 + ui/app/components/send/send.selectors.js | 2 +- .../send/to-autocomplete/to-autocomplete.js | 2 +- 6 files changed, 7 insertions(+), 66 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0fd733fa7..566c58251 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1624,9 +1624,8 @@ } }, "@zxing/library": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@zxing/library/-/library-0.7.0.tgz", - "integrity": "sha512-VJ1cJaCWVF8MspnuyaZKGKlrSQLqQ5usgSap8uuCAvWGQ6W6OwN1NeGvnjhT+9hmnwkHK8XjaflvzaDBC7nKnw==", + "version": "github:zxing-js/library#a1a3481f456b93df4182ab867ad5cf9a092e32b9", + "from": "github:zxing-js/library#a1a3481f456b93df4182ab867ad5cf9a092e32b9", "requires": { "text-encoding": "^0.6.4", "ts-custom-error": "^2.2.1" @@ -11802,17 +11801,6 @@ } } }, - "fsm-as-promised": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/fsm-as-promised/-/fsm-as-promised-0.13.2.tgz", - "integrity": "sha1-X04RCGgotwoZItx7T4HAgX1ugjg=", - "dev": true, - "requires": { - "es6-promise": "^4.0.2", - "lodash": "^4.16.2", - "stampit": "^3.0.1" - } - }, "fstream": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", @@ -15624,17 +15612,6 @@ } } }, - "instascan": { - "version": "github:brunobar79/instascan#141f7b2aa12c9e833de41ba3daf37a1c1b7c070e", - "from": "github:brunobar79/instascan#141f7b2aa12c9e833de41ba3daf37a1c1b7c070e", - "dev": true, - "requires": { - "babel-polyfill": "^6.9.1", - "fsm-as-promised": "^0.13.0", - "visibilityjs": "^1.2.3", - "webrtc-adapter": "^6.3.0" - } - }, "interpret": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", @@ -27190,15 +27167,6 @@ "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-3.6.2.tgz", "integrity": "sha512-OfWGQTb9vnwRjwtA2QwpG2ICclHC3pgXZO5xt8H2EfgDquO0qVdSb5T88L4qJVAEugbS56pAuV4XZM58UX8ulw==" }, - "rtcpeerconnection-shim": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/rtcpeerconnection-shim/-/rtcpeerconnection-shim-1.2.13.tgz", - "integrity": "sha512-Xz4zQLZNs9lFBvqbaHGIjLWtyZ1V82ec5r+WNEo7NlIx3zF5M3ytn9mkkfYeZmpE032cNg3Vvf0rP8kNXUNd9w==", - "dev": true, - "requires": { - "sdp": "^2.6.0" - } - }, "run-async": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", @@ -27517,12 +27485,6 @@ } } }, - "sdp": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/sdp/-/sdp-2.7.4.tgz", - "integrity": "sha512-0+wTfgvUUEGcvvFoHIC0aiGbx6gzwAUm8FkKt5Oqqkjf9mEEDLgwnoDKX7MYTGXrNNwzikVbutJ+OVNAGmJBQw==", - "dev": true - }, "secp256k1": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.4.0.tgz", @@ -28572,12 +28534,6 @@ "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" }, - "stampit": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/stampit/-/stampit-3.2.1.tgz", - "integrity": "sha1-lTpBpJRYoLKG/7HjydbOcDblids=", - "dev": true - }, "state-toggle": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/state-toggle/-/state-toggle-1.0.0.tgz", @@ -31686,12 +31642,6 @@ } } }, - "visibilityjs": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/visibilityjs/-/visibilityjs-1.2.8.tgz", - "integrity": "sha512-Y+aL3OUX88b+/VSmkmC2ApuLbf0grzbNLpCfIDSw3BzTU6PqcPsdgIOaw8b+eZoy+DdQqnVN3y/Evow9vQq9Ig==", - "dev": true - }, "vlq": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz", @@ -33287,16 +33237,6 @@ } } }, - "webrtc-adapter": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/webrtc-adapter/-/webrtc-adapter-6.3.0.tgz", - "integrity": "sha512-WRLIEzXLCTSifhR1tqiK+HXuySLQ+8vESHBeJ0Uq5N9Eewa2hL+54fKnMqtB5sCSG7/crfntdovpp4R4ttvd8w==", - "dev": true, - "requires": { - "rtcpeerconnection-shim": "^1.2.10", - "sdp": "^2.7.0" - } - }, "websocket": { "version": "1.0.26", "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.26.tgz", diff --git a/package.json b/package.json index 1ab582428..8ff50d178 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ }, "dependencies": { "@material-ui/core": "^1.0.0", - "@zxing/library": "^0.7.0", + "@zxing/library": "github:zxing-js/library#a1a3481f456b93df4182ab867ad5cf9a092e32b9", "abi-decoder": "^1.0.9", "asmcrypto.js": "0.22.0", "async": "^2.5.0", 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 60f97ab32..df7bcb7cc 100644 --- a/ui/app/components/send/send-content/send-content.component.js +++ b/ui/app/components/send/send-content/send-content.component.js @@ -20,7 +20,7 @@ export default class SendContent extends Component {
this.props.updateGas(updateData)} + updateGas={(updateData) => this.props.updateGas(updateData)} scanQrCode={ _ => this.props.scanQrCode()} /> this.props.updateGas(updateData)} /> 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 321d1cfac..1163dcffc 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 @@ -17,6 +17,7 @@ export default class SendToRow extends Component { updateGas: PropTypes.func, updateSendTo: PropTypes.func, updateSendToError: PropTypes.func, + scanQrCode: PropTypes.func, }; static contextTypes = { diff --git a/ui/app/components/send/send.selectors.js b/ui/app/components/send/send.selectors.js index 4e81d1f9e..ab3f6d34b 100644 --- a/ui/app/components/send/send.selectors.js +++ b/ui/app/components/send/send.selectors.js @@ -286,4 +286,4 @@ function transactionsSelector (state) { function getQrCodeData (state) { return state.appState.qrCodeData -} \ No newline at end of file +} diff --git a/ui/app/components/send/to-autocomplete/to-autocomplete.js b/ui/app/components/send/to-autocomplete/to-autocomplete.js index 2b8923dd1..14e30e84c 100644 --- a/ui/app/components/send/to-autocomplete/to-autocomplete.js +++ b/ui/app/components/send/to-autocomplete/to-autocomplete.js @@ -99,7 +99,7 @@ ToAutoComplete.prototype.render = function () { return h('div.send-v2__to-autocomplete', {}, [ - h(`input.send-v2__to-autocomplete__input${qrScanner?'.with-qr':''}`, { + h(`input.send-v2__to-autocomplete__input${qrScanner ? '.with-qr' : ''}`, { placeholder: this.context.t('recipientAddress'), className: inError ? `send-v2__error-border` : '', value: to,