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

3705 Commits

Author SHA1 Message Date
Brad Decker
ab06595a5d
refactor token list (#8726)
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-06-04 13:13:11 -05:00
Mark Stacey
b96eb55c76
Add box shadow to Home screen tabs (#8739)
This matches the box shadow on the asset page. Some CSS specificity
hijinks were required to override the base `Tabs` CSS rules, and a new
`tabsClassName` prop was added to the `Tabs` component.
2020-06-04 13:42:45 -03:00
Mark Stacey
cac3bf5c56
Increase padding of empty transaction list (#8738)
The top padding of the empty transaction list now mirrors the space
below the buttons in the overview.
2020-06-04 12:52:21 -03:00
Mark Stacey
1553f70a65
Make asset page breadcrumb clickable (#8737)
The entire asset page breadcrumb is now clickable. Clicking it will
bring the user back to the home page.
2020-06-04 12:51:44 -03:00
Whymarrh Whitby
731efcb36d
Move terms of use strings into localized messages (#8736) 2020-06-04 12:28:21 -02:30
Brad Decker
591d84d2bb
refactor asset-list-item to use list-item component (#8725)
* refactor asset items to use list-item

Refactors the asset-list-item and token-cell to rely on the list-item
component for UI. Little changes were needed to the list-item code
to make this work! The result should be lots of eliminated code

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-06-03 12:50:12 -05:00
Whymarrh Whitby
b9028397cb
Fix parsing of seed phrases on import and restore (#8721) 2020-06-03 14:37:07 -02:30
Brad Decker
c6b77c9734
fix grid repositioning on label change (#8713) 2020-06-03 09:47:12 -05:00
Mark Stacey
171704d980
Fix gas price intermittent test failure (#8728)
The "the transaction has the expected gas price" test was assuming the
fifth element with the `transaction-breakdown__value` class was the
element with the gas price. In practice that was sometimes not the
case, because some transaction detail fields would not be present, or
would appear after the first render.

The field is now looked up with a test id, ensuring it always finds the
correct field.
2020-06-03 10:54:55 -03:00
Mark Stacey
56b157f692
Fix hide token e2e test (#8724)
The e2e test for the "Hide token" functionality was incorrectly
clicking "Cancel" on the "Hide token" modal, thus not actually testing
that that token was hidden at all.

The "Confirm" button is now selected using a test id, to ensure the
wrong button isn't selected.
2020-06-02 18:47:55 -03:00
Mark Stacey
e1c3778446
Fix disabled prop type in AddToken component (#8723)
The `disabled` prop being passed to the `PageContainer` component in
the render function for the `AddToken` component was a string in some
cases. It should always be a boolean. It has been cast to a boolean in
the one case where it was a string.
2020-06-02 18:47:43 -03:00
Erik Marks
616a446832
Use URL origin instead of hostname for permission domains (#8717)
* use URL.origin instead of hostname for tabs and permissions
2020-06-01 16:24:27 -07:00
Erik Marks
8afb295e1d
Fix connect long URL styling (#8719)
* fix connect long URL styling
2020-06-01 15:28:05 -07:00
Brad Decker
c8de0b70fa
Add nonce to transaction details (#8716) 2020-06-01 17:19:49 -05:00
Thomas Huang
fb906e2150
Consistent rounded corners on tx details modal/popup (#8714) 2020-06-01 13:04:39 -07:00
Mark Stacey
df85ab6e10
Implement asset page (#8696)
A new page has been created for viewing assets. This replaces the old
`selectedToken` state, which previously would augment the home page
to show token-specific information.

The new asset page shows the standard token overview as seen previously
on the home page, plus a history filtered to show just transactions
relevant to that token.

The actions that were available in the old token list menu have been
moved to a "Token Options" menu that mirrors the "Account Options"
menu.

The `selectedTokenAddress` state has been removed, as it is no longer
being used for anything.

`getMetaMetricState` has been renamed to `getBackgroundMetaMetricState`
because its sole purpose is extracting data from the background state
to send metrics from the background. It's not really a selector, but
it was convenient for it to use the same selectors the UI uses to
extract background data, so I left it there for now.

A new Redux store has been added to track state related to browser history.
The most recent "overview" page (i.e. the home page or the asset page) is
currently being tracked, so that actions taken from the asset page can return
the user back to the asset page when the action has finished.
2020-06-01 14:54:32 -03:00
Brad Decker
ec2e5c848b
fix crash on signature request (#8709) 2020-06-01 12:27:51 -05:00
Erik Marks
9193522bd5
Fix accounts menu styling (#8707)
* fix accounts menu styling
2020-06-01 10:01:51 -07:00
Mark Stacey
df4b757479
Remove unused getToErrorObject parameters (#8705)
The third and fourth parameters were unused, so they have been removed.
The tests descriptions for both `getToErrorObject` and
`getToWarningObject` have been improved as well.
2020-05-29 15:31:57 -03:00
Brad Decker
c3b29e192a
hide connected-status on metamask ext (#8703)
Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com>
2020-05-29 13:14:25 -05:00
Mark Stacey
ddaa492751
Use send state for send flow token (#8695)
The chosen token in the `send` flow was set from one of two places:
`metamask.selectedTokenAddress` or `metamask.send.token`. The former is
used most of the time, but the latter is used for the 'Edit' button
shown in the upper-left of the confirmation UI.

The send flow will now exclusively use `metamask.send.token` for the
token state during the send flow. `metamask.selectedTokenAddress` is
now only used for the selected token state on the Home screen. This
simplifies the Redux state, as the send token is now in one place
instead of two, and `metamask.selectedTokenAddress` has only one
purpose.
2020-05-29 14:46:10 -03:00
Brad Decker
e481166052
do not display extension id in connection modal (#8699) 2020-05-29 12:12:14 -05:00
Whymarrh Whitby
ad85382824
Fix tab content disappearing during scrolling on macOS Firefox (#8702) 2020-05-29 14:41:34 -02:30
Brad Decker
68f8abbbca
close details when button is pressed (#8694) 2020-05-29 11:15:33 -05:00
Mark Stacey
88bed7181f
Refactor token selectors (#8671)
Unused token selectors have been removed, and the remaining token
selector has been moved to the `metamask` Redux store.
2020-05-28 21:43:44 -03:00
Erik Marks
606618ee28
Update eth_accounts permission description (#8693)
* update eth_accounts permission description

* make it easier to find permission name locale message

* handle longer permissions descriptions in UI
2020-05-28 15:53:11 -07:00
Mark Stacey
7ff3b4c928
Extract selected token from token input (#8692)
The `TokenInput` component now takes the token as a prop, instead of
using the `selectedTokenAddress` state. The `UserPreferencedTokenInput`
component that wrapped `TokenInput` has also been updated to take the
token as a prop.
2020-05-28 19:08:11 -03:00
Whymarrh Whitby
91a26bae89
Fix propType for Home defaultHomeActiveTabName (#8683) 2020-05-28 19:15:04 -02:30
Erik Marks
eb7ef4047f
Fix create account form styling (#8689)
* ensure space between create account buttons

* delete wrapper div class name
2020-05-28 13:23:50 -07:00
Mark Stacey
8ed4510d90
Remove unused getSelectedTokenAssetImage selector (#8691)
This selector has been unused as of #8637
2020-05-28 17:17:04 -03:00
Mark Stacey
795676d3ec
Remove getTxParams (#8676)
This function primarily ensured that there was a reasonable fallback
for `txParams` if the given transaction was missing it. This fallback
was only used in one place: the customize gas modal, during the send
flow specifically.

The helper function has been removed, and the default `txParams` is set
in the one place it was needed. In the future we should attempt to
simplify this modal so it doesn't need to know details about the
context in which it's being used.
2020-05-28 16:39:33 -03:00
Brad Decker
00834f5de6
do not show account mismatch alert on details (#8678) 2020-05-28 14:20:56 -05:00
Erik Marks
22699cb1d9
Fix connect hardware styling (#8680)
* Connect -> Hardware

* fix connect hardware styling

* rename some components and classes

* make hardware account scrolling sane
2020-05-28 11:47:48 -07:00
Erik Marks
b34ccbb904
Fix Firefox account menu styling (#8681)
* Fix Firefox account menu styling
2020-05-28 11:02:59 -07:00
Brad Decker
fbe16e8a5f
various fixes to transaction list (#8673) 2020-05-28 13:00:51 -05:00
Whymarrh Whitby
93c2184bd9
Add metrics events for Wyre and CoinSwitch (#8677) 2020-05-28 13:54:52 -02:30
Whymarrh Whitby
f8137b7a66
Fix height of connect screen (#8675) 2020-05-28 12:22:16 -02:30
Whymarrh Whitby
a75dcae9bb
Merge branch 'develop' into manual-connect 2020-05-28 07:20:26 -02:30
Mark Stacey
95a95ee4bc
Refactor transaction list token filtering (#8669)
The transaction list now filters by token in the `TransactionList`
component instead of in the transaction selector. This was done in
preparation for the asset page work.

Technically this approach is slightly less efficient than before, as
we're now filtering the transactions after they've been grouped
together rather than beforehand. The difference is minimal though, and
this method is more correct.

The old filtering was broken because it inappropriately filtered out
cancel transactions. Cancel transactions always have the `to` address
set to the same as the `from` address, and the token filter only
returned transactions where the `to` address was set to the token
address.

Now that we're only filtering by the `to` address of the initial
transaction, token transaction groups will be included in their
entirety, including any cancel transactions.
2020-05-28 00:11:15 -03:00
Mark Stacey
e89540fd94
Fix token decimal type (#8670)
The `decimals` property of tokens was being set as a string instead of
a Number for any tokens added via `getTokenParams`. It's now cast to a
Number instead.
2020-05-27 22:33:59 -03:00
Whymarrh Whitby
5b1608681c Manually connect via the full connect flow 2020-05-27 21:45:41 -02:30
Whymarrh Whitby
145edbe99d
Make address display wider in Account Details (#8665) 2020-05-27 20:11:44 -02:30
Whymarrh Whitby
3931427db8
Show hostname in the disconnect confirmation (#8663) 2020-05-27 19:39:14 -02:30
Whymarrh Whitby
34adccec7c
Fix JSDoc for Tabs#_findChildByName (#8664) 2020-05-27 19:10:26 -02:30
Mark Stacey
cc1170f577
Remove unused isWideViewport prop (#8662)
This prop is no longer required, now that the new fullscreen redesign
has been implemented. This was unused before the redesign as well,
seemingly by accident.
2020-05-27 18:36:55 -03:00
Whymarrh Whitby
4802ed1df5
Localize permission descriptions (#8661) 2020-05-27 18:15:10 -02:30
Mark Stacey
a0d64c7932
Implement new fullscreen design (#8657)
The fullscreen UI now shows roughly the same design as the popup UI.
A few additional changes depicted in the new fullscreen designs will
be implemented in subsequent PRs (e.g. the inline buttons on assets)

This was done now to make asset pages easier to implement. Implementing
asset pages solely for the popup UI would have been complicated by the
fact that we use viewport size to switch between the two layouts, so we
would have had to re-route upon resizing the window.
2020-05-27 17:28:33 -03:00
Brad Decker
398f2647c0
resolve remaining issues with transaction list (#8659) 2020-05-27 14:45:20 -05:00
Mark Stacey
a6f2156386
Update account options menu design (#8654)
The `AccountDetailsDropdown` component has been rewritten to use the
new `Menu` component, and to follow the latest designs.

This should be functionally equivalent. A couple of the icons have
changed, but that's about it.

Support for a subtitle was added to `MenuItem` to support the `origin`
subtitle used for the explorer link for custom RPC endpoints.

A few adjustments were required to `test/helper.js` to accommodate
the use of `Menu` from a JSDOM context (this is the first time it's
been used in a unit test). A `popover-content` element was added to the
fake DOM, and another global was added that `react-popper` used
internally.

An additional driver method (`clickPoint`) was added to the e2e driver
to allow clicking the background behind the menu to dismiss it. This
wasn't possible using the `clickElement` method, because that method
would refuse to click an obscured element. The only non-obscured
element to click was the menu backdrop, and that didn't work either
because the center was obscured by the menu (Selenium clicks the center
of whichever element is targeted).
2020-05-27 12:31:53 -03:00
Brad Decker
706dc02cb4
Implement new transaction list design (#8564)
Co-authored-by: Whymarrh Whitby <whymarrh.whitby@gmail.com>
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-05-26 15:49:11 -05:00
Whymarrh Whitby
ab11e0b623
Rename preferencesSelector selector to getPreferences (#8647) 2020-05-26 03:41:58 -02:30
Whymarrh Whitby
835386bf35
Persist home tab state (#8612) 2020-05-25 16:31:28 -02:30
Mark Stacey
3cedf708e9
Remove duplicate 'Account options' tooltip (#8644)
The `title` HTML attribute already resulted in this having a tooltip.
We didn't need to add an extra one.
2020-05-22 14:42:09 -03:00
Mark Stacey
8379dd6a07
Refactor MenuBar component (#8643)
The `MenuBar` component has been converted to a functional component.
This was done to make upcoming changes related to the home screen
redesign easier to implement.
2020-05-22 14:11:42 -03:00
Brad Decker
684c58b94e
fix prop name for disconnect icon (#8641) 2020-05-21 16:12:38 -05:00
Brad Decker
389df9dd37
warn user when sending from different account (#8601) 2020-05-21 15:21:34 -05:00
Mark Stacey
dd41870f1d
Split TransactionViewBalance component (#8637)
The `TransactionViewBalance` component has been split into three
separate components. This was done primarily to make the asset page
easier to implement. Also the name `TransactionViewBalance` didn't
describe this component very well anymore.

Instead of the Ethereum and token-specific logic being in the same
component, the two cases were split into the `EthOverview` and
`TokenOverview` components respectively. They both use the
`WalletOverview` component, which has the structure shared by both
cases.
2020-05-21 14:33:48 -03:00
Mark Stacey
57531ad100
Fix AssetList metric events (#8639)
The metric events in the `AssetList` component were using the
`useMetricEvent` hook incorrectly.
2020-05-21 13:06:06 -03:00
Brad Decker
f9ea9b541a
add useI18nContext shortcut hook (#8635) 2020-05-21 10:26:49 -05:00
Brad Decker
ec99cc82b8
Design QA fixes for v8 (#8630) 2020-05-20 15:42:18 -05:00
Mark Stacey
f886686db2
Extract Menu component from ConnectedAccountsListOptions (#8632)
A `Menu` component has been extracted from the
`ConnectedAccountsListOptions` component. The menu and the menu items
are now the `Menu` and `MenuItem` components respectively.

A custom body was added to the Storybook preview to ensure that the
`popover-content` element was present in the DOM before the Menu was
constructed.
2020-05-20 14:52:23 -03:00
Mark Stacey
91953f062b
Remove unused network prop (#8633)
The `Identicon` component was being passed a `network` prop, despite
not accepting a `network` prop.

A duplicate set of `token-cell` tests have also been deleted, as they
used this prop. The tests were never run, because the file was misnamed
(it needs to be named `.test.js`).
2020-05-20 13:51:21 -03:00
Erik Marks
f748664638
Cleanup network enums (#8627)
* cleanup & consolidate network enums
2020-05-20 08:57:45 -07:00
Whymarrh Whitby
4ced792aec
Remove title from Connected Sites modal (#8623) 2020-05-19 14:47:55 -02:30
Whymarrh Whitby
97d65b645a
Delete the ABTestController and its state (#8620) 2020-05-19 13:27:06 -02:30
Whymarrh Whitby
1ba65d5128
Handle zero nextNonce in ConfirmTransactionBase placeholder (#8618) 2020-05-18 21:18:38 -02:30
Whymarrh Whitby
e4b8cddf02
Disallow all anonymous default export, aside from CSF and migrations (#8535)
CSF = Storybook’s Component Story Format (CSF)

See https://storybook.js.org/docs/formats/component-story-format/

Note that the migrations still use CommonJS require, so the default export as
an object is quite ergonomic (& I don't want to touch the migrations).
2020-05-18 21:18:11 -02:30
Whymarrh Whitby
3244449ab9
Use activeTab.origin where possible (#8617)
This changeset updates the `getOriginOfCurrentTab` selector and the container
for the ConnectedSites page to use `activeTab.origin` instead of parsing the
URL. The `activeTab` URL is parsed in `queryCurrentActiveTab` before the UI is
launched and any subsequent parsing of the URL is unnecessary.

See `queryCurrentActiveTab` in `ui.js:86` [1].

  [1]:e7bb0876f5/app/scripts/ui.js (L86-L118)
2020-05-18 20:04:51 -02:30
Whymarrh Whitby
9e8f922c10
Remove unused index for dropdowns (#8615) 2020-05-18 19:14:40 -02:30
Whymarrh Whitby
3485bfbc5c
Sticky position the tabs at the top (#8609) 2020-05-18 16:22:42 -02:30
Mark Stacey
ce11fad81c
Improve account options menu (#8607)
The account options menu is now much faster, and it correctly closes
when 'Switch account' is selected.

A static width had to be set on the menu so that it could be positioned
reliably. Without this width set, it was rendered as a different size
before positioning than after, which resulted in it being positioned
incorrectly. A `z-index` had to be added (equal to the `z-index` used
by the popover component) to ensure it wasn't rendered beneath the
popover.

The menu is automatically positioned relative to the account options
button, appearing below the button by default but above it instead if
there isn't room below. It is positioned to be inside the bounds of the
popover as well.

The account options button is now a `<button>` rather than a `<i>`.
This required a few additional style rules to overrule the default
button styles. Additionally the size was increased so that it matches
the designs more closely.

The callbacks for connecting, disconnecting, and switching accounts
have been updated to use state and props to determine the correct
address to use, rather than being bound to the correct address
parameter in the render function. This means we aren't creating a new
function upon each render anymore.

The `showAccountOptions` method still needs to be bound once per
account, but this was switched to use more readable syntax (`.bind`,
instead of the double arrow function).

`react-popper` and `@popperjs/core` were both added as dependencies.
These should be used for any UI requiring relative positioning (e.g.
tooltips, menus, etc.). Older versions of these libraries are already
in our codebase as transitive dependencies of the tooltip library we're
using.
2020-05-18 14:51:29 -03:00
Mark Stacey
0033a64e5d
Connected accounts secondary sort order (#8608)
The connected accounts are now ordered by keyring controller order
whenever the `lastSelected` time is equal. This ensures the order is
identical to what connected sites see. This is especially important
when no accounts have been selected, as it ensures the correct account
is marked as the "Primary" account.
2020-05-18 13:31:11 -03:00
Whymarrh Whitby
d488c16df5
Add Connected Accounts modal (#8313) 2020-05-15 15:53:52 -03:00
Whymarrh Whitby
320804bb71
Delete unused DisconnectAll modal (#8599) 2020-05-15 15:32:46 -02:30
Erik Marks
d0fcf665bb
Handle trailing / in block explorer URLs (#8592)
* Strip trailing slashes from variable in block explorer URL template strings
2020-05-14 08:13:53 -07:00
Mark Stacey
74007e054b
Update asset list styles (#8591)
The asset list has been updated to more closely match the new designs.
There are still a few major differences (e.g. the selection state, the
token menu) that can't be implemented until the asset screen has been
implemented.

The background color of the selected asset has been lightened, so that
it's less jarring until we remove it.
2020-05-14 09:49:50 -03:00
bguiz
96929d99c0 fix: handle trailing / in block explorer URLs
What

- modify `ui/app/helpers/utils/transactions.util.js` and
  `ui/lib/account-link.js` to strip trailing slashes
  if they are present.
- added relevant tests not just for the new scenario,
  but also the general scenarios for these functions,
  as there previously was no test coverage for these
  two functions.

Why

- Current behaviour, when user enters a block explorer URL
  when configuring a custom RPC, and that block explorer URL
  contains a trailing `/`.
  - e.g. `https://block.explorer/`
  - this results in a double-slash (`//`) in the transaction
    and account URLs generated by MetaMask.
  - e.g. `https://block.explorer/tx/0xabcd...`,
    `https://block.explorer/account/0xabcd...`
  - This needs to be handled using a router redirect
    on the server of the block explorer,
    and this changes would avoid that requirement.
2020-05-14 17:15:17 +08:00
Mark Stacey
095eeab881
Update Home tab styles to match new designs (#8590)
The tabs on the Home page have been updated to match the new home
screen designs.

A new `activeClassName` prop was added to the `Tab` component to allow
applying different styles to the active tab state.

I ran into specificity problems when overriding the default `Tab` styles
because the import order of our CSS is bizarre and wrong. For now I've
used a crude workaround, but we can fix this properly later by changing
the import order to place styles likely to be overridden first.
2020-05-14 00:16:47 -03:00
Mark Stacey
204d197996
Convert AssetList to functional component (#8588)
The `AssetList` component is now a function rather than a class, and it
makes use of the new `useMetricsEvent` and `useUserPreferencedCurrency`
hooks.
2020-05-14 00:16:30 -03:00
Brad Decker
73272124b3
broaden usage options for list-item (#8587) 2020-05-13 16:19:14 -05:00
Mark Stacey
0ca5d1dc8a
Refactor asset list items (#8586)
All asset list items now use the same component (`AssetListItem`).
Previously the tokens and the Ethereum balance were totally separate
components, despite being styled similarly.

Various unnecessary DOM elements and style rules were removed, but the
overall list looks identical to how it looked before.
2020-05-13 17:41:15 -03:00
Brad Decker
f64106ce21
set home container height to auto (#8577) 2020-05-13 11:12:34 -05:00
Mark Stacey
f9eb1440e4
Always return a Boolean from getShowFiatSelector (#8585)
`getShowFiatSelector` would return the `showFiatInTestnets` value
directly when on mainnet, which could be `undefined`. Now it is cast to
a Boolean instead.

This was done to fix a PropType warning in a component that will be
included in a future PR, where this selector was used for a required
prop.
2020-05-13 11:53:27 -03:00
Mark Stacey
de02eeefbe
Add default values for preferences (#8584)
Defaults have been added for all three preferences. The default values
added are both falsey, so this shouldn't result in any functional
change. This was done to help make this preferences more easily
discoverable.
2020-05-13 11:53:00 -03:00
Mark Stacey
7a4eece92d
Fix Matomo dimension IDs (#8579)
The IDs for the `numberOfTokens` and `numberOfAccounts` Action
Dimensions were swapped. These are the correct IDs. We'll have to
consider that these are swapped when viewing any pre-v8.0.0 metrics.
2020-05-13 10:12:07 -03:00
Mark Stacey
797ee2f4de
Remove redundant .scss file extension from SCSS imports (#8581)
The `.scss` file extension is not required when importing SCSS files.
It has been removed from all imports, for consistency. I chose to
remove it rather than add it everywhere because imports without the
extension seem to be more common.
2020-05-13 09:28:06 -03:00
Mark Stacey
a6d8d3d76e
Refactor identicon styles (#8580)
The CSS class for the fallback Ethereum logo used in the identicon
component was with the `AssetList` styles, and was confusingly named
`balance-icon`. It has been migrated to the identicon styles, and
renamed `identicon__eth-logo`.

A few redundant rules have been removed as well (they were always
overridden by inline styles).
2020-05-13 09:27:34 -03:00
Mark Stacey
fab049b1b0
Fix PropType of network prop of TokenMenuDropdown. (#8582)
The `network` prop of the `TokenMenuDropdown` component was mistakenly
set to "number" in #7779.
2020-05-13 09:26:57 -03:00
Erik Marks
24cbb6fc66
Delete retryTransaction action and background (#8576)
* delete retryTransaction action and background
2020-05-12 16:19:33 -07:00
Erik Marks
0470386326
Delete recent blocks controller (#8575)
* delete recent blocks controller

* delete percentile from direct dependencies
2020-05-12 12:40:33 -07:00
Brad Decker
0aa41e397e
factor out containers for currency components (#8543) 2020-05-12 14:07:35 -05:00
Erik Marks
54b423d407
Fix domain selector (#8574)
* fix domain selector

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-05-12 09:29:45 -07:00
Mark Stacey
53ec42d95f
Add switch to connected account alert (#8532)
Add alert suggesting that the user switch to a connected account. This
alert is displayed when the popup is opened over an active tab that is
connected to some account, but not the current selected account. The
user can choose to switch to a connected account, or dismiss the alert.

This alert is only shown once per account switch. So if the user
repeatedly opens the popup on a dapp without switching accounts, it'll
only be shown the first time. The alert also won't be shown if the user
has just dismissed an "Unconnected account" alert on this same dapp
and account, as that would be redundant.

The alert has a "Don't show me this again" checkbox that allows the
user to disable the alert. It can be re-enabled again on the Alerts
settings page.
2020-05-12 10:01:52 -03:00
Mark Stacey
6868688a03
Remove unused Balance component props (#8570)
This component was indended to show both ETH/fiat and token balance,
but today is not used for token balance. As a result, large pieces of
this component and many props were unused in practice. The condition
about `formattedBalance` returning a falsy or `None` or `...` result
was also removed, as that doesn't seem to be possible.

The `balanceValue` passed into the `Balance` component in the asset
list has also been removed, as it isn't used.
2020-05-11 19:20:32 -03:00
Erik Marks
6f0f106f7f
Only display accounts with identities in send and permissions flows (#8568)
* send ether info: only select identities
2020-05-11 11:23:28 -07:00
Mark Stacey
d8a4b7fc9b
Fix alert disabling type error (#8561)
When disabling an alert, the background `alertEnabledness` state of the
alert was being set to `undefined` instead of `false`. This didn't have
any user-facing effect, since `undefined` is falsey, but it did result
in a PropType error on the Alert settings page. This mistake was made
in #8550.

The `alertEnabledness` state is now correctly set to `false` instead of
`undefined`.
2020-05-08 21:49:41 -03:00
Mark Stacey
c4fb514f3d
Allow disabling alerts (#8550)
The unconnected account alert can now be disabled. A "don't show this
again" checkbox has been added to the alert, which prevents that alert
from being shown in the future.

An alert settings page has been added to the settings as well. This
page allows the user to disable or enable any alert.
2020-05-08 16:45:52 -03:00
Brad Decker
c0489163b5
Use createContext for metametrics context (preserve legacy context) (#8540) 2020-05-08 11:41:43 -05:00
Mark Stacey
abf2294bf3
Update menu bar account hover background color (#8555)
The hover state background color of the "Account" in the popup home
screen menu bar has been updated to match the hover state background
color of the connected status indicator. Both hover state backgrounds
now match.
2020-05-07 23:36:48 -03:00
Mark Stacey
0688426b7c
Fix checkbox color when checked or indeterminate (#8552)
The checkbox color was sometimes incorrect after it was checked. I'm
not sure how to consistently reproduce this issue, but I was able to
make this happen most of the time if I clicked the checkbox while some
text was highlighted.

It seems that the `:checked` and `:indeterminate` pseudo-selectors were
not being applied right away for some reason. Either that or React
wasn't setting the `checked` state of the `input` element right away.

This problem has been worked around by using CSS classes instead of
pseudo-selectors. I am no longer able to reproduce the issue now.
2020-05-07 23:25:19 -03:00