mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-03 17:40:43 +00:00
Temporarily fetch unstoppable domains only on mobile
This commit is contained in:
parent
132033207e
commit
adfebe6940
1 changed files with 14 additions and 7 deletions
|
@ -1,3 +1,5 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
const channel = MethodChannel('com.cake_wallet/native_utils');
|
||||
|
@ -6,6 +8,7 @@ Future<String> fetchUnstoppableDomainAddress(String domain, String ticker) async
|
|||
var address = '';
|
||||
|
||||
try {
|
||||
if (Platform.isAndroid || Platform.isIOS) {
|
||||
address = await channel.invokeMethod<String>(
|
||||
'getUnstoppableDomainAddress',
|
||||
<String, String> {
|
||||
|
@ -13,6 +16,10 @@ Future<String> fetchUnstoppableDomainAddress(String domain, String ticker) async
|
|||
'ticker' : ticker
|
||||
}
|
||||
) ?? '';
|
||||
} else {
|
||||
// TODO: Integrate with Unstoppable domains resolution API
|
||||
return address;
|
||||
}
|
||||
} catch (e) {
|
||||
print('Unstoppable domain error: ${e.toString()}');
|
||||
address = '';
|
||||
|
|
Loading…
Reference in a new issue