mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 20:39:51 +00:00
* v4.23.0 release candidate * - Fix restoring zano from QR - Fix Zano confirmations count - Fix birdpay - Fix balance display * Fix Zano assets showing amount before they are added * - handle fetching token data while the API is busy - potential fix for duplicate transactions * fix receive confirmations, maybe * revert onChangeWallet cleanup * Fix confirmations not updating * improve zano wallet opening, fix CI commands and messages on slack (#1979) Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com> * Cache wallet when creating/restoring as well * - hardcode Trocador Maximum limit for Zano temporarily - Configure Cake Zano node to use SSL * reformatting [skip ci] * revert to non-ssl * update build numbers [skip ci] * disable zano for desktop [skip ci] --------- Co-authored-by: cyan <cyjan@mrcyjanek.net>
28 lines
766 B
Dart
28 lines
766 B
Dart
import 'dart:convert';
|
|
|
|
import 'package:cw_core/utils/print_verbose.dart';
|
|
import 'package:http/http.dart' as http;
|
|
|
|
class ZanoAlias {
|
|
static Future<String?> fetchZanoAliasAddress(String alias) async {
|
|
try {
|
|
final uri = Uri.parse("http://zano.cakewallet.com:11211/json_rpc");
|
|
final response = await http.post(
|
|
uri,
|
|
body: json.encode({
|
|
"id": 0,
|
|
"jsonrpc": "2.0",
|
|
"method": "get_alias_details",
|
|
"params": {"alias": alias}
|
|
}),
|
|
);
|
|
final jsonParsed = json.decode(response.body) as Map<String, dynamic>;
|
|
|
|
return jsonParsed['result']['alias_details']['address'] as String?;
|
|
} catch (e) {
|
|
printV('Zano Alias error: ${e.toString()}');
|
|
}
|
|
|
|
return null;
|
|
}
|
|
}
|