Skip to content

Use local ETH_SWAPS_TOKEN_OBJECT in swaps token array#9678

Merged
danjm merged 1 commit intodevelopfrom
local-eth-token-swaps-tokens
Oct 22, 2020
Merged

Use local ETH_SWAPS_TOKEN_OBJECT in swaps token array#9678
danjm merged 1 commit intodevelopfrom
local-eth-token-swaps-tokens

Conversation

@danjm
Copy link
Copy Markdown
Contributor

@danjm danjm commented Oct 22, 2020

The swaps '/tokens' api returns a list of token objects. These object always have the following properties: symbol, decimals, address. They sometimes have an iconUrl. The list include an object for the "ETH" token, that only includes symbol, decimals and address.

We have a local constant ETH_SWAPS_TOKEN_OBJECT that includes a local iconUrl for the "ETH" token. This PR causes us to explicitly replace the ETH token object returned by the api with our local one. This will ensure the iconUrl is always available on the eth token object.

@danjm danjm requested a review from a team as a code owner October 22, 2020 13:50
@danjm danjm requested a review from whymarrh October 22, 2020 13:50
@github-actions
Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@danjm danjm force-pushed the local-eth-token-swaps-tokens branch from cebf223 to 0075612 Compare October 22, 2020 13:58
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [0075612]
Page Load Metrics (438 ± 61 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint298439126
domContentLoaded29874543612660
load30074943812661
domInteractive29874543612660

@danjm danjm merged commit 21ab6fb into develop Oct 22, 2020
@danjm danjm deleted the local-eth-token-swaps-tokens branch October 22, 2020 15:00
@github-actions github-actions bot locked and limited conversation to collaborators Oct 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants