- Received INR
+ {t.status}
{t.time.toDateString()}
diff --git a/apps/user-app/lib/actions/createOnrampTransactions.ts b/apps/user-app/lib/actions/createOnrampTransactions.ts
new file mode 100644
index 0000000..6a536bb
--- /dev/null
+++ b/apps/user-app/lib/actions/createOnrampTransactions.ts
@@ -0,0 +1,47 @@
+"use server"
+
+import { getServerSession } from "next-auth"
+import { authOptions } from "../../app/lib/auth"
+import db from "@repo/db/client"
+
+
+enum statusType {
+ Success = "Success",
+ Failure = "Failure",
+ Processing = "Processing"
+}
+
+export async function createOnrampTranactions(amount : number, provider : string)
+{
+ const session = await getServerSession(authOptions);
+ const userId = session.user?.id;
+
+ try{
+ const x = await db.onRampTransaction.create({
+ data : {
+ token : Math.random().toString(),
+ status : statusType.Processing,
+ provider,
+ amount,
+ startTime : new Date(),
+ userId : Number(userId)
+ }
+ });
+
+ console.log("hey");
+
+ return {
+ msg : "onRamp created"
+ }
+ }
+ catch(e : any)
+ {
+ console.log(e);
+ return {
+ msg : e.toString()
+ }
+ }
+
+
+
+}
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 1ba3d23..8826724 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2908,12 +2908,12 @@
}
},
"node_modules/braces": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
- "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
+ "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
"dev": true,
"dependencies": {
- "fill-range": "^7.0.1"
+ "fill-range": "^7.1.1"
},
"engines": {
"node": ">=8"
@@ -5239,9 +5239,9 @@
}
},
"node_modules/fill-range": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
- "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
+ "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
"dev": true,
"dependencies": {
"to-regex-range": "^5.0.1"
diff --git a/packages/db/.env.example b/packages/db/.env.example
deleted file mode 100644
index fe001e3..0000000
--- a/packages/db/.env.example
+++ /dev/null
@@ -1,2 +0,0 @@
-
-DATABASE_URL="postgresql://postgres:mysecretpassword@localhost:5432/postgres"
diff --git a/packages/db/prisma/src/index.ts b/packages/db/prisma/src/index.ts
new file mode 100644
index 0000000..95642c4
--- /dev/null
+++ b/packages/db/prisma/src/index.ts
@@ -0,0 +1 @@
+console.log("hey");
\ No newline at end of file
diff --git a/packages/db/tsconfig.json b/packages/db/tsconfig.json
index 872a7a3..6f89a9f 100644
--- a/packages/db/tsconfig.json
+++ b/packages/db/tsconfig.json
@@ -1,5 +1,5 @@
{
- "extends": "@repo/typescript-config/react-library.json",
+ "extends": "@repo/typescript-config/base.json",
"compilerOptions": {
"outDir": "dist"
},