diff --git a/lib/entities/unstoppable_domain_address.dart b/lib/entities/unstoppable_domain_address.dart index ab94e31fb..531702d38 100644 --- a/lib/entities/unstoppable_domain_address.dart +++ b/lib/entities/unstoppable_domain_address.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:flutter/services.dart'; const channel = MethodChannel('com.cake_wallet/native_utils'); @@ -6,13 +8,18 @@ Future fetchUnstoppableDomainAddress(String domain, String ticker) async var address = ''; try { - address = await channel.invokeMethod( - 'getUnstoppableDomainAddress', - { - 'domain' : domain, - 'ticker' : ticker - } - ) ?? ''; + if (Platform.isAndroid || Platform.isIOS) { + address = await channel.invokeMethod( + 'getUnstoppableDomainAddress', + { + 'domain' : domain, + 'ticker' : ticker + } + ) ?? ''; + } else { + // TODO: Integrate with Unstoppable domains resolution API + return address; + } } catch (e) { print('Unstoppable domain error: ${e.toString()}'); address = '';