Skip to content

Commit

Permalink
♻️ Add TODO commments in the files that will be change
Browse files Browse the repository at this point in the history
  • Loading branch information
Osvaldo Vega committed Aug 19, 2019
1 parent dea1e4a commit 4c68d88
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
15 changes: 15 additions & 0 deletions app/src/hwManager.js
@@ -1,4 +1,19 @@
/* eslint-disable */
/**
* TODO - remove the logic of this file and use it in a external library/module
* This file will be on charge of communicate the electron app with the HW module/library
* this file should only containe a few functions.
*
* Init - Function - For observ/subscribe or listen to changes.
* getDevices - function - that retturn all connected devices.
* signInTX - function - sign in any kind of tx
* getPublicKey - function - get public key for other users like getAccounts (if the public key is used for retrive other information then dont need this func)
* getAccounts - function - retrive all accounts from device
* ping - function - function that check device status
*
* All of the above should be use for any HW device that will be implement in the future, right now
* only Ledger Nano S, Ledger Nano X, Trezor Model T and Trezor One.
**/

import win from './modules/win';
import { createCommand } from './utils';
Expand Down
6 changes: 6 additions & 0 deletions app/src/ledger.js
@@ -1,3 +1,9 @@
/**
* TODO - This file doesnt need to be here, this logic needs to be impleement in the module/library
* and how this works should be unknown for the electron part.
* Needs to remove duplicated code and improve logic for be more generic
*/

import { app, ipcMain } from 'electron'; // eslint-disable-line import/no-extraneous-dependencies
import Lisk from '@liskhq/lisk-client'; // eslint-disable-line import/no-extraneous-dependencies
import { LedgerAccount, SupportedCoin, DposLedger } from 'dpos-ledger-api'; // eslint-disable-line import/no-extraneous-dependencies
Expand Down
6 changes: 6 additions & 0 deletions app/src/trezor.js
@@ -1,6 +1,12 @@
/* eslint-disable no-bitwise */
/* eslint-disable */

/**
* TODO - This file doesnt need to be here, this logic needs to be impleement in the module/library
* and how this works should be unknown for the electron part.
* Needs to remove duplicated code and improve logic for be more generic
*/

import { ipcMain } from 'electron'; // eslint-disable-line import/no-extraneous-dependencies
import win from './modules/win';
import {
Expand Down
11 changes: 11 additions & 0 deletions src/utils/api/hwWallet.js
@@ -1,4 +1,15 @@
/* eslint-disable */

/**
* TODO - This file contains a lot of unnecessary logic and duplicated functions, this file should
* work as a communication center file for send and receive messages (data) from electron using the
* IPC command.
* If the data will be store in REDUX then this needs to be a middleware and once that receive the
* data submit the properly action.
* How the information is retrive from electron part should be unknown for this side of the app.
* Have this kind of file with this logic is necessary ONLY if we will support HW devices in web platform
*/

import TransportU2F from '@ledgerhq/hw-transport-u2f';
import TrezorConnect from 'trezor-connect';
import i18next from 'i18next';
Expand Down

0 comments on commit 4c68d88

Please sign in to comment.