Skip to content

Commit

Permalink
feat: expose onSignature related callbacks for eth_signTypedData_v4 r…
Browse files Browse the repository at this point in the history
…equest
  • Loading branch information
normanzb committed Jan 24, 2025
1 parent be836e2 commit 3aac19c
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/strange-oranges-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@frames.js/render": patch
---

feat: expose onSignature callbacks for eth_signTypedData request from server
3 changes: 3 additions & 0 deletions packages/render/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@ export type UseFrameOptions<
| "onTransactionError"
| "onTransactionStart"
| "onTransactionSuccess"
| "onSignatureError"
| "onSignatureStart"
| "onSignatureSuccess"
| "onTransactionProcessingError"
| "onTransactionProcessingStart"
| "onTransactionProcessingSuccess"
Expand Down
3 changes: 3 additions & 0 deletions packages/render/src/unstable-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ export type UseFrameOptions<
| "onTransactionError"
| "onTransactionStart"
| "onTransactionSuccess"
| "onSignatureError"
| "onSignatureStart"
| "onSignatureSuccess"
| "onTransactionProcessingError"
| "onTransactionProcessingStart"
| "onTransactionProcessingSuccess"
Expand Down
6 changes: 6 additions & 0 deletions packages/render/src/unstable-use-frame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ export function useFrame_unstable<
onTransactionError,
onTransactionStart,
onTransactionSuccess,
onSignatureError,
onSignatureStart,
onSignatureSuccess,
onTransactionProcessingError,
onTransactionProcessingStart,
onTransactionProcessingSuccess,
Expand Down Expand Up @@ -235,6 +238,9 @@ export function useFrame_unstable<
onTransactionError,
onTransactionStart,
onTransactionSuccess,
onSignatureError,
onSignatureStart,
onSignatureSuccess,
onTransactionProcessingError,
onTransactionProcessingStart,
onTransactionProcessingSuccess,
Expand Down
17 changes: 13 additions & 4 deletions packages/render/src/use-frame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,14 @@ export function useFrame<
onTransactionDataStart,
onTransactionDataSuccess,
onTransactionError,
onTransactionStart,
onTransactionSuccess,
onSignatureError,
onSignatureStart,
onSignatureSuccess,
onTransactionProcessingError,
onTransactionProcessingStart,
onTransactionProcessingSuccess,
onTransactionStart,
onTransactionSuccess,
}: UseFrameOptions<
TSignerStorageType,
TFrameActionBodyType,
Expand Down Expand Up @@ -231,11 +234,14 @@ export function useFrame<
onTransactionDataStart,
onTransactionDataSuccess,
onTransactionError,
onTransactionStart,
onTransactionSuccess,
onSignatureError,
onSignatureStart,
onSignatureSuccess,
onTransactionProcessingError,
onTransactionProcessingStart,
onTransactionProcessingSuccess,
onTransactionStart,
onTransactionSuccess,
});

const fetchFrameRef = useFreshRef(fetchFrame);
Expand Down Expand Up @@ -325,6 +331,7 @@ export function useFrame<
homeframeUrl,
signerState.hasSigner,
signerState.signer,
onErrorRef,
]
);

Expand Down Expand Up @@ -395,6 +402,7 @@ export function useFrame<
connectedAddress,
homeframeUrl,
signerState,
onErrorRef,
]
);

Expand Down Expand Up @@ -516,6 +524,7 @@ export function useFrame<
onPostButton,
onTransactionButton,
signerState,
onErrorRef,
]
);

Expand Down

0 comments on commit 3aac19c

Please sign in to comment.