「🏗️」 wip(scoreStore): simingly working api

This commit is contained in:
KeyZox committed 2025-10-07 20:29:49 +02:00
1 parent 7333dc2602
commit dfb2541267
2 files changed
+6 -6

No files matched your search

+2 -1
View File
@@ -54,8 +54,9 @@ async function callAddScore(p1, p2, p1Score, p2Score) {
const tx = await contract.addScore(p1, p2, p1Score, p2Score);
console.log('Transaction sent:', tx.hash);
await tx.wait(); // Wait for the transaction to be mined
const id = await callLastId();
console.log('Transaction confirmed');
return tx;
return { tx, id };
} catch (error) {
console.error('Error calling addScore function:', error);
throw error;