From d07efc81ca257b0dadbcd11ba11d871df10bcd23 Mon Sep 17 00:00:00 2001 From: Konstantin Ullrich Date: Mon, 27 Nov 2023 22:50:12 +0100 Subject: [PATCH] Lookup NFTs only if the current wallet is an Ethereum Wallet (#1197) --- lib/view_model/dashboard/nft_view_model.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/view_model/dashboard/nft_view_model.dart b/lib/view_model/dashboard/nft_view_model.dart index ec5919b7d..c5acf5523 100644 --- a/lib/view_model/dashboard/nft_view_model.dart +++ b/lib/view_model/dashboard/nft_view_model.dart @@ -4,6 +4,7 @@ import 'dart:developer'; import 'package:cake_wallet/core/wallet_connect/wc_bottom_sheet_service.dart'; import 'package:cake_wallet/src/screens/wallet_connect/widgets/message_display_widget.dart'; +import 'package:cw_core/wallet_type.dart'; import 'package:http/http.dart' as http; import 'package:mobx/mobx.dart'; import 'package:cake_wallet/.secrets.g.dart' as secrets; @@ -38,6 +39,8 @@ abstract class NFTViewModelBase with Store { @action Future getNFTAssetByWallet() async { + if (appStore.wallet!.type != WalletType.ethereum) return; + final walletAddress = appStore.wallet!.walletInfo.address; log('Fetching wallet NFTs for $walletAddress');