From 2c95ee60b95051266463dcafc3edfaf8659df33a Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Fri, 21 Jul 2017 21:19:38 +0200 Subject: [PATCH] Fix QR scanner returning null on confirm (#6122) --- .../transactionPendingFormConfirm.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/transactionPendingFormConfirm.js b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/transactionPendingFormConfirm.js index f6c4883a8..e327a0322 100644 --- a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/transactionPendingFormConfirm.js +++ b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/transactionPendingFormConfirm.js @@ -407,7 +407,11 @@ export default class TransactionPendingFormConfirm extends Component { onScan = (signature) => { const { chainId, rlp, tx, data, decrypt } = this.state.qr; - if (signature && signature.substr(0, 2) !== '0x') { + if (!signature) { + return; + } + + if (signature.substr(0, 2) !== '0x') { signature = `0x${signature}`; }