Skip to content

Commit

Permalink
feat: add env parameter to getXmtpFrameMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
rygine committed Dec 3, 2024
1 parent 0468bb8 commit d93117a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/xmtp/getXmtpFrameMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ type XmtpFrameMessage =
};
};

type XmtpEnv = Parameters<typeof validateFramesPost>[1];

export async function getXmtpFrameMessage(
payload: XmtpOpenFramesRequest
payload: XmtpOpenFramesRequest,
env?: XmtpEnv
): Promise<XmtpFrameMessage> {
if (!payload.clientProtocol || !payload.clientProtocol.startsWith('xmtp@')) {
return {
Expand All @@ -30,7 +33,8 @@ export async function getXmtpFrameMessage(
}
try {
const { actionBody, verifiedWalletAddress } = await validateFramesPost(
payload
payload,
env
);
return {
isValid: true,
Expand Down

0 comments on commit d93117a

Please sign in to comment.