feat: explorer API, wallet, CCIP scripts, and config refresh
- Backend REST/gateway/track routes, analytics, Blockscout proxy paths. - Frontend wallet and liquidity surfaces; MetaMask token list alignment. - Deployment docs, verification scripts, address inventory updates. Check: go build ./... under backend/ (pass). Made-with: Cursor
This commit is contained in:
19
backend/api/rest/addresses_internal_test.go
Normal file
19
backend/api/rest/addresses_internal_test.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package rest
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestHandleGetAddressRequiresDB(t *testing.T) {
|
||||
server := NewServer(nil, 138)
|
||||
req := httptest.NewRequest(http.MethodGet, "/api/v1/addresses/138/0xAbCdEf1234567890ABCdef1234567890abCDef12?address=0xAbCdEf1234567890ABCdef1234567890abCDef12", nil)
|
||||
w := httptest.NewRecorder()
|
||||
|
||||
server.handleGetAddress(w, req)
|
||||
|
||||
if w.Code != http.StatusServiceUnavailable {
|
||||
t.Fatalf("expected 503 when db is unavailable, got %d", w.Code)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user