Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
added more comments to explain code logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
nuo-xu committed Apr 24, 2023
1 parent b4a9938 commit e82f244
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/BraveWallet/Crypto/Stores/AssetDetailStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ class AssetDetailStore: ObservableObject {
private let blockchainRegistry: BraveWalletBlockchainRegistry
private let solTxManagerProxy: BraveWalletSolanaTxManagerProxy
private let swapService: BraveWalletSwapService
// private var selectedNetwork: BraveWallet.NetworkInfo = .init()
/// A list of tokens that are supported with the current selected network for all supported
/// on-ramp providers.
private var allBuyTokensAllOptions: [BraveWallet.OnRampProvider: [BraveWallet.BlockchainToken]] = [:]
Expand Down Expand Up @@ -200,6 +199,7 @@ class AssetDetailStore: ObservableObject {
self.isInitialState = false
self.isLoadingChart = false

// selected network used because we don't have `chainId` on CoinMarket
let selectedCoin = await self.walletService.selectedCoin()
let selectedNetwork = await self.rpcService.network(selectedCoin)
self.isBuySupported = await self.isBuyButtonSupported(in: selectedNetwork, for: coinMarket.symbol)
Expand Down

0 comments on commit e82f244

Please sign in to comment.