Skip to content

Commit

Permalink
fuzzy logic. Better safe than sorry
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-CStack committed Dec 5, 2024
1 parent 3f8cf25 commit 4a59505
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/wallets/crypto_currency/coins/monero.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions lib/wallets/crypto_currency/coins/wownero.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions lib/wallets/wallet/intermediate/lib_monero_wallet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4a59505

Please sign in to comment.