Skip to content
This repository was archived by the owner on Jul 7, 2025. It is now read-only.

Commit 8283ff7

Browse files
authored
Merge pull request #229 from xmtp/dj/post-url
Pass postUrl through in frameInfo
2 parents 9b7ab21 + 3ffc491 commit 8283ff7

File tree

4 files changed

+46
-11
lines changed

4 files changed

+46
-11
lines changed

.changeset/ninety-ways-fix.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@xmtp/frames-client": patch
3+
---
4+
5+
bumped packages to pass postUrl through in frameInfo

packages/frames-client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
},
6767
"dependencies": {
6868
"@noble/hashes": "^1.3.3",
69-
"@open-frames/proxy-client": "^0.3.0",
69+
"@open-frames/proxy-client": "^0.3.2",
7070
"@xmtp/proto": "3.51.1",
7171
"long": "^5.2.3"
7272
},

packages/frames-client/src/index.test.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,34 @@ describe("signFrameAction", () => {
125125
// Add a long timeout because Vercel cold starts can be slow
126126
{ timeout: 20000 },
127127
);
128+
it(
129+
"sends back the button postUrl for a tx frame in frame info",
130+
async () => {
131+
const frameUrl =
132+
"https://tx-boilerplate-frame-git-main-xmtp-labs.vercel.app/";
133+
const metadata = await framesClient.proxy.readMetadata(frameUrl);
134+
expect(metadata).toBeDefined();
135+
expect(metadata.frameInfo).toMatchObject({
136+
acceptedClients: {
137+
xmtp: "2024-02-09",
138+
farcaster: "vNext",
139+
},
140+
buttons: {
141+
"1": {
142+
label: "Make transaction",
143+
action: "tx",
144+
target:
145+
"https://tx-boilerplate-frame-git-main-xmtp-labs.vercel.app/api/transaction",
146+
postUrl:
147+
"https://tx-boilerplate-frame-git-main-xmtp-labs.vercel.app/api/transaction-success",
148+
},
149+
},
150+
image: {
151+
content:
152+
"https://tx-boilerplate-frame-git-main-xmtp-labs.vercel.app/api/og?transaction=null",
153+
},
154+
});
155+
},
156+
{ timeout: 20000 },
157+
);
128158
});

yarn.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2925,21 +2925,21 @@ __metadata:
29252925
languageName: node
29262926
linkType: hard
29272927

2928-
"@open-frames/proxy-client@npm:^0.3.0":
2929-
version: 0.3.0
2930-
resolution: "@open-frames/proxy-client@npm:0.3.0"
2928+
"@open-frames/proxy-client@npm:^0.3.2":
2929+
version: 0.3.2
2930+
resolution: "@open-frames/proxy-client@npm:0.3.2"
29312931
dependencies:
2932-
"@open-frames/proxy-types": "npm:0.2.0"
2933-
checksum: 10/cca2f209be860e9328cf7768d3da3672eb5f079c9b27e31536e25cd1a59baeba7a074305a68236a222d7e6c72d7877b3dfcc49c750eb98072438f324b83b75dd
2932+
"@open-frames/proxy-types": "npm:0.2.2"
2933+
checksum: 10/43a4ee1322625665c93f548fcaf957f52a37e31a9d5f77e1979b3ab127bdd2e3156f632b9d3075f6dabbe9467ac4d5640cd5d82bc4905ee3b2d2771e87d9f9c4
29342934
languageName: node
29352935
linkType: hard
29362936

2937-
"@open-frames/proxy-types@npm:0.2.0":
2938-
version: 0.2.0
2939-
resolution: "@open-frames/proxy-types@npm:0.2.0"
2937+
"@open-frames/proxy-types@npm:0.2.2":
2938+
version: 0.2.2
2939+
resolution: "@open-frames/proxy-types@npm:0.2.2"
29402940
peerDependencies:
29412941
typescript: ^5.3.3
2942-
checksum: 10/7bb09f290624abf75097055dad57657ba244a60f72dec3f839aaa08aeb9b7e98f49a1423f48f98620202ee2c1aa8075e5cfbd0888876f3f277cae98d0e976909
2942+
checksum: 10/fc1ba0ccc4e5b5cfc8e9507d25f1e7a0be974068a1fe59d135b0aa17bc1d2f83eeb332a26942d8d3a67f6d6c29ebf4356693738e5f7a975c84cea2f84e5d0687
29432943
languageName: node
29442944
linkType: hard
29452945

@@ -5408,7 +5408,7 @@ __metadata:
54085408
resolution: "@xmtp/frames-client@workspace:packages/frames-client"
54095409
dependencies:
54105410
"@noble/hashes": "npm:^1.3.3"
5411-
"@open-frames/proxy-client": "npm:^0.3.0"
5411+
"@open-frames/proxy-client": "npm:^0.3.2"
54125412
"@open-frames/types": "npm:^0.1.0"
54135413
"@rollup/plugin-terser": "npm:^0.4.4"
54145414
"@rollup/plugin-typescript": "npm:^11.1.6"

0 commit comments

Comments
 (0)