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>
26 lines
635 B
Go
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)
|
|
}
|
|
}
|