mirror of
https://github.com/neynarxyz/create-farcaster-mini-app.git
synced 2025-11-18 09:09:01 -05:00
refactor: text encoder over buffer
Addresses comment from copilot
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user