mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-23 11:15:33 +00:00
review fixes
This commit is contained in:
parent
e4f04c273b
commit
6ca2a5d8ed
2 changed files with 5 additions and 3 deletions
|
@ -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]|^)8[0-9a-zA-Z]{94}([^0-9a-zA-Z]|\$)'
|
||||||
'|([^0-9a-zA-Z]|^)[0-9a-zA-Z]{106}([^0-9a-zA-Z]|\$)';
|
'|([^0-9a-zA-Z]|^)[0-9a-zA-Z]{106}([^0-9a-zA-Z]|\$)';
|
||||||
case CryptoCurrency.btc:
|
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
|
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]|^)([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]{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)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
|
'|([^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:
|
case CryptoCurrency.ltc:
|
||||||
return '([^0-9a-zA-Z]|^)^L[a-zA-Z0-9]{26,33}([^0-9a-zA-Z]|\$)'
|
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]|\$)'
|
'|([^0-9a-zA-Z]|^)[LM][a-km-zA-HJ-NP-Z1-9]{26,33}([^0-9a-zA-Z]|\$)'
|
||||||
|
|
|
@ -55,7 +55,6 @@ class ProvidersHelper {
|
||||||
case WalletType.monero:
|
case WalletType.monero:
|
||||||
return [ProviderType.askEachTime, ProviderType.onramper, ProviderType.dfx];
|
return [ProviderType.askEachTime, ProviderType.onramper, ProviderType.dfx];
|
||||||
case WalletType.bitcoin:
|
case WalletType.bitcoin:
|
||||||
case WalletType.lightning:
|
|
||||||
case WalletType.ethereum:
|
case WalletType.ethereum:
|
||||||
return [
|
return [
|
||||||
ProviderType.askEachTime,
|
ProviderType.askEachTime,
|
||||||
|
@ -71,6 +70,7 @@ class ProvidersHelper {
|
||||||
case WalletType.solana:
|
case WalletType.solana:
|
||||||
return [ProviderType.askEachTime, ProviderType.onramper, ProviderType.robinhood];
|
return [ProviderType.askEachTime, ProviderType.onramper, ProviderType.robinhood];
|
||||||
case WalletType.none:
|
case WalletType.none:
|
||||||
|
case WalletType.lightning:
|
||||||
case WalletType.haven:
|
case WalletType.haven:
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,6 @@ class ProvidersHelper {
|
||||||
static List<ProviderType> getAvailableSellProviderTypes(WalletType walletType) {
|
static List<ProviderType> getAvailableSellProviderTypes(WalletType walletType) {
|
||||||
switch (walletType) {
|
switch (walletType) {
|
||||||
case WalletType.bitcoin:
|
case WalletType.bitcoin:
|
||||||
case WalletType.lightning:
|
|
||||||
case WalletType.ethereum:
|
case WalletType.ethereum:
|
||||||
return [
|
return [
|
||||||
ProviderType.askEachTime,
|
ProviderType.askEachTime,
|
||||||
|
@ -102,6 +101,7 @@ class ProvidersHelper {
|
||||||
case WalletType.monero:
|
case WalletType.monero:
|
||||||
case WalletType.nano:
|
case WalletType.nano:
|
||||||
case WalletType.banano:
|
case WalletType.banano:
|
||||||
|
case WalletType.lightning:
|
||||||
case WalletType.none:
|
case WalletType.none:
|
||||||
case WalletType.haven:
|
case WalletType.haven:
|
||||||
return [];
|
return [];
|
||||||
|
|
Loading…
Reference in a new issue