Force shouldGetChainCode to true in types

This commit is contained in:
Jacob Evans
2018-03-06 08:57:54 -05:00
parent 7bfc499ec8
commit f3026e33fd

View File

@@ -10,10 +10,12 @@ export interface LedgerCommunicationClient {
* NodeJs and Browser communication are supported. * NodeJs and Browser communication are supported.
*/ */
export interface LedgerEthereumClient { export interface LedgerEthereumClient {
// shouldGetChainCode is defined as `true` instead of `boolean` because other types rely on the assumption
// that we get back the chain code and we don't have dependent types to express it properly
getAddress: ( getAddress: (
derivationPath: string, derivationPath: string,
askForDeviceConfirmation?: boolean, askForDeviceConfirmation: boolean,
shouldGetChainCode?: boolean, shouldGetChainCode: true,
) => Promise<LedgerGetAddressResult>; ) => Promise<LedgerGetAddressResult>;
signTransaction: (derivationPath: string, rawTxHex: string) => Promise<ECSignatureString>; signTransaction: (derivationPath: string, rawTxHex: string) => Promise<ECSignatureString>;
signPersonalMessage: (derivationPath: string, messageHex: string) => Promise<ECSignature>; signPersonalMessage: (derivationPath: string, messageHex: string) => Promise<ECSignature>;