Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor() {
super();
this._export("loadDbData", "getAccountRefs");
this.state = this._getInitialState();
this.bindListeners({onAddPrivateKey: PrivateKeyActions.addKey});
this.no_account_refs = Immutable.Set(); // Set of account ids
ChainStore.subscribe(this.chainStoreUpdate.bind(this));
}
constructor() {
super();
this.state = {wallet: null, saving_keys: false};
// Confirm only works when there is a UI (this is for mocha unit tests)
this.confirm_transactions = true;
ChainStore.subscribe(this.checkNextGeneratedKey.bind(this));
this.generateNextKey_pubcache = [];
// WalletDb use to be a plan old javascript class (not an Alt store) so
// for now many methods need to be exported...
this._export(
"checkNextGeneratedKey",
"getWallet",
"onLock",
"isLocked",
"decryptTcomb_PrivateKey",
"getPrivateKey",
"process_transaction",
"transaction_update",
"transaction_update_keys",
"getBrainKey",
"getBrainKeyPrivate",
"onCreateWallet",
_setListeners() {
try {
window.addEventListener("resize", this._getWindowHeight, {
capture: false,
passive: true
});
NotificationStore.listen(this._onNotificationChange.bind(this));
ChainStore.subscribe(this._chainStoreSub);
AccountStore.tryToSetCurrentAccount();
} catch (e) {
console.error("e:", e);
}
}
_setListeners() {
try {
window.addEventListener("resize", this._getWindowHeight, {
capture: false,
passive: true
});
NotificationStore.listen(this._onNotificationChange.bind(this));
ChainStore.subscribe(this._chainStoreSub);
AccountStore.tryToSetCurrentAccount();
} catch (e) {
console.error("e:", e);
}
}
componentWillMount() {
ChainStore.subscribe(this.update);
this.update();
}
componentWillMount() {
this._updateState();
ChainStore.subscribe(this._updateState);
}
componentWillMount() {
this.update();
ChainStore.subscribe(this.update);
}