@dashevo/wallet-lib
Version:
Light wallet library for Dash
21 lines (17 loc) • 360 B
JavaScript
class LocalForageAdapterMock {
constructor() {
this.isConfig = false;
this.keys = {};
}
config() {
this.isConfig = true;
}
setItem(key, item) {
this.keys[key] = JSON.stringify(item);
return item;
}
getItem(key) {
return this.keys[key] ? JSON.parse(this.keys[key]) : null;
}
}
module.exports = LocalForageAdapterMock;