Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added post_url optional metadata for tx Frame #235

Merged
merged 4 commits into from
Mar 8, 2024

Conversation

Zizzamia
Copy link
Contributor

@Zizzamia Zizzamia commented Mar 8, 2024

What changed? Why?

Notes to reviewers

How has it been tested?

@@ -96,6 +99,9 @@ export function FrameMetadata({
{!!(button2 && button2.target) && (
<meta property="fc:frame:button:2:target" content={button2.target} />
)}
{!!(button2 && button2.action === 'tx' && button2.postUrl) && (
<meta property="fc:frame:button:1:post_url" content={button2.postUrl} />
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<meta property="fc:frame:button:1:post_url" content={button2.postUrl} />
<meta property="fc:frame:button:2:post_url" content={button2.postUrl} />

@@ -104,6 +110,9 @@ export function FrameMetadata({
{!!(button3 && button3.target) && (
<meta property="fc:frame:button:3:target" content={button3.target} />
)}
{!!(button3 && button3.action === 'tx' && button3.postUrl) && (
<meta property="fc:frame:button:1:post_url" content={button3.postUrl} />
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<meta property="fc:frame:button:1:post_url" content={button3.postUrl} />
<meta property="fc:frame:button:3:post_url" content={button3.postUrl} />

@@ -112,6 +121,9 @@ export function FrameMetadata({
{!!(button4 && button4.target) && (
<meta property="fc:frame:button:4:target" content={button4.target} />
)}
{!!(button4 && button4.action === 'tx' && button4.postUrl) && (
<meta property="fc:frame:button:1:post_url" content={button4.postUrl} />
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<meta property="fc:frame:button:1:post_url" content={button4.postUrl} />
<meta property="fc:frame:button:4:post_url" content={button4.postUrl} />

@spennyp
Copy link

spennyp commented Mar 8, 2024

Looks like it was not added to getFrameHtmlResponse.ts

Think you should add this in the button parsing:

        if (button.action && button.action === 'tx' && button.postUrl) {
          buttonHtml += `  <meta property="fc:frame:button:${index + 1}:post_url" content="${button.postUrl}" />\n`;
        }

@Zizzamia
Copy link
Contributor Author

Zizzamia commented Mar 8, 2024

Looks like it was not added to getFrameHtmlResponse.ts

Ok sweet, let me merge this first.

@Zizzamia Zizzamia merged commit 8028007 into main Mar 8, 2024
9 checks passed
@Zizzamia Zizzamia deleted the zizzamia/dope-3-7 branch March 8, 2024 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants