From be615b8bc0431adaf1b79e30d29b76709cfb8834 Mon Sep 17 00:00:00 2001 From: guy muroch Date: Sun, 9 Jul 2023 16:35:05 +0300 Subject: [PATCH] adding support for v2 --- examples/server-worker/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/server-worker/index.ts b/examples/server-worker/index.ts index be4ea14..d731311 100644 --- a/examples/server-worker/index.ts +++ b/examples/server-worker/index.ts @@ -50,10 +50,10 @@ app.post('/key-shares/generate', async (req: Request, res: Response) => { .json({ message: 'Keystore is required' }); } - // The nonce of the owner within the SSV contract (increments after each validator registration), obtained using the ssv-scanner tool - const nonce = Number(req.body['nonce'] || '') +// The nonce of the owner within the SSV contract (increments after each validator registration), obtained using the ssv-scanner tool + const nonce = Number(req.body['nonce']); - if (!nonce) { + if (isNaN(nonce)) { return res .status(constants.HTTP_STATUS_BAD_REQUEST) .json({ message: 'Nonce is required' });