shapeshift / hdwallet

A library for interacting with hardware wallets from JS/TS.

Home Page:https://hdwallet.shapeshift.now.sh/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`wallet._isWalletType`/`isWalletType(wallet)`-style type guards are verbose and redundant

mrnerdhair opened this issue · comments

The standard instanceof type guard provides all the utility these guards provide, and requires no extra manually-added (and manually-maintained) type information. Removing them will simplify the library API and the implementation of new wallets.

  • Replace all wallet._isWalletType/isWalletType(wallet)-style type guards with usage of instanceof.

Fixed by #435.