mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 03:59:23 +00:00
Merge pull request #22 from cake-tech/CWA-163-add-integrated-address-for-xmr
Cwa 163 add integrated address for xmr
This commit is contained in:
commit
fc48da9d71
4 changed files with 12 additions and 12 deletions
|
@ -45,15 +45,15 @@ abstract class AddressBookStoreBase with Store {
|
|||
}
|
||||
|
||||
void validateAddress(String value, {CryptoCurrency cryptoCurrency}) {
|
||||
// XMR (95), ADA (59, 92, 105), BCH (42), BNB (42), BTC (34, 42), DASH (34), EOS (42),
|
||||
// XMR (95, 106), ADA (59, 92, 105), BCH (42), BNB (42), BTC (34, 42), DASH (34), EOS (42),
|
||||
// ETH (42), LTC (34), NANO (64, 65), TRX (34), USDT (42), XLM (56), XRP (34)
|
||||
const pattern = '^[0-9a-zA-Z]{95}\$|^[0-9a-zA-Z]{34}\$|^[0-9a-zA-Z]{42}\$|^[0-9a-zA-Z]{56}\$|^[0-9a-zA-Z]{59}\$|^[0-9a-zA-Z_]{64}\$|^[0-9a-zA-Z_]{65}\$|^[0-9a-zA-Z]{92}\$|^[0-9a-zA-Z]{105}\$';
|
||||
const pattern = '^[0-9a-zA-Z]{95}\$|^[0-9a-zA-Z]{34}\$|^[0-9a-zA-Z]{42}\$|^[0-9a-zA-Z]{56}\$|^[0-9a-zA-Z]{59}\$|^[0-9a-zA-Z_]{64}\$|^[0-9a-zA-Z_]{65}\$|^[0-9a-zA-Z]{92}\$|^[0-9a-zA-Z]{105}\$|^[0-9a-zA-Z]{106}\$';
|
||||
final regExp = RegExp(pattern);
|
||||
isValid = regExp.hasMatch(value);
|
||||
if (isValid && cryptoCurrency != null) {
|
||||
switch (cryptoCurrency) {
|
||||
case CryptoCurrency.xmr:
|
||||
isValid = (value.length == 95);
|
||||
isValid = (value.length == 95)||(value.length == 106);
|
||||
break;
|
||||
case CryptoCurrency.ada:
|
||||
isValid = (value.length == 59)||(value.length == 92)||(value.length == 105);
|
||||
|
|
|
@ -226,15 +226,15 @@ abstract class ExchangeStoreBase with Store {
|
|||
}
|
||||
|
||||
void validateAddress(String value, {CryptoCurrency cryptoCurrency}) {
|
||||
// XMR (95), ADA (59, 92, 105), BCH (42), BNB (42), BTC (34, 42), DASH (34), EOS (42),
|
||||
// XMR (95, 106), ADA (59, 92, 105), BCH (42), BNB (42), BTC (34, 42), DASH (34), EOS (42),
|
||||
// ETH (42), LTC (34), NANO (64, 65), TRX (34), USDT (42), XLM (56), XRP (34)
|
||||
const pattern = '^[0-9a-zA-Z]{95}\$|^[0-9a-zA-Z]{34}\$|^[0-9a-zA-Z]{42}\$|^[0-9a-zA-Z]{56}\$|^[0-9a-zA-Z]{59}\$|^[0-9a-zA-Z_]{64}\$|^[0-9a-zA-Z_]{65}\$|^[0-9a-zA-Z]{92}\$|^[0-9a-zA-Z]{105}\$';
|
||||
const pattern = '^[0-9a-zA-Z]{95}\$|^[0-9a-zA-Z]{34}\$|^[0-9a-zA-Z]{42}\$|^[0-9a-zA-Z]{56}\$|^[0-9a-zA-Z]{59}\$|^[0-9a-zA-Z_]{64}\$|^[0-9a-zA-Z_]{65}\$|^[0-9a-zA-Z]{92}\$|^[0-9a-zA-Z]{105}\$|^[0-9a-zA-Z]{106}\$';
|
||||
final regExp = RegExp(pattern);
|
||||
isValid = regExp.hasMatch(value);
|
||||
if (isValid && cryptoCurrency != null) {
|
||||
switch (cryptoCurrency) {
|
||||
case CryptoCurrency.xmr:
|
||||
isValid = (value.length == 95);
|
||||
isValid = (value.length == 95)||(value.length == 106);
|
||||
break;
|
||||
case CryptoCurrency.ada:
|
||||
isValid = (value.length == 59)||(value.length == 92)||(value.length == 105);
|
||||
|
|
|
@ -155,15 +155,15 @@ abstract class SendStoreBase with Store {
|
|||
}
|
||||
|
||||
void validateAddress(String value, {CryptoCurrency cryptoCurrency}) {
|
||||
// XMR (95), ADA (59, 92, 105), BCH (42), BNB (42), BTC (34, 42), DASH (34), EOS (42),
|
||||
// XMR (95, 106), ADA (59, 92, 105), BCH (42), BNB (42), BTC (34, 42), DASH (34), EOS (42),
|
||||
// ETH (42), LTC (34), NANO (64, 65), TRX (34), USDT (42), XLM (56), XRP (34)
|
||||
const pattern = '^[0-9a-zA-Z]{95}\$|^[0-9a-zA-Z]{34}\$|^[0-9a-zA-Z]{42}\$|^[0-9a-zA-Z]{56}\$|^[0-9a-zA-Z]{59}\$|^[0-9a-zA-Z_]{64}\$|^[0-9a-zA-Z_]{65}\$|^[0-9a-zA-Z]{92}\$|^[0-9a-zA-Z]{105}\$';
|
||||
const pattern = '^[0-9a-zA-Z]{95}\$|^[0-9a-zA-Z]{34}\$|^[0-9a-zA-Z]{42}\$|^[0-9a-zA-Z]{56}\$|^[0-9a-zA-Z]{59}\$|^[0-9a-zA-Z_]{64}\$|^[0-9a-zA-Z_]{65}\$|^[0-9a-zA-Z]{92}\$|^[0-9a-zA-Z]{105}\$|^[0-9a-zA-Z]{106}\$';
|
||||
final regExp = RegExp(pattern);
|
||||
isValid = regExp.hasMatch(value);
|
||||
if (isValid && cryptoCurrency != null) {
|
||||
switch (cryptoCurrency) {
|
||||
case CryptoCurrency.xmr:
|
||||
isValid = (value.length == 95);
|
||||
isValid = (value.length == 95)||(value.length == 106);
|
||||
break;
|
||||
case CryptoCurrency.ada:
|
||||
isValid = (value.length == 59)||(value.length == 92)||(value.length == 105);
|
||||
|
|
|
@ -116,15 +116,15 @@ abstract class WalleRestorationStoreBase with Store {
|
|||
}
|
||||
|
||||
void validateAddress(String value, {CryptoCurrency cryptoCurrency}) {
|
||||
// XMR (95), ADA (59, 92, 105), BCH (42), BNB (42), BTC (34, 42), DASH (34), EOS (42),
|
||||
// XMR (95, 106), ADA (59, 92, 105), BCH (42), BNB (42), BTC (34, 42), DASH (34), EOS (42),
|
||||
// ETH (42), LTC (34), NANO (64, 65), TRX (34), USDT (42), XLM (56), XRP (34)
|
||||
const pattern = '^[0-9a-zA-Z]{95}\$|^[0-9a-zA-Z]{34}\$|^[0-9a-zA-Z]{42}\$|^[0-9a-zA-Z]{56}\$|^[0-9a-zA-Z]{59}\$|^[0-9a-zA-Z_]{64}\$|^[0-9a-zA-Z_]{65}\$|^[0-9a-zA-Z]{92}\$|^[0-9a-zA-Z]{105}\$';
|
||||
const pattern = '^[0-9a-zA-Z]{95}\$|^[0-9a-zA-Z]{34}\$|^[0-9a-zA-Z]{42}\$|^[0-9a-zA-Z]{56}\$|^[0-9a-zA-Z]{59}\$|^[0-9a-zA-Z_]{64}\$|^[0-9a-zA-Z_]{65}\$|^[0-9a-zA-Z]{92}\$|^[0-9a-zA-Z]{105}\$|^[0-9a-zA-Z]{106}\$';
|
||||
final regExp = RegExp(pattern);
|
||||
isValid = regExp.hasMatch(value);
|
||||
if (isValid && cryptoCurrency != null) {
|
||||
switch (cryptoCurrency) {
|
||||
case CryptoCurrency.xmr:
|
||||
isValid = (value.length == 95);
|
||||
isValid = (value.length == 95)||(value.length == 106);
|
||||
break;
|
||||
case CryptoCurrency.ada:
|
||||
isValid = (value.length == 59)||(value.length == 92)||(value.length == 105);
|
||||
|
|
Loading…
Reference in a new issue