From d345ca75a5da579d95bcb2cce8efd5e0ead08886 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 70e8dcf..a8f7f52 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 fdd45fa..f06826a 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 004e662..f585cfe 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 5991aee..0e16d65 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": {