From 4993bdb964dece86ab56506971cdd7bdc8da4206 Mon Sep 17 00:00:00 2001 From: kyranjamie Date: Mon, 21 Sep 2020 15:43:55 +0200 Subject: [PATCH] fix: reset form on failed password, closes #249 --- .vscode/settings.json | 4 +++- app/modals/transaction/transaction-modal.tsx | 6 +++++- app/package.json | 2 +- package.json | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 70e8dcfda..a8f7f524f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -17,9 +17,11 @@ "search.exclude": { ".git": true, ".eslintcache": true, - "app/dist": true, + "app/dist/**": true, "app/main.prod.js": true, + "app/renderer.prod.js": true, "app/main.prod.js.map": true, + "app/node_modules": true, "dll": true, "release": true, "node_modules": true, diff --git a/app/modals/transaction/transaction-modal.tsx b/app/modals/transaction/transaction-modal.tsx index fdd45fa8a..f06826a43 100644 --- a/app/modals/transaction/transaction-modal.tsx +++ b/app/modals/transaction/transaction-modal.tsx @@ -45,8 +45,9 @@ import { DecryptWalletForm } from './decrypt-wallet-form'; import { SignTxWithLedger } from './sign-tx-with-ledger'; import { selectPublicKey } from '@store/keys/keys.reducer'; import { FailedBroadcastError } from './failed-broadcast-error'; -import { createMessageSignature } from '@blockstack/stacks-transactions/lib/authorization'; + import { LedgerConnectStep } from '@hooks/use-ledger'; +import { createMessageSignature } from '@blockstack/stacks-transactions/lib/authorization'; interface TxModalProps { balance: string; @@ -112,6 +113,8 @@ export const TransactionModal: FC = ({ balance, address }) => { tx = await makeSTXTokenTransfer({ ...txDetails, senderKey: privateKey }); } catch (e) { setDecryptionError(e); + setIsDecrypting(false); + return; } } @@ -138,6 +141,7 @@ export const TransactionModal: FC = ({ balance, address }) => { } } catch (e) { setHasSubmitted(false); + return; } } diff --git a/app/package.json b/app/package.json index 004e662f5..f585cfe35 100644 --- a/app/package.json +++ b/app/package.json @@ -1,7 +1,7 @@ { "name": "stacks-wallet", "productName": "Stacks Wallet", - "version": "4.0.0-beta", + "version": "4.0.0-beta.2", "description": "", "main": "./main.prod.js", "author": { diff --git a/package.json b/package.json index 5991aee98..0e16d65fe 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "stacks-wallet", "productName": "Stacks Wallet", - "version": "4.0.0-beta.1", + "version": "4.0.0-beta.2", "description": "Stacks Wallet 2.0 — Stacking", "prettier": "@blockstack/prettier-config", "author": {