mirror of
https://github.com/neynarxyz/create-farcaster-mini-app.git
synced 2025-11-16 16:18:55 -05:00
refactor: text encoder over buffer
Addresses comment from copilot
This commit is contained in:
parent
65496acc55
commit
0aaec3495a
@ -457,9 +457,9 @@ function SignSolanaMessage({ signMessage }: { signMessage?: (message: Uint8Array
|
||||
if (!signMessage) {
|
||||
throw new Error('no Solana signMessage');
|
||||
}
|
||||
const input = Buffer.from("Hello from Solana!", "utf8");
|
||||
const input = new TextEncoder().encode("Hello from Solana!");
|
||||
const signatureBytes = await signMessage(input);
|
||||
const signature = Buffer.from(signatureBytes).toString("base64");
|
||||
const signature = btoa(String.fromCharCode(...signatureBytes));
|
||||
setSignature(signature);
|
||||
setSignError(undefined);
|
||||
} catch (e) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user