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
No known key found for this signature in database
GPG Key ID: 2036DA2ADDFB0842

View File

@ -10,10 +10,12 @@ export interface LedgerCommunicationClient {
* NodeJs and Browser communication are supported.
*/
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: (
derivationPath: string,
askForDeviceConfirmation?: boolean,
shouldGetChainCode?: boolean,
askForDeviceConfirmation: boolean,
shouldGetChainCode: true,
) => Promise<LedgerGetAddressResult>;
signTransaction: (derivationPath: string, rawTxHex: string) => Promise<ECSignatureString>;
signPersonalMessage: (derivationPath: string, messageHex: string) => Promise<ECSignature>;