BlueWallet/class/wallets/placeholder-wallet.js

37 lines
685 B
JavaScript
Raw Normal View History

2019-12-26 20:21:07 -06:00
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;
}
2019-12-26 20:21:07 -06:00
allowSend() {
return false;
}
getLabel() {
return this.getIsFailure() ? 'Wallet Import' : 'Importing Wallet...';
}
allowReceive() {
return false;
}
getIsFailure() {
return this._isFailure;
}
setIsFailure(value) {
this._isFailure = value;
}
}