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 type = 'placeholder';
static typeReadable = 'Placeholder'; static typeReadable = 'Placeholder';
_isFailure: boolean;
constructor() { constructor() {
super(); super();
this._isFailure = false; this._isFailure = false;
} }
setSecret(newSecret) { setSecret(newSecret: string): this {
// so TRY AGAIN when something goes wrong during import has more consistent prefilled text // so TRY AGAIN when something goes wrong during import has more consistent prefilled text
this.secret = newSecret; this.secret = newSecret;
return this;
} }
allowSend() { allowSend(): boolean {
return false; return false;
} }
getLabel() { getLabel(): string {
// no longer used in wallets carousel // no longer used in wallets carousel
return this.getIsFailure() ? 'Wallet Import' : 'Importing Wallet...'; return this.getIsFailure() ? 'Wallet Import' : 'Importing Wallet...';
} }
allowReceive() { allowReceive(): boolean {
return false; return false;
} }
getIsFailure() { getIsFailure(): boolean {
return this._isFailure; return this._isFailure;
} }
setIsFailure(value) { setIsFailure(value: boolean): void {
this._isFailure = value; this._isFailure = value;
} }
} }