|
|
@ -1,10 +1,11 @@ |
|
|
|
const urlUtil = require('url') |
|
|
|
const urlUtil = require('url') |
|
|
|
const endOfStream = require('end-of-stream') |
|
|
|
const endOfStream = require('end-of-stream') |
|
|
|
const pipe = require('pump') |
|
|
|
const pump = require('pump') |
|
|
|
const log = require('loglevel') |
|
|
|
const log = require('loglevel') |
|
|
|
const extension = require('extensionizer') |
|
|
|
const extension = require('extensionizer') |
|
|
|
const LocalStorageStore = require('obs-store/lib/localStorage') |
|
|
|
const LocalStorageStore = require('obs-store/lib/localStorage') |
|
|
|
const storeTransform = require('obs-store/lib/transform') |
|
|
|
const storeTransform = require('obs-store/lib/transform') |
|
|
|
|
|
|
|
const asStream = require('obs-store/lib/asStream') |
|
|
|
const ExtensionPlatform = require('./platforms/extension') |
|
|
|
const ExtensionPlatform = require('./platforms/extension') |
|
|
|
const Migrator = require('./lib/migrator/') |
|
|
|
const Migrator = require('./lib/migrator/') |
|
|
|
const migrations = require('./migrations/') |
|
|
|
const migrations = require('./migrations/') |
|
|
@ -72,10 +73,10 @@ function setupController (initState) { |
|
|
|
global.metamaskController = controller |
|
|
|
global.metamaskController = controller |
|
|
|
|
|
|
|
|
|
|
|
// setup state persistence
|
|
|
|
// setup state persistence
|
|
|
|
pipe( |
|
|
|
pump( |
|
|
|
controller.store, |
|
|
|
asStream(controller.store), |
|
|
|
storeTransform(versionifyData), |
|
|
|
storeTransform(versionifyData), |
|
|
|
diskStore |
|
|
|
asStream(diskStore) |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
function versionifyData (state) { |
|
|
|
function versionifyData (state) { |
|
|
|