mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-02-26 17:50:38 +00:00
* Check in. * Add read only wallet and new types for that. Convert some components to require full wallet. * Fix readonly property, fix uncaught throw. * Disable address only on some tabs. * Use FullWalletOnly render callback to handle signing. * Work around uncertain wallet type. * Fix function args. * Undo bug fix that should be done in another branch. * Disable button while address is bad. * Remove log. * Convert anonymous functions to class functions.
19 lines
480 B
TypeScript
19 lines
480 B
TypeScript
import { RawTransaction } from 'libs/transaction';
|
|
|
|
interface IBaseWallet {
|
|
isReadOnly?: boolean;
|
|
getAddressString(): Promise<string> | string;
|
|
}
|
|
|
|
export interface IReadOnlyWallet extends IBaseWallet {
|
|
isReadOnly: true;
|
|
}
|
|
|
|
export interface IFullWallet extends IBaseWallet {
|
|
isReadOnly?: false;
|
|
signRawTransaction(tx: RawTransaction): Promise<string> | string;
|
|
signMessage(msg: string): Promise<string> | string;
|
|
}
|
|
|
|
export type IWallet = IReadOnlyWallet | IFullWallet;
|