Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix undefined wallet access in GuiPluginListScene #5307

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading