1 parent c0406e1 commit 212a0a7Copy full SHA for 212a0a7
1 file changed
frontend/src/lib/wallet/freighter.ts
@@ -20,12 +20,12 @@ export async function connectFreighter(): Promise<FreighterConnection | null> {
20
throw new Error("Freighter wallet is not installed or not allowed");
21
}
22
23
- const response = await FreighterApi.requestPublicKey();
24
- if (!response.publicKey) {
+ const publicKey = await FreighterApi.getPublicKey();
+ if (!publicKey) {
25
throw new Error("Failed to retrieve public key from Freighter");
26
27
28
- return { publicKey: response.publicKey };
+ return { publicKey };
29
} catch (error) {
30
console.error("Freighter connection error:", error);
31
return null;
0 commit comments