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

47 Commits

Author SHA1 Message Date
Brad Decker
9386e3cb03
create safer isValidAddress method (#11089) 2021-05-17 14:00:59 -05:00
Brad Decker
4080ed63a4
Refactor Tx State Manager (#10672)
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2021-03-30 09:54:05 -05:00
Brad Decker
5a233e4634
colocate tests in flat structure (#10655) 2021-03-16 16:00:08 -05: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
30ff153103
eth-rpc-errors@4.0.2 (#10226) 2021-01-20 22:06:41 -08:00
Erik Marks
baea1b57fb
Update transaction params validation (#9992)
* Update transaction params validation

* fixup! Update transaction params validation

* Update to/data error message

* fixup! Update to/data error message
2020-12-03 18:15:59 -08:00
Mark Stacey
14d85b1332
Make JSDoc formatting more consistent (#9796)
A few inconsistencies in JSDoc formatting have been fixed throughout
the project. Many issues remain; these were just the few things that
were easy to fix with a regular expression.

The changes include:

* Using lower-case for primitive types, but capitalizing non-primitive
 types
* Separating the parameter identifier and the description with a dash
* Omitting a dash between the return type and the return description
* Ensuring the parameter type is first and the identifier is second (in
 a few places it was backwards)
* Using square brackets to denote when a parameter is optional, rather
 than putting "(optional)" in the parameter description
* Including a type and identifier with every parameter
* Fixing inconsistent spacing, except where it's used for alignment
* Remove incorrectly formatted `@deprecated` tags that reference non-
 existent properties
* Remove lone comment block without accompanying function

Additionally, one parameter was renamed for clarity.
2020-11-10 14:00:41 -03:30
Brad Decker
a49a4a066c
expand transaction constants coverage (#9790)
* expand transaction constants coverage

* touchups

* dont import inside of e2e

* Update app/scripts/controllers/transactions/tx-state-manager.js

Co-authored-by: Mark Stacey <markjstacey@gmail.com>

* Update test/unit/app/controllers/transactions/tx-controller-test.js

Co-authored-by: Mark Stacey <markjstacey@gmail.com>

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-11-07 01:38:12 -06:00
Patryk Łucka
ee205b893f
Create custom addHexPrefix function (#9306)
* create custom addHexPrefix function

* switch to custom addHexPrefix

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
Co-authored-by: Erik Marks <rekmarks@protonmail.com>
2020-11-06 13:18:00 -08:00
Brad Decker
2ebf8756a4
[RFC] add prettier to eslint (#8595) 2020-11-02 17:41:28 -06:00
Whymarrh Whitby
2ae4720443
Fix words (#9038) 2020-07-20 14:32:49 -02:30
Mark Stacey
8ff1d05df3
Remove recipient blocklist checker (#8943)
It seems that this blocklist checker never worked correctly. Ever since
the initial commit, it was comparing the Number `1` to the `networkId`,
which is a string. Additionally, even if it did throw, the transaction
continued unhindered. The user could still approve it, and there was no
indication shown to the user that anything went wrong. Also some of the
blocklist entries were incorrectly mixed-case, and were never hit.

We can remove this for now, and re-add it later on after we rewrite the
transaction controller.
2020-07-08 18:34:54 -03:00
Erik Marks
652db3fd36
Use string network and chain IDs (#8628)
* convert network id enums to string

* stringify appropriate chain/network ids in tests

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-07-08 14:05:09 -07:00
Erik Marks
04de9a92c5
Fix signing method bugs (#8833)
* update signTypedData validation

* update tests for new eth-json-rpc-middleware

* remove lowercasing of tx 'from' addresses
2020-06-23 09:12:11 -07:00
Erik Marks
56004db8bf blocklisted -> blocked 2020-06-08 17:57:59 -07:00
Jenny Pollack
7a4bb7f73a replace blacklist with blocklist 2020-06-08 17:49:23 -07:00
Whymarrh Whitby
d908102636
Update tx utils JSDoc comments (#8372)
Co-authored-by: Jenny Pollack <jennypollack3@gmail.com>
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-04-20 16:42:24 -02:30
Whymarrh Whitby
9d535b949f
Rename recipientBlacklistChecker function (#8365) 2020-04-20 16:29:41 -02:30
Whymarrh Whitby
164923acd1
Export individual fns from tx-state-history-helpers (#8370) 2020-04-20 13:00:51 -02:30
Whymarrh Whitby
a83d26486c
Snapshot txMeta without cloning history (#8363) 2020-04-20 12:26:01 -02:30
Whymarrh Whitby
7c3ffeb841
Export blacklist direct from recipient-blacklist (#8364) 2020-04-20 12:06:02 -02:30
Whymarrh Whitby
a78cf0ef3a Enable arrow-parens ESLint rule 2020-02-15 17:04:21 -03:30
Mark Stacey
398a45bfdd
Replace clone dependency with cloneDeep from lodash (#7926)
This was done to reduce the number of direct dependencies we have. It
should be functionally equivalent. The bundle size should not change,
as we use `clone` as a transitive dependency in a number of places.
2020-01-29 13:14:33 -04:00
Mark Stacey
ac01c5c89a
Consistent jsdoc syntax (#7755)
* Specify type before parameter name

Various JSDoc `@param` entries were specified as `name {type}` rather
than `{type} name`.

A couple of `@return` entries have been given types as well.

* Use JSDoc optional syntax rather than Closure syntax

* Use @returns rather than @return

* Use consistent built-in type capitalization

Primitive types are lower-case, and Object is upper-case.

* Separate param/return description with a dash
2020-01-13 14:36:36 -04:00
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
6c1bce28ac
Fix a few instances of signature mismatches (#7704)
Co-Authored-By: Mark Stacey <markjstacey@gmail.com>
2019-12-16 19:54:52 -03:30
Whymarrh Whitby
16e6103a68 yarn lint --fix 2019-12-03 13:23:13 -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
Whymarrh Whitby
4d88e1cf86 Enable indent linting via ESLint (#6936)
* Enable indent linting via ESLint

* yarn run lint:fix
2019-07-31 10:17:11 -10:00
frankiebee
5cf5359e78 transactions - always hexprefix txParams on update; fixes #6724 2019-06-19 14:36:24 +02:00
kumavis
33cb0a8cb2 lint - fix recipient-blacklist.js 2018-06-15 11:07:56 -07:00
kumavis
83c02f90cf blacklist - recipient blacklist as js for inline comments 2018-06-15 10:47:42 -07:00
kumavis
753743e746
Update recipient-blacklist-config.json 2018-06-15 10:32:09 -07:00
Dan Finlay
a42299aab7
Add apparent phishing address to block list
In [this reddit post](https://www.reddit.com/r/Metamask/comments/8r3nsu/help_me_please_somebody_stole_my_ethers/) a user suggests they got some ether stolen after visiting IDEX. Their ether was sent to [this address](https://etherscan.io/address/0x9bcb0a9d99d815bb87ee3191b1399b1bcc46dc77), which is full of comments of people telling similar stories of being phished on IDEX. I think we can safely block this, and probably safe some people some money.
2018-06-15 08:55:39 -07:00
Csaba Solya
1dda0c6469 remove generating blocked accounts and use a config file instead 2018-05-30 21:15:59 +02:00
Csaba Solya
3e489ea165 fix documentation 2018-05-30 17:42:41 +02:00
Csaba Solya
cf73581c0e adding tests for recipient blacklist checker 2018-05-30 17:38:27 +02:00
Csaba Solya
6affd8f949 adding transaction controller tests 2018-05-30 16:24:40 +02:00
Csaba Solya
afb5788861 initial implementation 2018-05-30 15:53:18 +02:00
kumavis
8e1cad5ff6
tx-state-history-helper - use more readable Date.now method 2018-05-16 13:05:07 -07:00
Csaba Solya
2081768fc5 fix lint issues 2018-05-10 13:43:31 +02:00
Csaba Solya
9026651224 add time stamps to transaction history log entries 2018-05-10 13:26:02 +02:00
frankiebee
8ffce8b59d transactions - more docs and clean ups 2018-04-25 11:13:51 -07:00
frankiebee
eeb9390de8 meta - transactions - docs yo! 2018-04-19 11:46:15 -07:00
frankiebee
943eea043c fix up - more docs 2018-04-13 13:18:45 -07:00
frankiebee
5494aa4f9c transactions - lint fixes 2018-04-10 14:54:30 -07:00
frankiebee
2d7c3c2b00 meta - transactions - create a transactions dir in controller and move relevant files into it 2018-04-10 14:28:05 -07:00