desktop-wallet icon indicating copy to clipboard operation
desktop-wallet copied to clipboard

SymbolLedger code smells and bugs

Open fboucquez opened this issue 3 years ago • 1 comments

Hi team, I'm trying to integrate the CLIs to Ledger based on the desktop wallet knowledge. There are some issues I can find in the code that is worth revisiting. I'm going to write them here.

  1. transport: any https://github.com/nemgrouplimited/symbol-desktop-wallet/blob/main/src/core/utils/Ledger.ts#L34 it should be
import Transport from '@ledgerhq/hw-transport';
...
transport:Transport
  1. number comparison (<) between string and numbers LEDGER_MAJOR_VERSION, LEDGER_MINOR_VERSION, LEDGER_PATCH_VERSION are strings? https://github.com/nemgrouplimited/symbol-desktop-wallet/blob/main/src/core/utils/Ledger.ts#L21 https://github.com/nemgrouplimited/symbol-desktop-wallet/blob/main/src/core/utils/Ledger.ts#L50

  2. not typescript bip32-path, there is not typescript types. TS compiler should complain when this happens. Is there a better alternative to the old bip32-path?

Probably more to come....

fboucquez avatar Jun 02 '21 13:06 fboucquez

number comparison (<) between string and numbers

I think most of the app version is defined in string format. IMO I didn't think it has any issue.

AnthonyLaw avatar Jun 08 '21 07:06 AnthonyLaw