Lookup NFTs only if the current wallet is an Ethereum Wallet (#1197)
Konstantin Ullrich committed
Nov 27, 2023 at 22:50 UTC
d07efc81ca257b0dadbcd11ba11d871df10bcd23
1 file changed
+3
lib/view_model/dashboard/nft_view_model.dart
+3
@@ -4,6 +4,7 @@ import 'dart:developer';
4
5
import 'package:cake_wallet/core/wallet_connect/wc_bottom_sheet_service.dart';
6
import 'package:cake_wallet/src/screens/wallet_connect/widgets/message_display_widget.dart';
7
+import 'package:cw_core/wallet_type.dart';
8
import 'package:http/http.dart' as http;
9
import 'package:mobx/mobx.dart';
10
import 'package:cake_wallet/.secrets.g.dart' as secrets;
@@ -38,6 +39,8 @@ abstract class NFTViewModelBase with Store {
39
40
@action
41
Future<void> getNFTAssetByWallet() async {
42
+ if (appStore.wallet!.type != WalletType.ethereum) return;
43
+
44
final walletAddress = appStore.wallet!.walletInfo.address;
45
log('Fetching wallet NFTs for $walletAddress');
46