Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
daria-github committed May 3, 2024
1 parent 91dd6df commit dfdb668
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ const FRAME_URL = 'https://frames.xmtp.chat/';

const initialFrame = await readMetadata(FRAME_URL);

// Extract from above
const action = initialFrame.buttons['1'].action;
const target = initialFrame.buttons['1'].target;
const postUrl = initialFrame.buttons['1'].post_url;
// Extract current button from above at button index
const button = frameMetadata.frameInfo.buttons[`${buttonIndex}`];

const { action, target, postUrl } = button;

// If this is a transaction frame, do the below steps
const isTransaction = action === 'tx' && target && postUrl;
const isTransactionFrame = action === 'tx';

// First, make a POST request to the `target` URL to fetch data about the transaction, with a signed frame action payload in the POST body including the address of the connected wallet in the `address` field.
const transactionInfo: {
Expand Down

0 comments on commit dfdb668

Please sign in to comment.