Sorting was broken for the "Quote Source" column of the quote sort
list. Attempting to sort by this column would arrange the quotes in a
seemingly random order.
It appears that this was due to this column being programmed to sort by
a property called `liquiditySource`, which does not exist in the quote
data. I'm unsure what the difference between `liquiditySource` and
`quoteSource` was supposed to be; the values in the mocks are all
identical.
All references to `liquiditySource` have been updated to refer to
`quoteSource` instead, and the sorting now works correctly.
The `message` prop of `ActionableMessage` had a PropType of `string`,
but it was being passed a `node`. This was resulting in a PropType
error in the console on the view quote page.
The PropType has been changed to `node`, and the error is now gone.
The `AwaitingSwap` component was emitting a React warning when rendered
because a component was being rendered in an array without having a
`key` prop set.
A key has been added to the `CountdownTimer` component, which is passed
into the translation helper in an array. The warning no longer appears.
The `metaMaskFee` property on the "quote data" PropType was not used,
and it never existed in practice. This resulted in PropType errors.
The non-existent property has been removed.
The MetaMask fee is shown with two percent signs on the view quote page, because the percent sign is embedded in the fee amount as well as in the localized message.
The fee amount used now comes from the API, and does not have a percent sign. The percent sign is now only in the localized message. This allows for different locales to display the percentage differently. The old hard-coded value with a percent sign embedded has been removed, as it is no longer used anywhere.
* Only format timeRemaining if in useTransactionTimeRemaining if it is truthy
* Only setTimeRemaining in useTransactionTimeRemaining if submitted time is a number
* Use isSubmitted as a check, instead of isPending and submittedTime, before calculating timeRemaining
* Add a minimumGasLimit to the gas customization modal in swaps
* Update app/_locales/en/messages.json
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
* Set default for minimum gas limit in gas-modal-page-container.container and make required in sub components
* Update unit tests
* Default value for minimumGasLimit in advanced-gas-inputs.component.js
* Preserve existing gasLimitTooLow message key by creating new gasLimitTooLowWithDynamicFee
* Fix failing unit test
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
Co-authored-by: Erik Marks <rekmarks@protonmail.com>
* Explicitly set balance and string on the swaps from token in token-overview
* Set swapsFromToken balance to a decimal instead of a hex on eth balance change in build-quote
We were unable to deliver this public dashboard as we had originally
anticipated, and this is no longer a priority for the team. We may
revisit this idea in the future, but for now it has been removed from
our list of commitments.
* Delete CachedBalancesController.cachedBalances
* Migrate provider to Rinkeby instead of deleting it
* Convert hex transaction metamaskNetworkId values to decimal
* Don't migrate provider state in e2e tests
* Don't kick custom RPC users to Rinkeby unnecessarily
* Use provider.chainId for address book chainId values
* Add address book migration
* Fix failing unit test
* fixup! Merge branch 'develop' into address-book-use-chainId
* Select address book entries for display by chainId
* Merge all address book entry keys
* fixup! Merge all address book entry keys
* Delete localhost provider type
* Use ganache-cli default chain ID for tests
* Delete unused test firstTimeState variable
* Migrate default ganache-cli network to frequentRpcListDetail
* Add default test provider state
* Add test functionality to createJsonRpcClient
* Lint locales
* Update test middleware creation
* fixup! Update test middleware creation
* Update txMeta after postTxBalance has been retrieved
* Use gas used from txReceipt to calculate eth received
* Return null from getSwapsTokensReceivedFromTxMeta in tokenSymbol is ETH and txReceipt is missing
* Get latest txMeta before updating it with postTxBalance in case of a swaps tx in confirmTransaction
* Lint fix
* Add useSwapsEthToken hook and utilize wherever we need the ETH 'token' for swaps
* Remove rawEthTokens param from useTokensToSearch calls
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
Co-authored-by: Erik Marks <rekmarks@protonmail.com>
The quote list columns have been adjusted to add more space in between
the columns. Additionally, the third column cells are now better
aligned under the header. A few unnecessary `<div>`s and CSS classes
have been removed as well.
* Only shows the swaps intro popup on mainnet
* Remove code that closes swaps popup from e2e tests
* correct casing on isMainnet prop in home component
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.