From 270b5f4c782dd2a46f610b760ac8e5354f321681 Mon Sep 17 00:00:00 2001 From: OleksandrSobol Date: Tue, 23 Feb 2021 20:38:36 +0200 Subject: [PATCH] CAKE-281 | added addr1 address format validation for cardano --- lib/core/address_validator.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/core/address_validator.dart b/lib/core/address_validator.dart index 0591029f3..ee8fe4b9a 100644 --- a/lib/core/address_validator.dart +++ b/lib/core/address_validator.dart @@ -15,7 +15,8 @@ class AddressValidator extends TextValidator { case CryptoCurrency.xmr: return '[0-9a-zA-Z]'; case CryptoCurrency.ada: - return '[0-9a-zA-Z]'; + return '^[0-9a-zA-Z]{59}\$|^[0-9a-zA-Z]{92}\$|^[0-9a-zA-Z]{104}\$' + '|^[0-9a-zA-Z]{105}\$|^addr1[0-9a-zA-Z]{98}\$'; case CryptoCurrency.bch: return '[0-9a-zA-Z]'; case CryptoCurrency.bnb: @@ -54,7 +55,7 @@ class AddressValidator extends TextValidator { case CryptoCurrency.xmr: return [95, 106]; case CryptoCurrency.ada: - return [59, 92, 104, 105]; + return null; case CryptoCurrency.bch: return [42]; case CryptoCurrency.bnb: