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

4011 Commits

Author SHA1 Message Date
David Walsh
25e5ac24b2
Prevent swaps value input placeholder from jumping when focused (#9520) 2020-10-08 13:38:36 -02:30
Dan J Miller
e389ad98af
Hide activity list retry button for failed swaps transctions (#9513) 2020-10-08 11:41:05 -02:30
Dan J Miller
a939853989
Ensure all of a token is swapped when clicking max in swaps (#9507) 2020-10-07 18:38:34 -07:00
Mark Stacey
cdfa2e66fd
Hide retry button for on-chain failures (#9506)
On-chain failed transactions have a transaction status of `confirmed`,
and should not be retried. Our retry function doesn't handle on-chain
failures yet, so it would inevitably fail due to the transaction having
the same nonce as a confirmed on-chain transaction.

When determining whether to show the retry button in the UI, we had
mistakenly been using a `status` variable that determined whether we
should show "Failed" on that transaction in the activity log. That
display status includes both network and on-chain failures, unlike
the `txMeta.status` property.

The `showRetry` logic has been updated to ensure it's only shown when
`txMeta.status` is `failed`, meaning on-chain failures will no longer
show the retry button. Additionally, the display-specific `status`
variable has been renamed to `displayedStatusKey`, to indicate that it
is a string that corresponds to a localized message, and that it's the
status meant for display purposes.
2020-10-07 14:59:38 -07:00
Dan J Miller
392f9eafc2
Stop passing a gas param to the estimateGas call initiated in the swaps controller (#9501)
* Stop passing a gas param to the estimateGas call initiated in the swaps controller timedoutGasReturn

* Stop passing gas params to timedoutGasReturn

* Lint fix

* Stop passing no longer used param to setInitialGasEstimate
2020-10-07 16:30:17 -02:30
Dan J Miller
7a28783924
Prevent user from submitting swap if they do not have enough for the max gas fee (#9500) 2020-10-07 09:55:38 -07:00
Mark Stacey
b98b0b6d01
Fix missing app header on Home screen (#9498)
The app header would sometimes mistakenly not get rendered while on the
Home screen. This could happen when a permission request was made while
the UI was open, to either the browser action popup or the fullscreen
UI.

This was caused by faulty logic in the top-level router component. It
would hide the app header if there was a pending permission request,
presumably because the author assumed that a redirect to the permission
flow would shortly follow. This redirect only happens on mount though,
not if the UI was already open when the permission request was
submitted.

The intent of this logic was to hide a brief flash of the app header
prior to rendering the permission flow. This brief flash has now been
restored, which is unfortunate, but is better than the missing app
header bug. We can revisit a solution to removing this flash in the
future, hopefully in a manner that avoids this bug and works for all
notification UI cases.
2020-10-07 14:15:39 -02:30
Brad Decker
9230d75ab0
pass entire tokenData object to getTokenAddressParam (#9499) 2020-10-07 11:40:39 -05:00
Mark Stacey
d1e8f5db86
Prevent redirecting to swaps in notification (#9497)
If a notification popup was opened while the user was partway through
the swaps flow, the notification would display the swaps flow instead
of whatever action triggered the popup (e.g. a connect request or a
confirmation). This is confusing and potentially dangerous, as the
user might mistakenly think the swap was triggered by a dapp.

The swap redirects are now prevented in the notification UI. The user
will still be redirected to an in-progress swap flow if they open the
browser action popup or the fullscreen UI, but not on the notification
popup that is triggered by dapp actions.
2020-10-07 13:49:47 -02:30
Erik Marks
bf1bb6ca7e
Check specified chain ID against endpoint return value (#9491)
Adds additional validation to chainId values in the network form, by comparing the specified value against the value returned by the endpoint.
2020-10-07 11:58:22 -02:30
Brad Decker
1ba4061f46
format quotes consistently on main-view and list-view (#9495) 2020-10-06 22:07:38 -02:30
Dan J Miller
534ac25a93
Ensure gas costs are accounted for when calculating the amount of eth received in a swap (#9494) 2020-10-06 21:38:09 -02:30
Erik Marks
46bcba2d63
Fix IconButton prop type (#9489)
* Fix IconButton prop type
2020-10-06 14:09:12 -07:00
Erik Marks
39d5bb73a7
Remove setSpecialRpc functionality (#9490) 2020-10-06 14:06:41 -07:00
Dan J Miller
94810ce9c9
Compare the networkId against the correct enum in eth and token overview components (#9485) 2020-10-06 17:34:53 -02:30
Dan J Miller
30d13422b5
Add MetaMask Swaps (#9482) 2020-10-06 15:58:38 -02:30
Erik Marks
088d4c34f1
Merge pull request from GHSA-c2xw-px2x-pr65
* Remove network config store
* Remove inline networks variable in network controller
* Re-key network controller 'rpcTarget' to 'rpcUrl'
* Require chainId in lookupNetwork, implement eth_chainId
* Require chain ID in network form
* Add alert, migrations, and tests
* Add chainId validation to addToFrequentRpcList
* Update public config state selector to match new network controller
state
* Use network enums in networks-tab.constants
* Ensure chainId in provider config is current
* Update tests
2020-10-06 15:27:02 -02:30
ricky
b00cd344d9
Use ethers to validate mnemonic during import (#9463) 2020-09-28 18:43:42 -02:30
Brad Decker
b3d3518bc0
Remove unnecessary functions (#9458)
Removes unnecessary functions with minor code changes to support extraction
2020-09-24 11:42:56 -05:00
Brad Decker
e75bfc4dbc
remove-unused-component (#9457) 2020-09-23 13:11:22 -05:00
Brad Decker
37cbeb56a3
make gas edit tooltips use Tooltip (#9434) 2020-09-17 17:05:31 -05:00
Thomas Huang
ee6e986f59
Fix dismiss button css on unconnected alert modal (#9430)
* Fix dismiss button on unconnected alert modal

Set button type to primary, rounded, and set `!important` on css class width

* Update ui/app/components/app/alerts/unconnected-account-alert/unconnected-account-alert.scss

* Add unconnected-account-alert to popover component classname to simplify css selector.

Co-authored-by: Brad Decker <git@braddecker.dev>
2020-09-17 13:23:37 -07:00
Erik Marks
550e49a64c
Gas modal styling fixes (#9433) 2020-09-17 13:02:00 -07:00
Brad Decker
c6a540419c
fix styles on tx detail popover buttons (#9432) 2020-09-17 12:12:42 -05:00
Brad Decker
f4a2a09713
increase specifity of button style overrides on notifications (#9427) 2020-09-17 09:08:02 -05:00
Brad Decker
1123adcb1d
fix overflow issue on approval container (#9415) 2020-09-16 15:18:39 -05:00
Thomas Huang
6f0a16a0e8
Fix button with on Deposit Ether / Buy Screen (#9424) 2020-09-16 12:42:11 -07:00
Brad Decker
86adca8486
Fix dropshadow permissions page (#9413) 2020-09-15 15:20:58 -05:00
Brad Decker
c97493cc13
rename Ethereum Main Network -> Etherum Mainnet (#9411) 2020-09-15 14:34:16 -05:00
Brad Decker
0c2404c6d7
fix button spacing on activity list (#9410) 2020-09-15 14:33:49 -05:00
Brad Decker
22ee3695f5
fix tooltip issue on firefox (#9409) 2020-09-15 13:19:46 -05:00
Brad Decker
ed28591b62
fix link regression (#9408)
Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com>
2020-09-15 13:03:05 -05:00
Dan J Miller
6b08ca428b
Fix left border of the first button in the gas price button group of the gas customization modal (#9406) 2020-09-15 12:52:39 -02:30
Brad Decker
8b24f624dd
add segment implementation of metametrics (#9382)
Co-authored-by: Whymarrh Whitby <whymarrh.whitby@gmail.com>
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-09-14 12:04:05 -05:00
Mark Stacey
feab36710d
Remove unused connections route (#9394)
This route was used for the "Connections" page in Settings, which was
removed in #7004
2020-09-11 09:32:54 -03:00
Whymarrh Whitby
e2dedaacdb
Use Infura v3 API (#9368)
* Use eth-json-rpc-infura@5.0.0
* Use Infura v3 API
* Add example .metamaskrc file
2020-09-10 13:46:00 -02:30
Mark Stacey
b80ab53396
Add radiogroup ButtonGroup variant (#9383)
Add a prop to the `ButtonGroup` component to make it act as a group of
radio buttons, rather than a group of regular buttons. These commits
were written by @danjm - I just pulled them into this branch.
2020-09-10 13:08:38 -03:00
Erik Marks
eef4ec981f
Ensure token amounts are in fixed notation (#9381)
* Ensure token amounts are in fixed notation
2020-09-09 22:24:11 -07:00
Erik Marks
b349a5c8b1
Convert ConfirmTokenTransactionBase to functional component (#9373)
* Convert ConfirmTokenTransactionBase to functional component

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-09-09 22:00:04 -07:00
Erik Marks
c5917aa445 roundExponential: add docstring, remove unnecessary cast 2020-09-08 21:28:24 -07:00
Erik Marks
d532cdc459 Ensure tokenAmount is always a string 2020-09-08 14:00:28 -07:00
Erik Marks
23683c1630
Replace toNumber calls on BigNumbers with toString (#9369) 2020-09-08 08:49:51 -07:00
Dan J Miller
ccb7eb3ab7
Fix useTokenTracker useEffect bug (#9334)
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
Co-authored-by: Brad Decker <git@braddecker.dev>
2020-09-02 14:19:04 -05:00
Patryk Łucka
3d4f1f45bd
Add messages to Ledger connection process (#9344) 2020-09-02 13:58:14 -02:30
ricky
f281df3b36
Feature/hide seedphrase when restoring vault (#9329)
* hide seedphrase (by default) with option to show it
2020-09-02 11:45:09 -04:00
Whymarrh Whitby
1e99a7b0c3
Migrate to scoped @metamask/jazzicon (#9341) 2020-09-02 12:37:56 -02:30
Whymarrh Whitby
9a711e695a
Fix lookAtDirection prop passed to Mascot (#9343) 2020-09-02 12:37:39 -02:30
Thomas Huang
f3a37dc1e2
Fix alignment of restore vault screen (#9339)
* Fix alignment of restore vault screen

Fixes #9324

Possibly missed when #9183 was merged. The issue is that the same classname is overridding the intended flex-direction.

46ba1ef100/ui/app/css/itcss/components/newui-sections.scss (L98-L101)
2020-09-01 14:38:26 -07:00
Thomas Huang
a3f9e6d37b
Show token symbol when token amount string is long (#9333)
* Show token symbol when token amount string is long

Fixes #9318

This essentially separates the token cell list item title/token amount and the token symbol.
I do request advice/recomendations on how to better handle the new `subTtitle` which I set the token symbol to and the `subtitle` https://github.com/MetaMask/metamask-extension/blob/develop/ui/app/components/app/asset-list-item/asset-list-item.js#L99.

* Individually test token balance and token symbol and their associated css element

* Feedback commit

* Classname and css overflow for title with string.
2020-09-01 13:13:58 -07:00
Patryk Łucka
cd86d00cb7
Fix send warning dialog (#9321)
This change moves warning message from `add-recipient` component to `send-content`. Currently
whenever provided address is a valid eth address `send-content` is rendered instead of `add-recipient`
this is why warnings never popped up.
2020-08-28 12:57:07 -02:30