Skip to content

Commit

Permalink
feat(embed): update message to sign (#3313)
Browse files Browse the repository at this point in the history
  • Loading branch information
larisa17 authored Feb 26, 2025
1 parent aff0423 commit 00a3c30
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions app/components/EmbedCampaign.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,16 +221,11 @@ export const EmbedCampaign = () => {
const [collapseType, setCollapseType] = React.useState<"Shift" | "Overlay" | "None">("Shift");
const { signMessageAsync } = useSignMessage();

const hexToUtf8 = (hexString: string): string => {
return Buffer.from(hexString.replace(/^0x/, ""), "hex").toString("utf8");
};

const generateSignature = async (message: string) => {
const strMsg = hexToUtf8(message);
try {
const signature = signMessageAsync({
account: address,
message: strMsg,
message: message,
});
return signature;
} catch (error) {
Expand Down

0 comments on commit 00a3c30

Please sign in to comment.