mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-17 09:47:35 +00:00
22 lines
528 B
Dart
22 lines
528 B
Dart
|
import 'package:flutter/services.dart';
|
||
|
|
||
|
const channel = MethodChannel('com.cakewallet.cake_wallet/unstoppable-domain');
|
||
|
|
||
|
Future<String> fetchUnstoppableDomainAddress(String domain, String ticker) async {
|
||
|
String address;
|
||
|
|
||
|
try {
|
||
|
address = await channel.invokeMethod(
|
||
|
'getUnstoppableDomainAddress',
|
||
|
<String, String> {
|
||
|
'domain' : domain,
|
||
|
'ticker' : ticker
|
||
|
}
|
||
|
);
|
||
|
} catch (e) {
|
||
|
print('Unstoppable domain error: ${e.toString()}');
|
||
|
address = '';
|
||
|
}
|
||
|
|
||
|
return address;
|
||
|
}
|