mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-09 18:45:38 +00:00
0fa0004e3b
* Add 'Display Address' button * Remove unnecessary css * Pass full dPath when getting addr * Add typings for ledger vendor files * Replace ledger vendor files w/ ledgerco module * Remove u2f-api file * Update TrezorConnect api & types * Add displayAddress method to hardware wallets * install libusb-1.0 on ci * Change address, dpath, and index to protected attributes * Use CommonJS export syntax * Pin package version * Prompt user to confirm address on hardware wallet * Pass full path when getting trezor addr
20 lines
434 B
TypeScript
20 lines
434 B
TypeScript
export class DeterministicWallet {
|
|
protected address: string;
|
|
protected dPath: string;
|
|
protected index: number;
|
|
|
|
constructor(address: string, dPath: string, index: number) {
|
|
this.address = address;
|
|
this.dPath = dPath;
|
|
this.index = index;
|
|
}
|
|
|
|
public getAddressString(): Promise<string> {
|
|
return Promise.resolve(this.address);
|
|
}
|
|
|
|
public getPath(): string {
|
|
return `${this.dPath}/${this.index}`;
|
|
}
|
|
}
|