Skip to content

Commit

Permalink
Fix faucet webpage rejecting valid account IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mirko-von-Leipzig committed Jan 29, 2025
1 parent 9a75776 commit cf3a859
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@

## Unreleased

### Fixes

- Faucet webpage rejects valid account IDs (#655).

## v0.7.1 (2025-01-28)

### Fixes

- Faucet webpage fails to load styling (index.css) and script (index.js) (#647).

### Changes

- [BREAKING] Default faucet endpoint is now public instead of localhost (#647).
Expand Down
2 changes: 1 addition & 1 deletion bin/faucet/src/static/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ document.addEventListener('DOMContentLoaded', function () {
let accountId = accountIdInput.value.trim();
errorMessage.style.display = 'none';

if (!accountId || !/^0x[0-9a-fA-F]{16}$/i.test(accountId)) {
if (!accountId || !/^0x[0-9a-fA-F]{30}$/i.test(accountId)) {
errorMessage.textContent = !accountId ? "Account ID is required." : "Invalid Account ID.";
errorMessage.style.display = 'block';
return;
Expand Down

0 comments on commit cf3a859

Please sign in to comment.