namecoin validate address bugfix

This commit is contained in:
julian 2022-09-23 10:48:27 -06:00
parent ef7881b4d0
commit befeb55d13

View file

@ -3,9 +3,9 @@ import 'dart:convert';
import 'package:bitcoindart/bitcoindart.dart';
import 'package:crypto/crypto.dart';
import 'package:flutter_libepiccash/epic_cash.dart';
import 'package:stackwallet/services/coins/bitcoincash/bitcoincash_wallet.dart';
import 'package:stackwallet/services/coins/dogecoin/dogecoin_wallet.dart';
import 'package:stackwallet/services/coins/firo/firo_wallet.dart';
import 'package:stackwallet/services/coins/bitcoincash/bitcoincash_wallet.dart';
import 'package:stackwallet/services/coins/namecoin/namecoin_wallet.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/logger.dart';
@ -54,7 +54,7 @@ class AddressUtils {
return RegExp("[a-zA-Z0-9]{95}").hasMatch(address) ||
RegExp("[a-zA-Z0-9]{106}").hasMatch(address);
case Coin.namecoin:
return Address.validateAddress(address, namecoin);
return Address.validateAddress(address, namecoin, namecoin.bech32!);
case Coin.bitcoinTestNet:
return Address.validateAddress(address, testnet);
case Coin.bitcoincashTestnet: