Skip to content

Commit b463d73

Browse files
authored
Merge pull request #5222 from EdgeApp/jon/fix/default-swap-assets
Fix TransactionListTop default swap asset logic
2 parents a3924a1 + d560731 commit b463d73

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Unreleased
44

55
- changed: Some unecessary `showError` dropdowns demoted to hidden `showDevError`
6+
- fixed: Default swap pair logic from the trade modal was not prioritizing mainnet assets
67
- removed: 'fasterpayments' payment type
78

89
## 4.12.0

src/components/themed/TransactionListTop.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ export class TransactionListTopComponent extends React.PureComponent<Props, Stat
326326
// priority assets for swapping.
327327
const isPriorityAssetMatch =
328328
currencyWallet.currencyInfo.pluginId === priorityAsset.pluginId &&
329-
currencyWallet.enabledTokenIds.some(enabledTokenId => enabledTokenId === priorityAsset.tokenId)
329+
(priorityAsset.tokenId == null || currencyWallet.enabledTokenIds.some(enabledTokenId => enabledTokenId === priorityAsset.tokenId))
330330

331331
// If the wallet or enabled tokens has a priority swap asset match,
332332
// calculate its USD value and add it to the ownedAssets array along

0 commit comments

Comments
 (0)