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

13370 Commits

Author SHA1 Message Date
ryanml
279c8072ed
Adding collectibles items overview (#12506)
* Adding collectibles items overview

* addressing feedback

Co-authored-by: Alex <adonesky@gmail.com>
2021-11-26 12:59:46 -06:00
Alex Donesky
0bed51b936
add and hook up setting to toggle on/off collectible autodetection (#12839) 2021-11-26 12:54:57 -06:00
Dan J Miller
35bab1065b
remove hiring link from readme (#12798) 2021-11-26 14:54:10 -03:30
Dan J Miller
91ceede1df
Sync master with develop (#12858)
* Version v10.6.3

* Fix "BigNumber Error: times() number type has more than 15 significant digits:" (#12802)

* Bump @metmamask/logo to v3.1.1 (#12822)

* Update changelog for v10.6.3

* We shouldn't be changing decimal places as user type, we should do that on blur. (#12631)

* We shouldn't be changing decimal places as user type, we should do that
on blur.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint fixes.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Refactor code.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Linter fixes.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Convert token input to BigNumber to handle decimals. (#12773)

* Fixes #12762

Adds a decimal length check for inputs and drops excess fractional part.
Another edgecase not accounted for is when a token's decimal precision is 0 and attempting sending decimals will result in omitting the fractional part.

* Change spies from sinon to jest and change onChange value to string.

* Adjust

* Remove sinon

* Add test for issue case

* DRY

* Simplify logic by using BigNumber

Co-authored-by: Dan Miller <danjm.com@gmail.com>

* Update changelog

* Ensure that handleChange in token-input.component handles empty values (#12835)

* Version v10.6.4

* update scams and network security risks link (#12752)

* Ignore sentry server errors in e2e tests (#12843)

* Ignore sentry server errors in e2e tests

* Update test/e2e/webdriver/driver.js

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

Co-authored-by: Dan J Miller <danjm.com@gmail.com>
Co-authored-by: Mark Stacey <markjstacey@gmail.com>

* Update changelog for v10.6.4

Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
Co-authored-by: Daniel <80175477+dan437@users.noreply.github.com>
Co-authored-by: Olusegun Akintayo <akintayo.segun@gmail.com>
Co-authored-by: Thomas Huang <tmashuang@users.noreply.github.com>
Co-authored-by: Mingliang Liu <brightliu77@gmail.com>
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2021-11-25 19:59:38 -03:30
0xdie
77d3f0a3e7
Fix: markdown (#12861) 2021-11-25 14:25:04 -08:00
Dan J Miller
74b3a3a1c8
Remove _removeBeforeUnload calls in confirm-encryption-public-key.component.js and confirm-decrypt-message.component.js (#12825) 2021-11-25 14:42:40 -03:30
Dan J Miller
57155dda1a
Sync develop with master (#12851)
* Version v10.6.3

* Fix "BigNumber Error: times() number type has more than 15 significant digits:" (#12802)

* Bump @metmamask/logo to v3.1.1 (#12822)

* Update changelog for v10.6.3

* We shouldn't be changing decimal places as user type, we should do that on blur. (#12631)

* We shouldn't be changing decimal places as user type, we should do that
on blur.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint fixes.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Refactor code.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Linter fixes.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Convert token input to BigNumber to handle decimals. (#12773)

* Fixes #12762

Adds a decimal length check for inputs and drops excess fractional part.
Another edgecase not accounted for is when a token's decimal precision is 0 and attempting sending decimals will result in omitting the fractional part.

* Change spies from sinon to jest and change onChange value to string.

* Adjust

* Remove sinon

* Add test for issue case

* DRY

* Simplify logic by using BigNumber

Co-authored-by: Dan Miller <danjm.com@gmail.com>

* Update changelog

* Ensure that handleChange in token-input.component handles empty values (#12835)

Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
Co-authored-by: Daniel <80175477+dan437@users.noreply.github.com>
Co-authored-by: Olusegun Akintayo <akintayo.segun@gmail.com>
Co-authored-by: Thomas Huang <tmashuang@users.noreply.github.com>
2021-11-25 08:58:03 -03:30
Thomas Huang
1792a1e787
Ignore sentry server errors in e2e tests (#12843)
* Ignore sentry server errors in e2e tests

* Update test/e2e/webdriver/driver.js

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

Co-authored-by: Dan J Miller <danjm.com@gmail.com>
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2021-11-25 08:17:33 -03:30
Etienne Dusseault
02177c4575
checkbox storybook (#12757) 2021-11-24 14:20:39 -08:00
George Marshall
1523b2353d
Adding className to togglebutton (#12838) 2021-11-24 14:15:10 -08:00
Etienne Dusseault
d5ba78f90f
Fix button-group.stories for new Storybook documentation (#12621)
* button-group

* remove usage table

* Update ui/components/ui/button-group/button-group.component.js

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Update ui/components/ui/button-group/README.mdx

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Update ui/components/ui/button-group/README.mdx

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Update ui/components/ui/button-group/README.mdx

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Update ui/components/ui/button-group/README.mdx

Co-authored-by: George Marshall <george.marshall@consensys.net>

Co-authored-by: George Marshall <george.marshall@consensys.net>
2021-11-24 13:46:45 -08:00
Dan J Miller
8721c80054
Ensure that handleChange in token-input.component handles empty values (#12835) 2021-11-24 16:40:13 -03:30
George Marshall
07f16d37be
Updating IconWithFallback to functional component, adding stories and docs (#12797) 2021-11-24 11:43:22 -08:00
Mingliang Liu
e7b82915fa
update scams and network security risks link (#12752) 2021-11-24 15:18:01 -03:30
Thomas Huang
d179344712
Convert token input to BigNumber to handle decimals. (#12773)
* Fixes #12762

Adds a decimal length check for inputs and drops excess fractional part.
Another edgecase not accounted for is when a token's decimal precision is 0 and attempting sending decimals will result in omitting the fractional part.

* Change spies from sinon to jest and change onChange value to string.

* Adjust

* Remove sinon

* Add test for issue case

* DRY

* Simplify logic by using BigNumber

Co-authored-by: Dan Miller <danjm.com@gmail.com>
2021-11-24 12:08:23 -06:00
Mark Stacey
7929a92c66
Clear the clipboard after the seed phrase is pasted (#12828)
* Clear the clipboard after the seed phrase is pasted

On the "Import" page of the import onboarding flow, we now clear the
clipboard after the secret recovery phrase is pasted. This ensures that
the SRP isn't accidentally pasted somewhere else by the user, which can
be an easy and disastrous mistake to make.

* Clear clipboard during new onboarding flow as well
2021-11-24 13:39:12 -03:30
Jyoti Puri
7609841902
Confirm transaction page - onchain failure handling (#12743) 2021-11-24 22:32:53 +05:30
Dan J Miller
fb27e170ac
Bump @metmamask/logo to v3.1.1 (#12822) 2021-11-24 12:46:01 -03:30
Etienne Dusseault
5a14a1a54a
Add storybook render tests with CI integration (#12477)
* add storybook unit tests with CI integration

* fix command and fix casing for test

* change ci ordering for storybook tasks

* fix syntax error

* fix jest

* lint

* Add transaction-total-banner render test to Storybook (#12517)

* transaction-total-banner

* lint

* confirm to spec

* lint

* fix jest ocnfig for snapshot test failure
2021-11-23 16:41:30 -08:00
George Marshall
dd77700e65
Updating tags in Typography component (#12682) 2021-11-23 15:32:59 -08:00
kumavis
d9d1a831a6
ci - enforce yarn lock deduplications (#12737)
* ci - test for yarn lock deduplications

* deps - update yarn.lock and patches

* lavamoat - update policy

* test - ui/helpers/utils/optimism/buildUnserializedTransaction - test against json obj

* lint fix

* patch-package - patch @babel/runtime for lavamoat support

* patch-package - fix additional @babel/runtime lockdown incompats

* patch-package - cleanup sass patch
2021-11-23 09:17:27 -10:00
Jyoti Puri
f65063ac6c
Eip1559 v2 12593 (#12719) 2021-11-23 23:48:44 +05:30
Niranjana Binoy
582882b3ed
Adding the AdvancedGasFeePopover template (#12780) 2021-11-23 23:16:33 +05:30
Aaron Chen
a931316a53
Introduce QR based signer into MetaMask (#12065)
* support qr based signer

* add CSP for fire fox

* get QR Hardware wallet name from device

* fix qrHardware state missing in runtime

* support qr based signer sign transaction

* refine Request Signature modal ui

* remove feature toggle

* refine ui

* fix notification is closing even there is a pending qr hardware transaction

* add chinese translation, refine ui, fix qr process was breaking in some case

* support import accounts by pubkeys

* refine qr-based wallet ui and fix bugs

* update @keystonehq/metamask-airgapped-keyring to fix that the signing hd path was inconsistent in some edge case

* fix: avoid unnecessay navigation, fix ci

* refactor qr-hardware-popover with @zxing/browser

* update lavamoat policy, remove firefox CSP

* refine qr reader ui, ignore unnecessary warning display

* code refactor, use async functions insteads promise

Co-authored-by: Soralit <soralitria@gmail.com>
2021-11-23 13:58:39 -03:30
Jyoti Puri
fbc6f4e603
Adding network status section on edit gas fee modal (#12704) 2021-11-23 22:22:50 +05:30
Daniel
bf06025615
Fix "BigNumber Error: times() number type has more than 15 significant digits:" (#12802) 2021-11-23 17:33:32 +01:00
ryanml
089afa6c1a
Merge pull request #12793 from MetaMask/master-sync
Sync `master` with `develop`
2021-11-22 21:14:01 -07:00
Etienne Dusseault
49ae325d52
circle-icon (#12650) 2021-11-22 17:41:16 -08:00
Etienne Dusseault
8ce0eff047
alert-circle-icon (#12651) 2021-11-22 17:40:33 -08:00
ryanml
ad41849b93 Merge remote-tracking branch 'origin/develop' into master-sync 2021-11-22 16:18:05 -07:00
Dan J Miller
7c98b33e0b
Merge pull request #12785 from MetaMask/Version-v10.6.2
Version v10.6.2 RC
2021-11-22 19:45:42 -03:30
Dan J Miller
6d808e0977 Remove localhost from default network list (#12790)
* Remove localhost from default network list

* Update e2e fixtures
2021-11-22 19:04:32 -03:30
Dan J Miller
d296c517db
Remove localhost from default network list (#12790)
* Remove localhost from default network list

* Update e2e fixtures
2021-11-22 19:02:03 -03:30
Jyoti Puri
42fea3d323
Confirm transaction screen - wrap lengthier values (#12733) 2021-11-22 22:49:29 +05:30
Dan Miller
0cceee0477 Update changelog 2021-11-22 13:19:54 -03:30
Dan J Miller
f15825d0c4 Ensure one and only one localhost option appears in network list (#12786)
* Ensure one and only one localhost option appears in network list

* Fix unit tests
2021-11-22 13:16:35 -03:30
Dan J Miller
08104cdc75 Add fixed json-schema to resolutions file to resolve security issue (#12787) 2021-11-22 13:16:35 -03:30
Alex Donesky
e93b3b97d6 fix issue where contractExchangeRates are not available in swaps controller, make token address matching case insensitive (#12770) 2021-11-22 13:16:35 -03:30
ryanml
0431821fca
Merge pull request #12772 from MetaMask/master-sync
Sync `master` with `develop`
2021-11-22 09:43:34 -07:00
Dan J Miller
2647be9662
Ensure one and only one localhost option appears in network list (#12786)
* Ensure one and only one localhost option appears in network list

* Fix unit tests
2021-11-22 12:54:42 -03:30
Dan Miller
74719a8102 Merge remote-tracking branch 'origin/develop' into master-sync 2021-11-22 12:34:10 -03:30
Dan J Miller
994a7d5458
Add fixed json-schema to resolutions file to resolve security issue (#12787) 2021-11-22 21:05:05 +05:30
MetaMask Bot
56021eb133 Version v10.6.2 2021-11-22 12:28:36 +00:00
dragana8
367492a0af
Create an "Add a Nickname" popover (also support edit) #12528 (#12644)
* added update nickname popover

* fixed style errors

* styling changes

* fixed prettier error

* added header

* updates
2021-11-22 08:56:09 -03:30
Olusegun Akintayo
143a5c4a53
Increase friction to bypass estimated revert (#12576)
* If a transaction would revert/fail,
    1. hide the gas estimate info.
    2. Disable the confirm button.
    3. All user to enable the confirm button anyways.
    4. Do not show the default Transaction error message

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Always return a value for hasSimulationError

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Use primary button of action message

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Remove hasSimulationError from getErrorKey

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint fixes.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Move confirm anyways logic to base component.
Change message

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Disable edit if there's simulation error

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* hide confirm anyways button once clicked.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Move Actionable Primary Action to flex-end

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Fix unit tests

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Fix nested ternary lint issues

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* add !confirmAnyways to conditions to show GasDetails.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* ConfirmAnyways should be read from state

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Rename tryAnywayOption

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint fixes

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Remove await tick

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint issue fix

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint fixes after rebase

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* description should show that it's content being tested.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* If a transaction would revert/fail,
    1. hide the gas estimate info.
    2. Disable the confirm button.
    3. All user to enable the confirm button anyways.
    4. Do not show the default Transaction error message

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Always return a value for hasSimulationError

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Use primary button of action message

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Remove hasSimulationError from getErrorKey

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint fixes.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Move confirm anyways logic to base component.
Change message

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Disable edit if there's simulation error

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* hide confirm anyways button once clicked.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Move Actionable Primary Action to flex-end

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Fix unit tests

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Fix nested ternary lint issues

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* add !confirmAnyways to conditions to show GasDetails.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* ConfirmAnyways should be read from state

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Rename tryAnywayOption

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint fixes

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Remove await tick

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint issue fix

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint fixes after rebase

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* description should show that it's content being tested.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Move simulation fails message inline with gas details component (#12705)

* Move simulation fails message inline with gas details component

* Remove old unit tests

Co-authored-by: Dan Miller <danjm.com@gmail.com>

* lint fix

* use an XOR operation.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* The changes in this file are no longer needed because we hide the edit button now

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

Co-authored-by: Dan Miller <danjm.com@gmail.com>
2021-11-22 16:13:30 +04:00
Alex Donesky
6838a3d074
fix issue where contractExchangeRates are not available in swaps controller, make token address matching case insensitive (#12770) 2021-11-22 08:34:31 -03:30
ryanml
f3ade11c74
Merge pull request #12769 from MetaMask/Version-v10.6.1
Version v10.6.1 RC
2021-11-19 15:43:15 -07:00
ryanml
eb7d96e988 Updating changelog 2021-11-19 11:05:50 -07:00
MetaMask Bot
32c3d8b6fd Version v10.6.1 2021-11-19 17:58:37 +00:00
Dan J Miller
a533dcc403 Ensure that metametrics error related to anonymousId is not sent to sentry (#12763) 2021-11-19 10:53:50 -07:00