Fix E2E error: change regex address minimum length

This commit is contained in:
natsee 2024-01-01 14:49:02 +01:00
parent 3e1b85e32c
commit dd31d5a665
No known key found for this signature in database
GPG Key ID: 233CF3150A89BED8

View File

@ -41,11 +41,11 @@ const ADDRESS_CHARS: {
bech32: `(?:` bech32: `(?:`
+ `bc1` // Starts with bc1 + `bc1` // Starts with bc1
+ BECH32_CHARS_LW + BECH32_CHARS_LW
+ `{6,100}` // As per bech32, 6 char checksum is minimum + `{20,100}` // As per bech32, 6 char checksum is minimum
+ `|` + `|`
+ `BC1` // All upper case version + `BC1` // All upper case version
+ BECH32_CHARS_UP + BECH32_CHARS_UP
+ `{6,100}` + `{20,100}`
+ `)`, + `)`,
}, },
testnet: { testnet: {
@ -55,11 +55,11 @@ const ADDRESS_CHARS: {
bech32: `(?:` bech32: `(?:`
+ `tb1` // Starts with tb1 + `tb1` // Starts with tb1
+ BECH32_CHARS_LW + BECH32_CHARS_LW
+ `{6,100}` // As per bech32, 6 char checksum is minimum + `{20,100}` // As per bech32, 6 char checksum is minimum
+ `|` + `|`
+ `TB1` // All upper case version + `TB1` // All upper case version
+ BECH32_CHARS_UP + BECH32_CHARS_UP
+ `{6,100}` + `{20,100}`
+ `)`, + `)`,
}, },
signet: { signet: {
@ -69,11 +69,11 @@ const ADDRESS_CHARS: {
bech32: `(?:` bech32: `(?:`
+ `tb1` // Starts with tb1 + `tb1` // Starts with tb1
+ BECH32_CHARS_LW + BECH32_CHARS_LW
+ `{6,100}` + `{20,100}`
+ `|` + `|`
+ `TB1` // All upper case version + `TB1` // All upper case version
+ BECH32_CHARS_UP + BECH32_CHARS_UP
+ `{6,100}` + `{20,100}`
+ `)`, + `)`,
}, },
liquid: { liquid: {
@ -87,7 +87,7 @@ const ADDRESS_CHARS: {
+ `lq1` + `lq1`
+ `)` + `)`
+ BECH32_CHARS_LW // blech32 and bech32 are the same alphabet and protocol, different checksums. + BECH32_CHARS_LW // blech32 and bech32 are the same alphabet and protocol, different checksums.
+ `{6,100}` + `{20,100}`
+ `|` + `|`
+ `(?:` // Same as above but all upper case + `(?:` // Same as above but all upper case
+ `EX1` + `EX1`
@ -95,7 +95,7 @@ const ADDRESS_CHARS: {
+ `LQ1` + `LQ1`
+ `)` + `)`
+ BECH32_CHARS_UP + BECH32_CHARS_UP
+ `{6,100}` + `{20,100}`
+ `)`, + `)`,
}, },
liquidtestnet: { liquidtestnet: {
@ -109,7 +109,7 @@ const ADDRESS_CHARS: {
+ `tlq1` // TODO: does this exist? + `tlq1` // TODO: does this exist?
+ `)` + `)`
+ BECH32_CHARS_LW // blech32 and bech32 are the same alphabet and protocol, different checksums. + BECH32_CHARS_LW // blech32 and bech32 are the same alphabet and protocol, different checksums.
+ `{6,100}` + `{20,100}`
+ `|` + `|`
+ `(?:` // Same as above but all upper case + `(?:` // Same as above but all upper case
+ `TEX1` + `TEX1`
@ -117,7 +117,7 @@ const ADDRESS_CHARS: {
+ `TLQ1` + `TLQ1`
+ `)` + `)`
+ BECH32_CHARS_UP + BECH32_CHARS_UP
+ `{6,100}` + `{20,100}`
+ `)`, + `)`,
}, },
bisq: { bisq: {
@ -127,11 +127,11 @@ const ADDRESS_CHARS: {
bech32: `(?:` bech32: `(?:`
+ `[bB]bc1` // b or B at the start, followed by bc1 + `[bB]bc1` // b or B at the start, followed by bc1
+ BECH32_CHARS_LW + BECH32_CHARS_LW
+ `{6,100}` + `{20,100}`
+ `|` + `|`
+ `[bB]BC1` // b or B at the start, followed by BC1 + `[bB]BC1` // b or B at the start, followed by BC1
+ BECH32_CHARS_UP + BECH32_CHARS_UP
+ `{6,100}` + `{20,100}`
+ `)`, + `)`,
}, },
} }