1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-23 11:46:13 +02:00
Commit Graph

30 Commits

Author SHA1 Message Date
ryanml
2bfc3a093f
Using values from shared/constants/time to represent timing values (#11241) 2021-06-10 12:27:03 -07:00
Brad Decker
d9a2165f69
use safer toChecksum utility (#11117) 2021-05-17 16:19:39 -05:00
Brad Decker
d1f8171877
upgrade ethereumjs util (#10886) 2021-04-16 10:05:13 -05:00
Brad Decker
4c5edea294
fix contract exchange rate race condition (#10414) 2021-02-12 11:41:53 -06:00
Erik Marks
76a2a9bb8b
@metamask/eslint config@5.0.0 (#10358)
* @metamask/eslint-config@5.0.0
* Update eslintrc and prettierrc
* yarn lint:fix
2021-02-04 10:15:23 -08:00
Erik Marks
7159dd6867
Fetch with a timeout everywhere (#10101)
* Use fetchWithTimeout everywhere
* Memoize getFetchWithTimeout
* Require specified timeout
2021-01-19 08:41:57 -08:00
Erik Marks
e05be40d92
@metamask/obs-store@5.0.0 (#10092) 2020-12-16 13:14:49 -08:00
Brad Decker
2ebf8756a4
[RFC] add prettier to eslint (#8595) 2020-11-02 17:41:28 -06:00
Whymarrh Whitby
6df17dc90e
Fix accessor-pairs issues (#9680)
Refs #9663

See [`accessor-pairs`][1] for more information.

This change enables `accessor-pairs` and fixes the issues raised by the rule.

  [1]:https://eslint.org/docs/rules/accessor-pairs
2020-10-22 14:36:44 -02:30
Whymarrh Whitby
b6ccd22d6c
Update ESLint shared config to v3 (#9274)
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-08-19 13:57:05 -02:30
Mark Stacey
1f8a7a72c9
Fix TokenRatesController (#8780)
The `TokenRatesController` was accidentally broken in #8744, when the
logic for starting and stopping polling was moved from the `isActive`
property to start/stop functions.

A reference to the now-obsolete `isActive` property was accidentally
left behind, resulting in no exchange rate updates.
2020-06-10 16:53:37 -03:00
Brad Decker
456684ee7d
move activation logic into token rates controller (#8744) 2020-06-05 13:36:55 -05:00
Whymarrh Whitby
f5a125fe61
Move export defaults statements alongside their objects (#8525) 2020-05-05 19:49:38 -02:30
Mark Stacey
5ee1291662
Prevent accidental use of globals (#8340)
Previously all browser globals were allowed to be used anywhere by
ESLint because we had set the `env` property to `browser` in the ESLint
config. This has made it easy to accidentally use browser globals
(e.g. #8338), so it has been removed. Instead we now have a short list
of allowed globals.

All browser globals are now accessed as properties on `window`.

Unfortunately this change resulted in a few different confusing unit
test errors, as some of our unit tests setup assumed that a particular
global would be used via `window` or `global`. In particular,
`window.fetch` didn't work correctly because it wasn't patched by the
AbortController polyfill (only `global.fetch` was being patched).
The `jsdom-global` package we were using complicated matters by setting
all of the JSDOM `window` properties directly on `global`, overwriting
the `AbortController` for example.

The `helpers.js` test setup module has been simplified somewhat by
removing `jsdom-global` and constructing the JSDOM instance manually.
The JSDOM window is set on `window`, and a few properties are set on
`global` as well as needed by various dependencies. `node-fetch` and
the AbortController polyfill/patch now work as expected as well,
though `fetch` is only available on `window` now.
2020-04-15 14:23:27 -03:00
Whymarrh Whitby
a78cf0ef3a Enable arrow-parens ESLint rule 2020-02-15 17:04:21 -03:30
Whymarrh Whitby
92971d3c87
Migrate codebase to use ESM (#7730)
* Update eslint-plugin-import version

* Convert JS files to use ESM

* Update ESLint rules to check imports

* Fix test:unit:global command env

* Cleanup mock-dev script
2020-01-09 00:04:58 -03:30
Whymarrh Whitby
aa41057628
Update ESLint rules for curly braces style (#7477)
* eslint: Enable curly and brace-style

* yarn lint --fix
2019-11-19 20:33:20 -03:30
Paul Bouchon
47024fd9a5
feature: integrate gaba/CurrencyRateController (#6570) 2019-05-31 18:14:22 -04:00
Thomas Huang
c7492f4f54 Include token checksum address in prices lookup for token rates (#6526) 2019-04-30 14:19:58 -02:30
Paul Bouchon
a973a7420a
feature: switch token pricing to CoinGecko API (#6424) 2019-04-10 18:37:15 -04:00
Thomas Huang
3bd3e640b4 Set auto conversion off for token/eth conversion (#6005) 2019-01-10 10:36:30 -08:00
Paul Bouchon
45a9f40aa6
bugfix: normalize contract addresss when fetching exchange rates (#5863) 2018-11-30 11:52:00 -05:00
Paul Bouchon
0549782595
Update Balanc3 API (#5744)
* Update balanc3 API used in TokenRatesController

* Remove demo URL and use nativeCurrency when fetching token rates
2018-11-13 14:57:43 -05:00
kumavis
2c1bca1ab0 token-rates - protect against bad token data 2018-11-02 22:14:40 -04:00
bitpshr
8c5994abc9 Return 0 for token rate fetch failures 2018-04-26 18:31:54 -04:00
Dan Finlay
7ec775d614 Use latest balanc3 api for prices 2018-04-24 14:12:57 -07:00
Dan Finlay
a833f02f33 Use the metamask balanc3 dev price api
Fixes #4056
2018-04-23 16:39:33 -07:00
bitpshr
6dbdc87713 Add generated docs 2018-04-18 17:24:36 -04:00
bitpshr
b4912f29cd Disable token price polling when no client is active 2018-04-16 18:12:05 -04:00
bitpshr
d0447f9058 Maintain token prices using a background service 2018-04-16 11:47:06 -04:00