diff --git a/lib/core/address_validator.dart b/lib/core/address_validator.dart index ee8fe4b9a..273a6ca14 100644 --- a/lib/core/address_validator.dart +++ b/lib/core/address_validator.dart @@ -22,7 +22,8 @@ class AddressValidator extends TextValidator { case CryptoCurrency.bnb: return '[0-9a-zA-Z]'; case CryptoCurrency.btc: - return '[0-9a-zA-Z]'; + return '^1[0-9a-zA-Z]{32}\$|^1[0-9a-zA-Z]{33}\$|^3[0-9a-zA-Z]{32}\$' + '|^3[0-9a-zA-Z]{33}\$|^bc1[0-9a-zA-Z]{39}\$|^bc1[0-9a-zA-Z]{59}\$'; case CryptoCurrency.dai: return '[0-9a-zA-Z]'; case CryptoCurrency.dash: @@ -61,7 +62,7 @@ class AddressValidator extends TextValidator { case CryptoCurrency.bnb: return [42]; case CryptoCurrency.btc: - return [33, 34, 42, 62]; + return null; case CryptoCurrency.dai: return [42]; case CryptoCurrency.dash: diff --git a/lib/core/amount_validator.dart b/lib/core/amount_validator.dart index 369bde709..661e408b5 100644 --- a/lib/core/amount_validator.dart +++ b/lib/core/amount_validator.dart @@ -16,8 +16,7 @@ class AmountValidator extends TextValidator { case WalletType.monero: return '^([0-9]+([.\,][0-9]{0,12})?|[.\,][0-9]{1,12})\$'; case WalletType.bitcoin: - // FIXME: Incorrect pattern for bitcoin - return '^([0-9]+([.\,][0-9]{0,12})?|[.\,][0-9]{1,12})\$'; + return '^([0-9]+([.\,][0-9]{0,8})?|[.\,][0-9]{1,8})\$'; default: return ''; }