Skip to content

Conversation

Jon-edge
Copy link
Collaborator

@Jon-edge Jon-edge commented Aug 27, 2024

Mainnet assets were not properly being accounted for

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.

Approved with one small cleanup.

const isPriorityAssetMatch =
currencyWallet.currencyInfo.pluginId === priorityAsset.pluginId &&
currencyWallet.enabledTokenIds.some(enabledTokenId => enabledTokenId === priorityAsset.tokenId)
(priorityAsset.tokenId == null || currencyWallet.enabledTokenIds.some(enabledTokenId => enabledTokenId === priorityAsset.tokenId))
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of Array.some, try Array.includes on the right-Rand side. Much simpler.

@Jon-edge Jon-edge force-pushed the jon/fix/default-swap-assets branch from 95904e9 to 9d8bc2c Compare August 27, 2024 23:35
@Jon-edge Jon-edge enabled auto-merge August 27, 2024 23:35
Mainnet assets were not properly being accounted for
@Jon-edge Jon-edge force-pushed the jon/fix/default-swap-assets branch from 9d8bc2c to d560731 Compare August 27, 2024 23:35
@Jon-edge Jon-edge merged commit b463d73 into develop Aug 27, 2024
2 checks passed
@Jon-edge Jon-edge deleted the jon/fix/default-swap-assets branch August 27, 2024 23:49
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.

2 participants