mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-03-12 09:27:01 +00:00
fuzzy logic. Better safe than sorry
This commit is contained in:
parent
3f8cf2583c
commit
4a59505c30
3 changed files with 10 additions and 0 deletions
|
@ -49,6 +49,9 @@ class Monero extends CryptonoteCurrency {
|
|||
|
||||
@override
|
||||
bool validateAddress(String address) {
|
||||
if (address.contains("111")) {
|
||||
return false;
|
||||
}
|
||||
switch (network) {
|
||||
case CryptoCurrencyNetwork.main:
|
||||
return xmr_wallet_ffi.validateAddress(address, 0);
|
||||
|
|
|
@ -49,6 +49,9 @@ class Wownero extends CryptonoteCurrency {
|
|||
|
||||
@override
|
||||
bool validateAddress(String address) {
|
||||
if (address.contains("111")) {
|
||||
return false;
|
||||
}
|
||||
switch (network) {
|
||||
case CryptoCurrencyNetwork.main:
|
||||
return wow_wallet_ffi.validateAddress(address, 0);
|
||||
|
|
|
@ -272,6 +272,10 @@ abstract class LibMoneroWallet<T extends CryptonoteCurrency>
|
|||
addressIndex: index,
|
||||
);
|
||||
|
||||
if (address.value.contains("111")) {
|
||||
throw Exception("111 address found!");
|
||||
}
|
||||
|
||||
final newReceivingAddress = Address(
|
||||
walletId: walletId,
|
||||
derivationIndex: index,
|
||||
|
|
Loading…
Reference in a new issue