Skip to content

Commit 96d3720

Browse files
committed
Append chain names to token codes in RampCreateScene
1 parent 7ddd9d7 commit 96d3720

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Unreleased (develop)
44

5+
- changed: Append chain names to token codes in RampCreateScene
6+
57
## 4.42.0 (staging)
68

79
- added: Zcash buy/sell support with Banxa

src/components/scenes/RampCreateScene.tsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,19 +138,18 @@ export const RampCreateScene: React.FC<Props> = (props: Props) => {
138138
]
139139
: [undefined, undefined]
140140

141-
// Append chain name for L2-native assets like Optimism ETH
141+
// Append chain name for tokens and L2-native assets like Optimism ETH
142142
function getSelectedCryptoDisplay(): string | undefined {
143143
if (selectedCrypto == null) return
144144
if (selectedWallet == null) return
145145
if (selectedCryptoCurrencyCode == null) return
146146

147-
const isL2Native =
148-
selectedCrypto.tokenId == null &&
149-
!isAssetNativeToChain(selectedWallet.currencyInfo, undefined)
150-
151-
return isL2Native
152-
? `${selectedCryptoCurrencyCode} (${selectedWallet.currencyInfo.displayName})`
153-
: selectedCryptoCurrencyCode
147+
return isAssetNativeToChain(
148+
selectedWallet.currencyInfo,
149+
selectedCrypto.tokenId
150+
)
151+
? selectedCryptoCurrencyCode
152+
: `${selectedCryptoCurrencyCode} (${selectedWallet.currencyInfo.displayName})`
154153
}
155154

156155
// Get the select crypto denomination for exchange rate

0 commit comments

Comments
 (0)