Skip to content

Commit

Permalink
Merge pull request #241 from xmtp/dj/tx-id
Browse files Browse the repository at this point in the history
Transaction Id Fix
  • Loading branch information
daria-github authored May 29, 2024
2 parents d2eaacd + 815ef8f commit 70850b0
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/dull-toys-fold.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@xmtp/frames-client": patch
---

fix for transaction id
2 changes: 1 addition & 1 deletion packages/frames-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"long": "^5.2.3"
},
"devDependencies": {
"@open-frames/types": "^0.1.0",
"@open-frames/types": "^0.1.1",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.6",
"@xmtp/tsconfig": "workspace:*",
Expand Down
1 change: 1 addition & 0 deletions packages/frames-client/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export class FramesClient {
state,
// The address associated with initiating a transaction
address,
transactionId,
},
trustedData: {
messageBytes: base64Encode(signedAction),
Expand Down
3 changes: 3 additions & 0 deletions packages/frames-client/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ describe("signFrameAction", () => {
participantAccountAddresses: ["amal", "bola"],
state: "state",
address: "0x...",
transactionId: "123",
});

// Below addresses are typically the same but can technically be different
Expand All @@ -33,6 +34,8 @@ describe("signFrameAction", () => {

// address references the address associated with initiating a transaction
expect(signedPayload.untrustedData.address).toEqual("0x...");
expect(signedPayload.untrustedData.transactionId).toEqual("123");

expect(signedPayload.untrustedData.url).toEqual(frameUrl);
expect(signedPayload.untrustedData.buttonIndex).toEqual(buttonIndex);
expect(
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2943,10 +2943,10 @@ __metadata:
languageName: node
linkType: hard

"@open-frames/types@npm:^0.1.0":
version: 0.1.0
resolution: "@open-frames/types@npm:0.1.0"
checksum: 10/64a947c0834c9c73e29c7d6ec151a9c3e005baeec034e47ecbca450ec218c598ed7be32ff85087cd7f8403e202e37c9e83d9b4f6a0d4b7e2a562b2cfb30608c3
"@open-frames/types@npm:^0.1.1":
version: 0.1.1
resolution: "@open-frames/types@npm:0.1.1"
checksum: 10/2e23b984123f760e4fd4f205fb50e89725679563f8830a86d9d0c436315b6df02d336a4ab06c583b31c568103bc2a82dbe23d36356909a80fc9a1c0026cc04ee
languageName: node
linkType: hard

Expand Down Expand Up @@ -5433,7 +5433,7 @@ __metadata:
dependencies:
"@noble/hashes": "npm:^1.3.3"
"@open-frames/proxy-client": "npm:^0.3.2"
"@open-frames/types": "npm:^0.1.0"
"@open-frames/types": "npm:^0.1.1"
"@rollup/plugin-terser": "npm:^0.4.4"
"@rollup/plugin-typescript": "npm:^11.1.6"
"@xmtp/proto": "npm:3.61.1"
Expand Down

0 comments on commit 70850b0

Please sign in to comment.