|
|
|
@ -16,8 +16,7 @@ import pump from 'pump' |
|
|
|
|
import debounce from 'debounce-stream' |
|
|
|
|
import log from 'loglevel' |
|
|
|
|
import extension from 'extensionizer' |
|
|
|
|
import storeTransform from 'obs-store/lib/transform' |
|
|
|
|
import asStream from 'obs-store/lib/asStream' |
|
|
|
|
import { storeAsStream, storeTransformStream } from '@metamask/obs-store' |
|
|
|
|
import PortStream from 'extension-port-stream' |
|
|
|
|
import { captureException } from '@sentry/browser' |
|
|
|
|
import migrations from './migrations' |
|
|
|
@ -250,9 +249,9 @@ function setupController(initState, initLangCode) { |
|
|
|
|
|
|
|
|
|
// setup state persistence
|
|
|
|
|
pump( |
|
|
|
|
asStream(controller.store), |
|
|
|
|
storeAsStream(controller.store), |
|
|
|
|
debounce(1000), |
|
|
|
|
storeTransform(versionifyData), |
|
|
|
|
storeTransformStream(versionifyData), |
|
|
|
|
createStreamSink(persistData), |
|
|
|
|
(error) => { |
|
|
|
|
log.error('MetaMask - Persistence pipeline failed', error) |
|
|
|
|