BlueWallet/class/wallets/placeholder-wallet.js
2020-10-07 15:43:58 +01:00

36 lines
685 B
JavaScript

import { AbstractWallet } from './abstract-wallet';
export class PlaceholderWallet extends AbstractWallet {
static type = 'placeholder';
static typeReadable = 'Placeholder';
constructor() {
super();
this._isFailure = false;
}
setSecret(newSecret) {
// so TRY AGAIN when something goes wrong during import has more consistent prefilled text
this.secret = newSecret;
}
allowSend() {
return false;
}
getLabel() {
return this.getIsFailure() ? 'Wallet Import' : 'Importing Wallet...';
}
allowReceive() {
return false;
}
getIsFailure() {
return this._isFailure;
}
setIsFailure(value) {
this._isFailure = value;
}
}