Skip to content

Commit 2d27c4f

Browse files
committed
[NEB-215] Update transaction confirmation prompt (#6861)
<!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## PR-Codex overview This PR updates the transaction message in the `Chats` component to use a new function for generating the prompt, enhancing clarity and consistency in user communication. ### Detailed summary - Replaced the inline message in `onTxSettled` with a call to `getTransactionSettledPrompt`. - Added the `getTransactionSettledPrompt` function, which formats a detailed success message for a settled transaction. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 72628ef commit 2d27c4f

File tree

1 file changed

+8
-1
lines changed
  • apps/dashboard/src/app/nebula-app/(app)/components

1 file changed

+8
-1
lines changed

apps/dashboard/src/app/nebula-app/(app)/components/Chats.tsx

+8-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export function Chats(props: {
172172
client={props.client}
173173
onTxSettled={(txHash) => {
174174
props.sendMessage(
175-
`I've sent the transaction with hash: ${txHash}.`,
175+
getTransactionSettledPrompt(txHash),
176176
);
177177
}}
178178
/>
@@ -209,6 +209,13 @@ export function Chats(props: {
209209
);
210210
}
211211

212+
function getTransactionSettledPrompt(txHash: string) {
213+
return `\
214+
I've executed the following transaction successfully with hash: ${txHash}.
215+
216+
If our conversation calls for it, continue on to the next transaction or suggest next steps`;
217+
}
218+
212219
function ExecuteTransactionCardWithFallback(props: {
213220
txData: NebulaTxData | null;
214221
client: ThirdwebClient;

0 commit comments

Comments
 (0)