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

Remove unused type guards

gomesalexandre opened this issue · comments

commented

Overview

We define wallet methods as type guards in hdwallet-core

However, we don't use them as type guards but only as regular utility methods to check for feature detection e.g

export function supportsBTC(wallet: HDWallet): wallet is BTCWallet {
return _.isObject(wallet) && (wallet as any)._supportsBTC;
}

We should remove the unused type guard in all these methods.

References and additional details

hdwallet-core methods implementations:

https://github.com/shapeshift/hdwallet/blob/master/packages/hdwallet-core/src/wallet.ts

Acceptance Criteria

  • The hdwallet-core type guards are removed

Need By Date

No response

Screenshots/Mockups

No response

Estimated effort

No response

Thank you for this @gomesalexandre!