mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-07 11:29:36 +00:00
e2278ae403
+ migrate to monero_c
17 lines
435 B
Dart
17 lines
435 B
Dart
import 'dart:convert';
|
|
|
|
import 'package:monero/zano.dart' as zano;
|
|
import 'package:cw_zano/api/model/get_address_info_result.dart';
|
|
|
|
class ZanoUtils {
|
|
static bool validateAddress(String address) {
|
|
try {
|
|
final result = GetAddressInfoResult.fromJson(
|
|
jsonDecode(zano.PlainWallet_getAddressInfo(address)) as Map<String, dynamic>,
|
|
);
|
|
return result.valid;
|
|
} catch (err) {
|
|
return false;
|
|
}
|
|
}
|
|
}
|