Skip to content

Commit

Permalink
No Bug: Fix for bad access crash causing flakey test (brave/brave-ios…
Browse files Browse the repository at this point in the history
…#8684)

Fix for bad access crash when accessing non-thread safe dict from background thread. Resolves flakey `SelectAccountTokenStoreTests` unit test test.
  • Loading branch information
StephenHeaps authored Jan 19, 2024
1 parent bb271d4 commit a470306
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ class SelectAccountTokenStore: ObservableObject, WalletObserverStore {
return nil
}
var price: String?
if let tokenPrice = pricesForTokensCache[token.assetRatioId.lowercased()],
if let tokenPrice = pricesCache[token.assetRatioId.lowercased()],
balance > 0 {
price = currencyFormatter.string(from: NSNumber(value: (Double(tokenPrice) ?? 0) * balance))
}
Expand Down

0 comments on commit a470306

Please sign in to comment.