mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
ens working
This commit is contained in:
parent
d8d2335a5f
commit
a52c7b053e
33 changed files with 133 additions and 63 deletions
|
@ -211,9 +211,9 @@ I/flutter ( 4474): Gas Used: 53000
|
|||
}
|
||||
}
|
||||
|
||||
Future<String?> checkEnsName(String ensName) async {
|
||||
Future<String> checkEnsName(String ensName) async {
|
||||
if (_client == null) {
|
||||
return null;
|
||||
return "";
|
||||
}
|
||||
try {
|
||||
final ens = Ens(client: _client!);
|
||||
|
@ -222,7 +222,7 @@ I/flutter ( 4474): Gas Used: 53000
|
|||
return addr.hex;
|
||||
} catch (e) {
|
||||
print(e);
|
||||
return null;
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -508,4 +508,8 @@ abstract class EthereumWalletBase
|
|||
@override
|
||||
String signMessage(String message, {String? address = null}) =>
|
||||
bytesToHex(_ethPrivateKey.signPersonalMessageToUint8List(ascii.encode(message)));
|
||||
|
||||
Future<String> fetchEnsAddress(String name) async {
|
||||
return await _client.checkEnsName(name);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue