diff --git a/Sources/BraveWallet/Crypto/BuySendSwap/SendTokenView.swift b/Sources/BraveWallet/Crypto/BuySendSwap/SendTokenView.swift index 052c97657d9..b4e452eafc0 100644 --- a/Sources/BraveWallet/Crypto/BuySendSwap/SendTokenView.swift +++ b/Sources/BraveWallet/Crypto/BuySendSwap/SendTokenView.swift @@ -16,6 +16,7 @@ struct SendTokenView: View { @State private var isShowingScanner = false @State private var isShowingError = false + @State private var didAutoShowSelectAccountToken = false @State private var isShowingSelectAccountTokenView: Bool = false @ScaledMetric private var length: CGFloat = 16.0 @@ -292,6 +293,10 @@ struct SendTokenView: View { } } .task { + if !didAutoShowSelectAccountToken { + isShowingSelectAccountTokenView = true + didAutoShowSelectAccountToken = true + } sendTokenStore.update() await sendTokenStore.selectTokenStore.update() } diff --git a/Sources/BraveWallet/Crypto/Stores/SendTokenStore.swift b/Sources/BraveWallet/Crypto/Stores/SendTokenStore.swift index c7640a2e319..89f9e8550f6 100644 --- a/Sources/BraveWallet/Crypto/Stores/SendTokenStore.swift +++ b/Sources/BraveWallet/Crypto/Stores/SendTokenStore.swift @@ -247,7 +247,9 @@ public class SendTokenStore: ObservableObject { let allTokens = await self.blockchainRegistry.allTokens(network.chainId, coin: network.coin) guard !Task.isCancelled else { return } if selectedSendToken == nil { - self.selectedSendToken = userAssets.first + self.selectedSendToken = userAssets.first(where: { network.isNativeAsset($0) }) + ?? userAssets.first(where: { $0.symbol.caseInsensitiveCompare("bat") == .orderedSame }) + ?? userAssets.sorted(by: { $0.name < $1.name }).first } self.userAssets = userAssets self.allTokens = allTokens