desktop-wallet
desktop-wallet copied to clipboard
SymbolLedger code smells and bugs
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.
- 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
-
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
-
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....
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.