REF: convert PlaceholderWallet to typescript

This commit is contained in:
Gabriele Genta 2021-07-21 15:14:20 +02:00 committed by Overtorment
parent 518671f6bf
commit bfb10a0278

View file

@ -4,34 +4,38 @@ export class PlaceholderWallet extends AbstractWallet {
static type = 'placeholder';
static typeReadable = 'Placeholder';
_isFailure: boolean;
constructor() {
super();
this._isFailure = false;
}
setSecret(newSecret) {
setSecret(newSecret: string): this {
// so TRY AGAIN when something goes wrong during import has more consistent prefilled text
this.secret = newSecret;
return this;
}
allowSend() {
allowSend(): boolean {
return false;
}
getLabel() {
getLabel(): string {
// no longer used in wallets carousel
return this.getIsFailure() ? 'Wallet Import' : 'Importing Wallet...';
}
allowReceive() {
allowReceive(): boolean {
return false;
}
getIsFailure() {
getIsFailure(): boolean {
return this._isFailure;
}
setIsFailure(value) {
setIsFailure(value: boolean): void {
this._isFailure = value;
}
}