Skip to content

Commit

Permalink
time of transaction also used to generate transaction hash
Browse files Browse the repository at this point in the history
  • Loading branch information
NamitBhutani committed May 23, 2023
1 parent da21dde commit 8b86ac8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/routes/payto/[id]/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { PageServerLoad, Actions } from './$types';
import { supabase } from '$lib/supabaseClient';
import { fail } from '@sveltejs/kit';
import { v5 as uuidv5 } from 'uuid';
let time = new Date();

let newAmount: number;
let newAmountforUser: number;
Expand All @@ -23,7 +24,7 @@ export const actions: Actions = {
.eq('id', session?.user.id)
.single();
let confirmation_hash = uuidv5(
JSON.stringify([amount, session?.user.id, params.id]),
JSON.stringify([amount, session?.user.id, params.id, time]),
uuidv5.URL
); //generating a unique hash for the transaction
if (loadErrforVendor || loadErrforUser)
Expand Down

1 comment on commit 8b86ac8

@vercel
Copy link

@vercel vercel bot commented on 8b86ac8 May 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

e-coupons-swd – ./

ecoupons.vercel.app
e-coupons-swd-git-main-intellomaniac.vercel.app
e-coupons-swd-intellomaniac.vercel.app

Please sign in to comment.