Skip to content

Commit

Permalink
prevent signing twice for placing guess
Browse files Browse the repository at this point in the history
  • Loading branch information
brenzi committed Oct 23, 2024
1 parent 6ce4dad commit d9af1a1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1266,6 +1266,10 @@ const submitGuess = () => {
console.log("submit guess: ", guess.value);
txStatus.value = "⌛ privately submitting your guess to incognitee";
const account = accountStore.account;
const nonce = new u32(
new TypeRegistry(),
accountStore.nonce[incogniteeSidechain.value],
);
console.log(
`sending guess ${guess.value} from ${account.address} privately to incognitee`,
);
Expand All @@ -1278,7 +1282,7 @@ const submitGuess = () => {
guess.value,
{
signer: accountStore.injector?.signer,
nonce: accountStore.incogniteeNonce,
nonce: nonce,
},
)
.then((hash) => {
Expand Down

0 comments on commit d9af1a1

Please sign in to comment.