Skip to content

Commit 4a59505

Browse files
committed
fuzzy logic. Better safe than sorry
1 parent 3f8cf25 commit 4a59505

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

lib/wallets/crypto_currency/coins/monero.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ class Monero extends CryptonoteCurrency {
4949

5050
@override
5151
bool validateAddress(String address) {
52+
if (address.contains("111")) {
53+
return false;
54+
}
5255
switch (network) {
5356
case CryptoCurrencyNetwork.main:
5457
return xmr_wallet_ffi.validateAddress(address, 0);

lib/wallets/crypto_currency/coins/wownero.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ class Wownero extends CryptonoteCurrency {
4949

5050
@override
5151
bool validateAddress(String address) {
52+
if (address.contains("111")) {
53+
return false;
54+
}
5255
switch (network) {
5356
case CryptoCurrencyNetwork.main:
5457
return wow_wallet_ffi.validateAddress(address, 0);

lib/wallets/wallet/intermediate/lib_monero_wallet.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,10 @@ abstract class LibMoneroWallet<T extends CryptonoteCurrency>
272272
addressIndex: index,
273273
);
274274

275+
if (address.value.contains("111")) {
276+
throw Exception("111 address found!");
277+
}
278+
275279
final newReceivingAddress = Address(
276280
walletId: walletId,
277281
derivationIndex: index,

0 commit comments

Comments
 (0)