We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32f32fe commit ed3740eCopy full SHA for ed3740e
app/routes.py
@@ -195,7 +195,10 @@ def detect_query_type(query):
195
query = query.strip().lower()
196
197
# Bitcoin address pattern (starts with 1, 3, or bc1)
198
- if re.match(r'^(1|3|bc1)[a-zA-Z0-9]{25,39}$', query):
+ # Legacy: 26–35 chars, Bech32: up to 62 chars
199
+ if re.match(r'^(1|3)[a-zA-Z0-9]{25,39}$', query):
200
+ return 'address'
201
+ if re.match(r'^(bc1)[a-z0-9]{11,59}$', query): # bc1 + 11–59 → From 14 to 62
202
return 'address'
203
204
# Transaction hash pattern (64 hex characters)
0 commit comments