review fixes

This commit is contained in:
Matthew Fosse 2024-03-06 08:08:56 -08:00
parent e4f04c273b
commit 6ca2a5d8ed
2 changed files with 5 additions and 3 deletions

View file

@ -270,12 +270,14 @@ class AddressValidator extends TextValidator {
'|([^0-9a-zA-Z]|^)8[0-9a-zA-Z]{94}([^0-9a-zA-Z]|\$)'
'|([^0-9a-zA-Z]|^)[0-9a-zA-Z]{106}([^0-9a-zA-Z]|\$)';
case CryptoCurrency.btc:
case CryptoCurrency.btcln:
return '([^0-9a-zA-Z]|^)([1mn][a-km-zA-HJ-NP-Z1-9]{25,34})([^0-9a-zA-Z]|\$)' //P2pkhAddress type
'|([^0-9a-zA-Z]|^)([23][a-km-zA-HJ-NP-Z1-9]{25,34})([^0-9a-zA-Z]|\$)' //P2shAddress type
'|([^0-9a-zA-Z]|^)((bc|tb)1q[ac-hj-np-z02-9]{25,39})([^0-9a-zA-Z]|\$)' //P2wpkhAddress type
'|([^0-9a-zA-Z]|^)((bc|tb)1q[ac-hj-np-z02-9]{40,80})([^0-9a-zA-Z]|\$)' //P2wshAddress type
'|([^0-9a-zA-Z]|^)((bc|tb)1p([ac-hj-np-z02-9]{39}|[ac-hj-np-z02-9]{59}|[ac-hj-np-z02-9]{8,89}))([^0-9a-zA-Z]|\$)'; //P2trAddress type
case CryptoCurrency.btcln:
// bolt11:
return '(lnbc|LNBC)([0-9]{1,}[a-zA-Z0-9]+)([^0-9a-zA-Z]|\$)';
case CryptoCurrency.ltc:
return '([^0-9a-zA-Z]|^)^L[a-zA-Z0-9]{26,33}([^0-9a-zA-Z]|\$)'
'|([^0-9a-zA-Z]|^)[LM][a-km-zA-HJ-NP-Z1-9]{26,33}([^0-9a-zA-Z]|\$)'

View file

@ -55,7 +55,6 @@ class ProvidersHelper {
case WalletType.monero:
return [ProviderType.askEachTime, ProviderType.onramper, ProviderType.dfx];
case WalletType.bitcoin:
case WalletType.lightning:
case WalletType.ethereum:
return [
ProviderType.askEachTime,
@ -71,6 +70,7 @@ class ProvidersHelper {
case WalletType.solana:
return [ProviderType.askEachTime, ProviderType.onramper, ProviderType.robinhood];
case WalletType.none:
case WalletType.lightning:
case WalletType.haven:
return [];
}
@ -79,7 +79,6 @@ class ProvidersHelper {
static List<ProviderType> getAvailableSellProviderTypes(WalletType walletType) {
switch (walletType) {
case WalletType.bitcoin:
case WalletType.lightning:
case WalletType.ethereum:
return [
ProviderType.askEachTime,
@ -102,6 +101,7 @@ class ProvidersHelper {
case WalletType.monero:
case WalletType.nano:
case WalletType.banano:
case WalletType.lightning:
case WalletType.none:
case WalletType.haven:
return [];