Skip to content

Commit

Permalink
feat: added post_url optional metadata for tx Frame
Browse files Browse the repository at this point in the history
  • Loading branch information
Zizzamia committed Mar 8, 2024
1 parent 924150a commit 1c4564f
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion framegear/utils/frameResultToFrameMetadata.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FrameImageMetadata, FrameMetadataType } from '@coinbase/onchainkit';
import { FrameImageMetadata, FrameMetadataType } from '@coinbase/onchainkit/frame';

export type FrameMetadataWithImageObject = FrameMetadataType & {
image: FrameImageMetadata;
Expand Down
2 changes: 1 addition & 1 deletion framegear/utils/postFrame.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FrameRequest, MockFrameRequestOptions } from '@coinbase/onchainkit';
import { FrameRequest, MockFrameRequestOptions } from '@coinbase/onchainkit/frame';
import { parseHtml } from './parseHtml';

type FrameData = FrameRequest['untrustedData'];
Expand Down
2 changes: 1 addition & 1 deletion framegear/utils/store.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { atom } from 'jotai';
import { fetchFrame } from './fetchFrame';
import { MockFrameRequestOptions } from '@coinbase/onchainkit';
import { MockFrameRequestOptions } from '@coinbase/onchainkit/frame';

// We store an array here so that we can step through history, e.g. seeing the
// chain of responses through a number of frame actions.
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
// ...
modulePathIgnorePatterns: ["<rootDir>/framegear/"],
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
Expand Down
1 change: 1 addition & 0 deletions src/frame/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// 🌲☀️🌲
// This file is the entry point for the core utilities
// that have no dependencies on external libraries.
export { FrameMetadata } from './components/FrameMetadata';
export { getFrameHtmlResponse } from './getFrameHtmlResponse';
export { getFrameMetadata } from './getFrameMetadata';
export { getFrameMessage } from './getFrameMessage';
Expand Down
8 changes: 7 additions & 1 deletion src/frame/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,20 @@ export function convertToFrame(json: any) {
*/
export type FrameButtonMetadata =
| {
action: 'link' | 'mint' | 'tx';
action: 'link' | 'mint';
label: string;
target: string;
}
| {
action?: 'post' | 'post_redirect';
label: string;
target?: string;
}
| {
action: 'tx';
label: string;
target: string;
postUrl?: string;
};

/**
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = '0.10.0';
export const version = '0.10.1';

0 comments on commit 1c4564f

Please sign in to comment.