From fdf576fe8c90cae4798257a0dd55c675868c2637 Mon Sep 17 00:00:00 2001 From: wslyvh Date: Wed, 10 Jul 2024 13:24:22 +0200 Subject: [PATCH 1/6] logging --- .../frontend/src/pages/api/voucher/index.ts | 13 +++++++++++++ .../frontend/src/utils/getVoucherCodes.ts | 19 ++++++++++++++++--- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/packages/frontend/src/pages/api/voucher/index.ts b/packages/frontend/src/pages/api/voucher/index.ts index 38a3dc9d..5c177601 100644 --- a/packages/frontend/src/pages/api/voucher/index.ts +++ b/packages/frontend/src/pages/api/voucher/index.ts @@ -42,10 +42,12 @@ async function getVoucherWithJwt(req: NextApiRequest, res: NextApiResponse) { return } + console.log('Verify voucher JWT') const { payload } = await jose.jwtVerify(voucherCodeJwt, environment.authSecret, { requiredClaims: ['chainId', 'address'], }) + console.log('Get Winner index..', payload.chainId, payload.address) const winnerIndex = await getWinnerIndex(payload.chainId as number, payload.address as `0x${string}`) if (winnerIndex === -1) { @@ -64,6 +66,8 @@ async function getVoucherWithJwt(req: NextApiRequest, res: NextApiResponse) { } satisfies GetVoucherResponse) return } + + console.log('Get Voucher for winner index', winnerIndex) const voucherCode = voucherCodes[winnerIndex] if (!voucherCode) { res.status(500).json({ @@ -87,8 +91,11 @@ async function getVoucherWithSig(req: NextApiRequest, res: NextApiResponse) { } const { chainId, userAddress, signature, nonce } = reqParseResult.data + console.log('Get voucher with signature', chainId, userAddress, signature, nonce) + // Check & spend nonce if (!nonceStore.delete(nonce)) { + console.error(`Unknown nonce: ${nonce}`) res.status(403).json({ error: `Unknown nonce: ${nonce}`, } satisfies GetVoucherResponse) @@ -101,6 +108,7 @@ async function getVoucherWithSig(req: NextApiRequest, res: NextApiResponse) { message: buildVoucherClaimMessage(chainId, userAddress, nonce), }) if (!isValid) { + console.error('Invalid signature') res.status(403).json({ error: 'Invalid signature', } satisfies GetVoucherResponse) @@ -115,8 +123,10 @@ async function getVoucherWithSig(req: NextApiRequest, res: NextApiResponse) { return } + console.log('Get Winner index..', chainId, userAddress) const winnerIndex = await getWinnerIndex(chainId, userAddress) if (winnerIndex === -1) { + console.error(`${chainId}:${userAddress} is not qualified for a voucher code.`) res.status(403).json({ error: `${chainId}:${userAddress} is not qualified for a voucher code.`, } satisfies GetVoucherResponse) @@ -128,6 +138,7 @@ async function getVoucherWithSig(req: NextApiRequest, res: NextApiResponse) { voucherCodes = await getVoucherCodes() } catch (err) { log.error(err) + console.error(`Voucher not available for winner index ${winnerIndex}`) res.status(500).json({ error: `Voucher not available for winner index ${winnerIndex}`, } satisfies GetVoucherResponse) @@ -135,6 +146,7 @@ async function getVoucherWithSig(req: NextApiRequest, res: NextApiResponse) { } const voucherCode = voucherCodes[winnerIndex] if (!voucherCode) { + console.error(`Voucher not available for winner index ${winnerIndex}`) res.status(500).json({ error: `Voucher not available for winner index ${winnerIndex}`, } satisfies GetVoucherResponse) @@ -143,6 +155,7 @@ async function getVoucherWithSig(req: NextApiRequest, res: NextApiResponse) { // All good // Send back JWT for future requests + console.log('All good. Send back JWT') const jwt = await new jose.SignJWT({ chainId, address: userAddress }) .setProtectedHeader({ alg: 'HS256' }) .setIssuedAt() diff --git a/packages/frontend/src/utils/getVoucherCodes.ts b/packages/frontend/src/utils/getVoucherCodes.ts index a4ce82fa..ea9f127c 100644 --- a/packages/frontend/src/utils/getVoucherCodes.ts +++ b/packages/frontend/src/utils/getVoucherCodes.ts @@ -3,7 +3,8 @@ import { environment } from '@/config/environment' import { readFile } from 'node:fs/promises' export async function getVoucherCodes() { - const encryptedVoucherCodes = await readFile(process.cwd() + `/src/voucherCodes.${process.env.NODE_ENV}`, { + console.log('Get voucher codes for', process.env.NODE_ENV) + const encryptedVoucherCodes = await readFile(process.cwd() + `/src/voucherCodes.production`, { encoding: 'utf-8', }) return decryptVoucherCodes(encryptedVoucherCodes, environment.authSecret) @@ -18,6 +19,18 @@ export async function getVoucherCodes() { * @returns Array of voucher codes */ export async function decryptVoucherCodes(encryptedVoucherCodes: string, secretKey: Uint8Array) { - const { plaintext } = await jose.compactDecrypt(encryptedVoucherCodes, secretKey.slice(0, 32)) - return new TextDecoder().decode(plaintext).split(',') + console.log('Decrypting file..') + console.log(encryptedVoucherCodes) + + try { + const { plaintext } = await jose.compactDecrypt(encryptedVoucherCodes, secretKey.slice(0, 32)) + console.log('File decrypted..') + + const vouchers = new TextDecoder().decode(plaintext).split(',') + console.log('# of vouchers:', vouchers.length) + return vouchers + } catch (e) { + console.error('Error decrypting voucher codes', e) + return [] + } } From b3b827a721db4926b7d337da01308b7625f1aab0 Mon Sep 17 00:00:00 2001 From: wslyvh Date: Wed, 10 Jul 2024 13:32:31 +0200 Subject: [PATCH 2/6] error message --- packages/frontend/.eslintrc.js | 2 +- packages/frontend/src/components/info/VoucherTimeLeft.tsx | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/frontend/.eslintrc.js b/packages/frontend/.eslintrc.js index 4b546e35..42ac52de 100644 --- a/packages/frontend/.eslintrc.js +++ b/packages/frontend/.eslintrc.js @@ -6,7 +6,7 @@ module.exports = { 'plugin:@typescript-eslint/recommended', ], rules: { - 'no-console': 'error', + 'no-console': 'off', // error -> off '@typescript-eslint/no-unused-vars': [ 'error', { diff --git a/packages/frontend/src/components/info/VoucherTimeLeft.tsx b/packages/frontend/src/components/info/VoucherTimeLeft.tsx index 353a6f3f..4e2ae513 100644 --- a/packages/frontend/src/components/info/VoucherTimeLeft.tsx +++ b/packages/frontend/src/components/info/VoucherTimeLeft.tsx @@ -6,6 +6,7 @@ import { formatDate } from '@/utils/formatters/formatDate' import { useVoucherRedeemDeadline } from '@/blockchain/hooks/useVoucherRedeemDeadline' import { useReadAuctionParams } from '@/blockchain/hooks/useReadAuctionParams' import { MediaQueries } from '@/styles/mediaQueries' +import Link from 'next/link' export const VoucherTimeLeft = () => { const { claimingEndTime } = useReadAuctionParams() @@ -23,6 +24,7 @@ export const VoucherTimeLeft = () => { {isRedeemingExpired ? 'Voucher redemption expired on ' : 'Voucher redemption ends: '} {formatDate(redeemTimestamp)} +
We are currently experiencing issues and you are unable to claim your raffle ticket! We apologize for the inconvenience and are working on a fix. Follow our Twitter for updates.
) } From 664cd4669f0061c2239d92436b3d74c5f9298f00 Mon Sep 17 00:00:00 2001 From: wslyvh Date: Wed, 10 Jul 2024 13:44:03 +0200 Subject: [PATCH 3/6] add voucher codes --- packages/frontend/src/utils/getVoucherCodes.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/frontend/src/utils/getVoucherCodes.ts b/packages/frontend/src/utils/getVoucherCodes.ts index ea9f127c..315a5435 100644 --- a/packages/frontend/src/utils/getVoucherCodes.ts +++ b/packages/frontend/src/utils/getVoucherCodes.ts @@ -2,12 +2,16 @@ import * as jose from 'jose' import { environment } from '@/config/environment' import { readFile } from 'node:fs/promises' +const encryptedVoucherCodes = 'eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0..vc4YkbIz7dKpzRjp.o9NWVDtMl4z734BqRE0UCFSBbAXNGQvu_-MbJ4LQL8VISKFlnqA7173gItkeHEnsU45nGQSYOLXnoZaWqNg4KNbJHK8eVpR1jN8-fDQ4ejdA_ipRWfCP2ginBJDwHRjpsaDbp6bigZRe4SCq3K_b8IUYSDtEK6SjaqWUEYIiu3OEMUVVNs0HLAz0K-FusQT9_ntJyBNuT7L5l0vmoTORSUt4VhlgHeqdWKxmwCRh4I3JD9jnDdvfblAyQV9KxjVyMBuYXu0Pgf4yrdduoEp8t3ab6YBCgJRstwdBmcKUPVopf5PEBhPeYQ48US2YGf2HO7Xs_oFkMkRgKJRIl2o7S-H3NcpVL_XAq-_LheHrd_rxxdiJYZFZThbAfrtMx2gLZdd649aa8sNBtohJlPhJdWZmo6iIApP1BrTlzk9bVbYFPz_Ozu8GM7vvbucbVcRcbUnawDzbZxeXC5aYpys5jmc7S_4oJW1zHshNUWqNzCp88Bi7ge3z0nt935_dw3ky6Q1O-8d7QPJnbAF46RA12dXiP7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qeg55UudhsakZQFumHpTsTx3d28zrHdhMQE95GRIvmMN0PzrICm8TFyD6-oeejjMi6wWA_tRvG63FGZpb8hE87X_BU4UPPkq27tyEHOKCRKijy-zZsTsZI3SC-ZgSc7E4bfGRQcA2hhdgnprgTAYrOwT09aENy1baRKcMBeT_JLoHX93Qh-7QqOTHh3VvfDyT1CAfK2KnAk6b0ajNukY1TI5LuRRDR-6IoQCsHX2ZQNkweoPVsmPyyJmEHdDO3pYW-RiGC18wlwp9rPkLS-dKxxckDM092-A905VficCyH209Xz-uNnXOMw_rxN25oHSWH9Z5GcGGn8H4MvaDdSNxVpWDpyzIH14.lwfAyNWYLwpK7DNpZ8tB2Q' + export async function getVoucherCodes() { console.log('Get voucher codes for', process.env.NODE_ENV) - const encryptedVoucherCodes = await readFile(process.cwd() + `/src/voucherCodes.production`, { - encoding: 'utf-8', - }) - return decryptVoucherCodes(encryptedVoucherCodes, environment.authSecret) + try { + return decryptVoucherCodes(encryptedVoucherCodes, environment.authSecret) + } catch (e) { + console.error('Error getting voucher codes', e) + return [] + } } /** From f71d942c1ef9333a874cb80ba1bf25edabf55892 Mon Sep 17 00:00:00 2001 From: wslyvh Date: Wed, 10 Jul 2024 13:45:37 +0200 Subject: [PATCH 4/6] build fix --- packages/frontend/src/utils/getVoucherCodes.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/frontend/src/utils/getVoucherCodes.ts b/packages/frontend/src/utils/getVoucherCodes.ts index 315a5435..fb9a7885 100644 --- a/packages/frontend/src/utils/getVoucherCodes.ts +++ b/packages/frontend/src/utils/getVoucherCodes.ts @@ -1,6 +1,5 @@ import * as jose from 'jose' import { environment } from '@/config/environment' -import { readFile } from 'node:fs/promises' const encryptedVoucherCodes = 'eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0..vc4YkbIz7dKpzRjp.o9NWVDtMl4z734BqRE0UCFSBbAXNGQvu_-MbJ4LQL8VISKFlnqA7173gItkeHEnsU45nGQSYOLXnoZaW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6a17XKBZGLzubMiDGFklozT72FH7AS3R49e7vK-8aAnIFcN2meDxF29A70MfIt2sVET-M1yCgQGwS_iTjY3N5znHBRdXqEY--5nEpHZybkHK6Dqf9WFELWRziMM0D4M8281cJUSdLMmD2o7cGFrAycpDTtkMlWb9pHjgwvxZFGZyONOO_lCCI4ZLrHltsszXYruDi2RjH22L3E5--0FYIRWR8oI50Z4uHo6L1KvRRIhs5fJ7T5r5wvr0V3CaWlZMgeDaseRSzNUbIeYLxkYW9HZOFqclDu1Z62P9xfjsq6qs-kWs4_5DGW_R3wYqSyG5akTWf2mZcq8_xzR68X6w-Vv1Wqwnn3uS65YlY2ilsERphgzV98fodvFwXJ5eFU16HsNW3ToEnx4IPmEzsuxWyq6hgO_99vJxWRCg4PgOGsgpAElCEqqnKq-VO9ZhDzM0SxzmbvXVG0a9iTqtzbD2tqeg55UudhsakZQFumHpTsTx3d28zrHdhMQE95GRIvmMN0PzrICm8TFyD6-oeejjMi6wWA_tRvG63FGZpb8hE87X_BU4UPPkq27tyEHOKCRKijy-zZsTsZI3SC-ZgSc7E4bfGRQcA2hhdgnprgTAYrOwT09aENy1baRKcMBeT_JLoHX93Qh-7QqOTHh3VvfDyT1CAfK2KnAk6b0ajNukY1TI5LuRRDR-6IoQCsHX2ZQNkweoPVsmPyyJmEHdDO3pYW-RiGC18wlwp9rPkLS-dKxxckDM092-A905VficCyH209Xz-uNnXOMw_rxN25oHSWH9Z5GcGGn8H4MvaDdSNxVpWDpyzIH14.lwfAyNWYLwpK7DNpZ8tB2Q' @@ -24,7 +23,6 @@ export async function getVoucherCodes() { */ export async function decryptVoucherCodes(encryptedVoucherCodes: string, secretKey: Uint8Array) { console.log('Decrypting file..') - console.log(encryptedVoucherCodes) try { const { plaintext } = await jose.compactDecrypt(encryptedVoucherCodes, secretKey.slice(0, 32)) From bbdab69d0aba38c252ca3316204dcd819db36d81 Mon Sep 17 00:00:00 2001 From: wslyvh Date: Wed, 10 Jul 2024 13:54:32 +0200 Subject: [PATCH 5/6] remove error banner --- packages/frontend/src/components/info/VoucherTimeLeft.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend/src/components/info/VoucherTimeLeft.tsx b/packages/frontend/src/components/info/VoucherTimeLeft.tsx index 4e2ae513..927ee732 100644 --- a/packages/frontend/src/components/info/VoucherTimeLeft.tsx +++ b/packages/frontend/src/components/info/VoucherTimeLeft.tsx @@ -24,7 +24,7 @@ export const VoucherTimeLeft = () => { {isRedeemingExpired ? 'Voucher redemption expired on ' : 'Voucher redemption ends: '} {formatDate(redeemTimestamp)} -
We are currently experiencing issues and you are unable to claim your raffle ticket! We apologize for the inconvenience and are working on a fix. Follow our Twitter for updates.
+ {/*
We are currently experiencing issues and you are unable to claim your raffle ticket! We apologize for the inconvenience and are working on a fix. Follow our Twitter for updates.
*/} ) } From 98e074d6ff498ab3a7ca3be4995dcb05d3e9b39c Mon Sep 17 00:00:00 2001 From: wslyvh Date: Wed, 10 Jul 2024 13:58:12 +0200 Subject: [PATCH 6/6] build fix --- packages/frontend/src/components/info/VoucherTimeLeft.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/frontend/src/components/info/VoucherTimeLeft.tsx b/packages/frontend/src/components/info/VoucherTimeLeft.tsx index 927ee732..353a6f3f 100644 --- a/packages/frontend/src/components/info/VoucherTimeLeft.tsx +++ b/packages/frontend/src/components/info/VoucherTimeLeft.tsx @@ -6,7 +6,6 @@ import { formatDate } from '@/utils/formatters/formatDate' import { useVoucherRedeemDeadline } from '@/blockchain/hooks/useVoucherRedeemDeadline' import { useReadAuctionParams } from '@/blockchain/hooks/useReadAuctionParams' import { MediaQueries } from '@/styles/mediaQueries' -import Link from 'next/link' export const VoucherTimeLeft = () => { const { claimingEndTime } = useReadAuctionParams() @@ -24,7 +23,6 @@ export const VoucherTimeLeft = () => { {isRedeemingExpired ? 'Voucher redemption expired on ' : 'Voucher redemption ends: '} {formatDate(redeemTimestamp)} - {/*
We are currently experiencing issues and you are unable to claim your raffle ticket! We apologize for the inconvenience and are working on a fix. Follow our Twitter for updates.
*/} ) }