Skip to content

Conversation

@peachbits
Copy link
Contributor

@peachbits peachbits commented Dec 4, 2024

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

Copy link
Contributor

@swansontec swansontec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am approving this, because the only requested change should be a copy-paste.

Comment on lines +88 to +93
const stakeAssetUris = stakeContractAddresses.map(
stakeContractAddress => getCurrencyIconUris(pluginId, stakeContractAddress ?? null, SPECIAL_CURRENCY_INFO[pluginId]?.chainIcon ?? false).symbolImage
)
const rewardAssetUris = rewardContractAddresses.map(
rewardContractAddress => getCurrencyIconUris(pluginId, rewardContractAddress ?? null, SPECIAL_CURRENCY_INFO[pluginId]?.chainIcon ?? false).symbolImage
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pretty gnarly logic to keep two copies. Can we make a helper function?

const getAssetChainIcon = (contractAddress: string) =>
  getCurrencyIconUris(
    pluginId,
    contractAddress ?? null,
    // We want the chain icon if it makes sense:
    SPECIAL_CURRENCY_INFO[pluginId]?.chainIcon ?? false
  ).symbolImage

const stakeAssetUris = stakeContractAddresses.map(getAssetChainIcon)
const rewardAssetUris = rewardContractAddresses.map(getAssetChainIcon)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, will change it

@peachbits peachbits force-pushed the matthew/earn-scene-icons branch from 8da318d to 7a16c5a Compare December 6, 2024 00:25
@peachbits peachbits enabled auto-merge December 6, 2024 00:25
@peachbits peachbits merged commit 41ee341 into develop Dec 6, 2024
2 checks passed
@peachbits peachbits deleted the matthew/earn-scene-icons branch December 6, 2024 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants