mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 12:09:43 +00:00
17 lines
438 B
Dart
17 lines
438 B
Dart
import 'dart:convert';
|
|
|
|
import 'package:cw_zano/api/api_calls.dart';
|
|
import 'package:cw_zano/api/model/get_address_info_result.dart';
|
|
|
|
class ZanoUtils {
|
|
static bool validateAddress(String address) {
|
|
try {
|
|
final result = GetAddressInfoResult.fromJson(
|
|
jsonDecode(ApiCalls.getAddressInfo(address: address)) as Map<String, dynamic>,
|
|
);
|
|
return result.valid;
|
|
} catch (err) {
|
|
return false;
|
|
}
|
|
}
|
|
}
|