@metamask/obs-store@5.0.0 (#10092)

feature/default_network_editable
Erik Marks 4 years ago committed by GitHub
parent ce70c86774
commit e05be40d92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      app/scripts/background.js
  2. 2
      app/scripts/controllers/alert.js
  3. 2
      app/scripts/controllers/app-state.js
  4. 2
      app/scripts/controllers/cached-balances.js
  5. 2
      app/scripts/controllers/ens/index.js
  6. 2
      app/scripts/controllers/incoming-transactions.js
  7. 2
      app/scripts/controllers/metametrics.js
  8. 3
      app/scripts/controllers/network/network.js
  9. 2
      app/scripts/controllers/onboarding.js
  10. 2
      app/scripts/controllers/permissions/index.js
  11. 2
      app/scripts/controllers/preferences.js
  12. 2
      app/scripts/controllers/swaps.js
  13. 2
      app/scripts/controllers/threebox.js
  14. 2
      app/scripts/controllers/token-rates.js
  15. 2
      app/scripts/controllers/transactions/index.js
  16. 2
      app/scripts/controllers/transactions/tx-state-manager.js
  17. 2
      app/scripts/lib/ComposableObservableStore.js
  18. 2
      app/scripts/lib/account-tracker.js
  19. 2
      app/scripts/lib/decrypt-message-manager.js
  20. 2
      app/scripts/lib/encryption-public-key-manager.js
  21. 2
      app/scripts/lib/message-manager.js
  22. 2
      app/scripts/lib/personal-message-manager.js
  23. 2
      app/scripts/lib/typed-message-manager.js
  24. 2
      package.json
  25. 2
      test/unit/app/ComposableObservableStore.js
  26. 2
      test/unit/app/controllers/detect-tokens-test.js
  27. 2
      test/unit/app/controllers/ens-controller-test.js
  28. 2
      test/unit/app/controllers/permissions/permissions-log-controller-test.js
  29. 2
      test/unit/app/controllers/preferences-controller-test.js
  30. 2
      test/unit/app/controllers/swaps-test.js
  31. 2
      test/unit/app/controllers/token-rates-controller.js
  32. 2
      test/unit/app/controllers/transactions/tx-controller-test.js
  33. 9
      yarn.lock

@ -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)

@ -1,4 +1,4 @@
import ObservableStore from 'obs-store'
import { ObservableStore } from '@metamask/obs-store'
import {
TOGGLEABLE_ALERT_TYPES,
WEB3_SHIM_USAGE_ALERT_STATES,

@ -1,5 +1,5 @@
import EventEmitter from 'events'
import ObservableStore from 'obs-store'
import { ObservableStore } from '@metamask/obs-store'
export default class AppStateController extends EventEmitter {
/**

@ -1,4 +1,4 @@
import ObservableStore from 'obs-store'
import { ObservableStore } from '@metamask/obs-store'
/**
* @typedef {Object} CachedBalancesOptions

@ -1,6 +1,6 @@
import punycode from 'punycode/punycode'
import ethUtil from 'ethereumjs-util'
import ObservableStore from 'obs-store'
import { ObservableStore } from '@metamask/obs-store'
import log from 'loglevel'
import Ens from './ens'

@ -1,4 +1,4 @@
import ObservableStore from 'obs-store'
import { ObservableStore } from '@metamask/obs-store'
import log from 'loglevel'
import BN from 'bn.js'
import createId from '../lib/random-id'

@ -1,5 +1,5 @@
import { merge, omit } from 'lodash'
import ObservableStore from 'obs-store'
import { ObservableStore } from '@metamask/obs-store'
import { bufferToHex, sha3 } from 'ethereumjs-util'
import { ENVIRONMENT_TYPE_BACKGROUND } from '../lib/enums'
import {

@ -1,7 +1,6 @@
import assert from 'assert'
import EventEmitter from 'events'
import ObservableStore from 'obs-store'
import ComposedStore from 'obs-store/lib/composed'
import { ComposedStore, ObservableStore } from '@metamask/obs-store'
import { JsonRpcEngine } from 'json-rpc-engine'
import providerFromEngine from 'eth-json-rpc-middleware/providerFromEngine'
import log from 'loglevel'

@ -1,4 +1,4 @@
import ObservableStore from 'obs-store'
import { ObservableStore } from '@metamask/obs-store'
import log from 'loglevel'
/**

@ -1,6 +1,6 @@
import nanoid from 'nanoid'
import { JsonRpcEngine } from 'json-rpc-engine'
import ObservableStore from 'obs-store'
import { ObservableStore } from '@metamask/obs-store'
import log from 'loglevel'
import { CapabilitiesController as RpcCap } from 'rpc-cap'
import { ethErrors } from 'eth-json-rpc-errors'

@ -1,5 +1,5 @@
import { strict as assert } from 'assert'
import ObservableStore from 'obs-store'
import { ObservableStore } from '@metamask/obs-store'
import { ethErrors } from 'eth-json-rpc-errors'
import { normalize as normalizeAddress } from 'eth-sig-util'
import { isValidAddress } from 'ethereumjs-util'

@ -1,7 +1,7 @@
import { ethers } from 'ethers'
import log from 'loglevel'
import BigNumber from 'bignumber.js'
import ObservableStore from 'obs-store'
import { ObservableStore } from '@metamask/obs-store'
import { mapValues, cloneDeep } from 'lodash'
import abi from 'human-standard-token-abi'
import { calcTokenAmount } from '../../../ui/app/helpers/utils/token-util'

@ -1,4 +1,4 @@
import ObservableStore from 'obs-store'
import { ObservableStore } from '@metamask/obs-store'
/* eslint-disable import/first,import/order */
const Box = process.env.IN_TEST

@ -1,4 +1,4 @@
import ObservableStore from 'obs-store'
import { ObservableStore } from '@metamask/obs-store'
import log from 'loglevel'
import { normalize as normalizeAddress } from 'eth-sig-util'
import ethUtil from 'ethereumjs-util'

@ -1,5 +1,5 @@
import EventEmitter from 'safe-event-emitter'
import ObservableStore from 'obs-store'
import { ObservableStore } from '@metamask/obs-store'
import ethUtil from 'ethereumjs-util'
import Transaction from 'ethereumjs-tx'
import EthQuery from 'ethjs-query'

@ -1,5 +1,5 @@
import EventEmitter from 'safe-event-emitter'
import ObservableStore from 'obs-store'
import { ObservableStore } from '@metamask/obs-store'
import log from 'loglevel'
import createId from '../../lib/random-id'
import { TRANSACTION_STATUSES } from '../../../../shared/constants/transaction'

@ -1,4 +1,4 @@
import ObservableStore from 'obs-store'
import { ObservableStore } from '@metamask/obs-store'
/**
* An ObservableStore that can composes a flat

@ -9,7 +9,7 @@
import EthQuery from 'eth-query'
import ObservableStore from 'obs-store'
import { ObservableStore } from '@metamask/obs-store'
import log from 'loglevel'
import pify from 'pify'
import Web3 from 'web3'

@ -1,5 +1,5 @@
import EventEmitter from 'events'
import ObservableStore from 'obs-store'
import { ObservableStore } from '@metamask/obs-store'
import ethUtil from 'ethereumjs-util'
import { ethErrors } from 'eth-json-rpc-errors'
import log from 'loglevel'

@ -1,5 +1,5 @@
import EventEmitter from 'events'
import ObservableStore from 'obs-store'
import { ObservableStore } from '@metamask/obs-store'
import { ethErrors } from 'eth-json-rpc-errors'
import log from 'loglevel'
import createId from './random-id'

@ -1,5 +1,5 @@
import EventEmitter from 'events'
import ObservableStore from 'obs-store'
import { ObservableStore } from '@metamask/obs-store'
import ethUtil from 'ethereumjs-util'
import { ethErrors } from 'eth-json-rpc-errors'
import createId from './random-id'

@ -1,5 +1,5 @@
import EventEmitter from 'events'
import ObservableStore from 'obs-store'
import { ObservableStore } from '@metamask/obs-store'
import ethUtil from 'ethereumjs-util'
import { ethErrors } from 'eth-json-rpc-errors'
import log from 'loglevel'

@ -1,6 +1,6 @@
import EventEmitter from 'events'
import assert from 'assert'
import ObservableStore from 'obs-store'
import { ObservableStore } from '@metamask/obs-store'
import { ethErrors } from 'eth-json-rpc-errors'
import { typedSignatureHash, TYPED_MESSAGE_SCHEMA } from 'eth-sig-util'
import { isValidAddress } from 'ethereumjs-util'

@ -83,6 +83,7 @@
"@metamask/inpage-provider": "^8.0.1",
"@metamask/jazzicon": "^2.0.0",
"@metamask/logo": "^2.5.0",
"@metamask/obs-store": "^5.0.0",
"@popperjs/core": "^2.4.0",
"@reduxjs/toolkit": "^1.3.2",
"@sentry/browser": "^5.26.0",
@ -140,7 +141,6 @@
"nanoid": "^2.1.6",
"nonce-tracker": "^1.0.0",
"obj-multiplex": "^1.0.0",
"obs-store": "^4.0.3",
"pify": "^5.0.0",
"post-message-stream": "^3.0.0",
"promise-to-callback": "^1.0.0",

@ -1,5 +1,5 @@
import assert from 'assert'
import ObservableStore from 'obs-store'
import { ObservableStore } from '@metamask/obs-store'
import ComposableObservableStore from '../../../app/scripts/lib/ComposableObservableStore'
describe('ComposableObservableStore', function () {

@ -1,6 +1,6 @@
import assert from 'assert'
import sinon from 'sinon'
import ObservableStore from 'obs-store'
import { ObservableStore } from '@metamask/obs-store'
import contracts from '@metamask/contract-metadata'
import BigNumber from 'bignumber.js'

@ -1,6 +1,6 @@
import assert from 'assert'
import sinon from 'sinon'
import ObservableStore from 'obs-store'
import { ObservableStore } from '@metamask/obs-store'
import EnsController from '../../../../app/scripts/controllers/ens'
const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000'

@ -1,5 +1,5 @@
import { strict as assert } from 'assert'
import ObservableStore from 'obs-store'
import { ObservableStore } from '@metamask/obs-store'
import nanoid from 'nanoid'
import { useFakeTimers } from 'sinon'

@ -1,5 +1,5 @@
import assert from 'assert'
import ObservableStore from 'obs-store'
import { ObservableStore } from '@metamask/obs-store'
import sinon from 'sinon'
import PreferencesController from '../../../../app/scripts/controllers/preferences'

@ -4,7 +4,7 @@ import sinon from 'sinon'
import { ethers } from 'ethers'
import { mapValues } from 'lodash'
import BigNumber from 'bignumber.js'
import ObservableStore from 'obs-store'
import { ObservableStore } from '@metamask/obs-store'
import {
ROPSTEN_NETWORK_ID,
MAINNET_NETWORK_ID,

@ -1,6 +1,6 @@
import assert from 'assert'
import sinon from 'sinon'
import ObservableStore from 'obs-store'
import { ObservableStore } from '@metamask/obs-store'
import TokenRatesController from '../../../../app/scripts/controllers/token-rates'
describe('TokenRatesController', function () {

@ -2,7 +2,7 @@ import { strict as assert } from 'assert'
import EventEmitter from 'events'
import ethUtil from 'ethereumjs-util'
import EthTx from 'ethereumjs-tx'
import ObservableStore from 'obs-store'
import { ObservableStore } from '@metamask/obs-store'
import sinon from 'sinon'
import TransactionController from '../../../../../app/scripts/controllers/transactions'

@ -2145,6 +2145,15 @@
gl-mat4 "1.1.4"
gl-vec3 "1.0.3"
"@metamask/obs-store@^5.0.0":
version "5.0.0"
resolved "https://registry.yarnpkg.com/@metamask/obs-store/-/obs-store-5.0.0.tgz#cf2213874c62186a8a4c80f0c402af62a0a877a9"
integrity sha512-9Az33hULCDVUVpBzNAdjPPgNTfs6paC38LYZv4xazt03mJt4jwWFFTP79TtF4grXfiAtUs/UZOktW4Vp+r37rw==
dependencies:
"@metamask/safe-event-emitter" "^2.0.0"
readable-stream "^2.2.2"
through2 "^2.0.3"
"@metamask/safe-event-emitter@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@metamask/safe-event-emitter/-/safe-event-emitter-2.0.0.tgz#af577b477c683fad17c619a78208cede06f9605c"

Loading…
Cancel
Save