Files
explorer-monorepo/backend/wallet/walletconnect_sessions_test.go
defiQUG ab9c1f9f98
Some checks failed
Deploy Explorer Live / deploy (push) Failing after 15s
Validate Explorer / frontend (push) Failing after 20s
Validate Explorer / smoke-e2e (push) Has been skipped
Ship bridge lanes, public API access doc, and WalletConnect client stack.
Align CCIP catalog UX with 11-lane config-ready routes, document the no-key public API decision, and enable browser WalletConnect pairing with backend session registration and deploy-time project ID wiring.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-23 02:21:37 -07:00

26 lines
635 B
Go

package wallet
import (
"context"
"testing"
)
func TestRegisterAndLookupWalletConnectSession(t *testing.T) {
sessionID := "wc-test-topic-123"
address := "0x4A666F96fC8764181194447A7dFdb7d471b301C8"
registered := RegisterClientSession(sessionID, address, 138)
if registered == nil || !registered.Connected {
t.Fatalf("expected connected session, got %#v", registered)
}
wc := NewWalletConnect(138)
session, err := wc.GetSession(context.Background(), sessionID)
if err != nil {
t.Fatalf("GetSession: %v", err)
}
if session.Address != address {
t.Fatalf("expected address %s, got %s", address, session.Address)
}
}