From 9fa477b070208a315f56c469b5dbc08b2f512f4b Mon Sep 17 00:00:00 2001 From: Aditya Kulkarni Date: Thu, 12 Mar 2020 12:55:32 -0700 Subject: [PATCH] Remove dead code --- app/utils/SentTxStore.js | 50 ---------------------------------------- package.json | 1 - 2 files changed, 51 deletions(-) delete mode 100644 app/utils/SentTxStore.js diff --git a/app/utils/SentTxStore.js b/app/utils/SentTxStore.js deleted file mode 100644 index a66f65e..0000000 --- a/app/utils/SentTxStore.js +++ /dev/null @@ -1,50 +0,0 @@ -import os from 'os'; -import path from 'path'; -import fs from 'fs'; -import { remote } from 'electron'; -import { Transaction, TxDetail } from '../components/AppState'; - -export default class SentTxStore { - static locateSentTxStore() { - if (os.platform() === 'darwin') { - return path.join(remote.app.getPath('appData'), 'Zcash', 'senttxstore.dat'); - } - - if (os.platform() === 'linux') { - return path.join( - remote.app.getPath('home'), - '.local', - 'share', - 'zec-qt-wallet-org', - 'zec-qt-wallet', - 'senttxstore.dat' - ); - } - - return path.join(remote.app.getPath('appData'), 'Zcash', 'senttxstore.dat'); - } - - static async loadSentTxns(): Transaction[] { - try { - const sentTx = JSON.parse(await fs.promises.readFile(SentTxStore.locateSentTxStore())); - - return sentTx.map(s => { - const transction = new Transaction(); - transction.type = s.type; - transction.amount = s.amount; - transction.address = s.from; - transction.txid = s.txid; - transction.time = s.datetime; - transction.detailedTxns = [new TxDetail()]; - transction.detailedTxns[0].address = s.address; - transction.detailedTxns[0].amount = s.amount; - transction.detailedTxns[0].memo = s.memo; - - return transction; - }); - } catch (err) { - // If error for whatever reason (most likely, file not found), just return an empty array - return []; - } - } -} diff --git a/package.json b/package.json index 1b6627c..7cd93c7 100644 --- a/package.json +++ b/package.json @@ -297,7 +297,6 @@ "react-modal": "^3.11.1", "react-router": "^5.1.2", "react-router-dom": "^5.1.2", - "react-select": "^3.0.8", "react-tabs": "^3.1.0", "react-textarea-autosize": "^7.1.2", "source-map-support": "^0.5.16",