Skip to content

Commit

Permalink
Fix undefined wallet access in GuiPluginListScene
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon-edge committed Oct 14, 2024
1 parent 2173c14 commit 087817f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- changed: Update `NotificationCard` to UI4 styling
- changed: Remove legacy non-segwit wallets from new account wallet selection scene
- fixed: Use account default fiat for transaction fee display in `SweepPrivateKeyCalculateFeeScene`
- fixed: Crash when archiving a wallet that recently accessed the trade modal

## 4.15.0

Expand Down
5 changes: 3 additions & 2 deletions src/components/scenes/GuiPluginListScene.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,12 @@ class GuiPluginList extends React.PureComponent<Props, State> {
const countryName = hasCountryData ? countryData.name : lstrings.buy_sell_crypto_select_country_button
const iconStyle = stateProvinceData == null ? styles.selectedCountryFlag : styles.selectedCountryFlagSelectableRow
const icon = !hasCountryData ? undefined : <FastImage source={imageSrc} style={iconStyle} />
const forcedWallet = forcedWalletResult?.type === 'wallet' ? account.currencyWallets[forcedWalletResult.walletId] : undefined

const titleAsset =
forcedWalletResult == null || forcedWalletResult.type !== 'wallet'
forcedWalletResult == null || forcedWalletResult.type !== 'wallet' || forcedWallet == null
? lstrings.cryptocurrency
: getCurrencyCodeWithAccount(account, account.currencyWallets[forcedWalletResult.walletId].currencyInfo.pluginId, forcedWalletResult.tokenId ?? null)
: getCurrencyCodeWithAccount(account, forcedWallet.currencyInfo.pluginId, forcedWalletResult.tokenId ?? null)

const countryCard =
stateProvinceData == null ? (
Expand Down

0 comments on commit 087817f

Please sign in to comment.