Skip to content

Commit 212a0a7

Browse files
fix: correct freighter public key retrieval
1 parent c0406e1 commit 212a0a7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

frontend/src/lib/wallet/freighter.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ export async function connectFreighter(): Promise<FreighterConnection | null> {
2020
throw new Error("Freighter wallet is not installed or not allowed");
2121
}
2222

23-
const response = await FreighterApi.requestPublicKey();
24-
if (!response.publicKey) {
23+
const publicKey = await FreighterApi.getPublicKey();
24+
if (!publicKey) {
2525
throw new Error("Failed to retrieve public key from Freighter");
2626
}
2727

28-
return { publicKey: response.publicKey };
28+
return { publicKey };
2929
} catch (error) {
3030
console.error("Freighter connection error:", error);
3131
return null;

0 commit comments

Comments
 (0)