Skip to content

Commit 49d315c

Browse files
update code snippet
1 parent f2d6360 commit 49d315c

File tree

1 file changed

+14
-3
lines changed
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/engine/cloud/server-wallets/components

1 file changed

+14
-3
lines changed

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/engine/cloud/server-wallets/components/try-it-out.tsx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,22 @@ const transaction = claimTo({
212212
quantity: 1n, // The quantity of NFTs to mint
213213
});
214214
215-
// Send the transaction via Engine
216-
const result = await sendTransaction({
217-
account: serverWallet,
215+
// Enqueue the transaction via Engine
216+
const { transactionId } = await serverWallet.enqueueTransaction({
218217
transaction,
219218
});
219+
220+
// Get the execution status of the transaction at any point in time
221+
const executionResult = await Engine.getTransactionStatus({
222+
client,
223+
transactionId,
224+
});
225+
226+
// Utility function to poll for the transaction to be submitted onchain
227+
const txHash = await Engine.waitForTransactionHash({
228+
client,
229+
transactionId,
230+
});
220231
console.log("Transaction hash:", result.transactionHash);
221232
`;
222233

0 commit comments

Comments
 (0)