Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commented wait during deposit #73

Merged
merged 2 commits into from
Mar 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion admin_frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "admin_frontend",
"version": "1.0.3",
"version": "1.1.5",
"private": true,
"dependencies": {
"@emotion/react": "11.11.3",
Expand Down
2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "arka",
"version": "1.1.4",
"version": "1.1.5",
"description": "ARKA - (Albanian for Cashier's case) is the first open source Paymaster as a service software",
"type": "module",
"directories": {
Expand Down
3 changes: 2 additions & 1 deletion backend/src/paymaster/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ export class Paymaster {
throw new Error(`${signer.address} Balance is less than the amount to be deposited`)
const encodedData = paymasterContract.interface.encodeFunctionData('depositFunds', []);
const tx = await signer.sendTransaction({ to: paymasterAddress, data: encodedData, value: ethers.utils.parseEther(amount.toString()) });
await tx.wait();
// commented the below line to avoid timeouts for long delays in transaction confirmation.
// await tx.wait();
return {
message: `Successfully deposited with transaction Hash ${tx.hash}`
};
Expand Down
10 changes: 5 additions & 5 deletions backend/src/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const routes: FastifyPluginAsync = async (server) => {
"/",
async function (request, reply) {
try {
printRequest(request, server.log);
printRequest("/", request, server.log);
const query: any = request.query;
const body: any = request.body;
if (!body) return reply.code(ReturnCode.FAILURE).send({ error: ErrorMessage.EMPTY_BODY });
Expand Down Expand Up @@ -188,7 +188,7 @@ const routes: FastifyPluginAsync = async (server) => {
whitelistResponseSchema,
async function (request, reply) {
try {
printRequest(request, server.log);
printRequest("/pimlicoAddress", request, server.log);
const query: any = request.query;
const body: any = request.body;
const entryPoint = body.params[0];
Expand Down Expand Up @@ -263,7 +263,7 @@ const routes: FastifyPluginAsync = async (server) => {
"/whitelist",
async function (request, reply) {
try {
printRequest(request, server.log);
printRequest("/whiteList",request, server.log);
const body: any = request.body;
const query: any = request.query;
const address = body.params[0];
Expand Down Expand Up @@ -379,7 +379,7 @@ const routes: FastifyPluginAsync = async (server) => {
"/checkWhitelist",
async function (request, reply) {
try {
printRequest(request, server.log);
printRequest("/checkWhiteList", request, server.log);
const body: any = request.body;
const query: any = request.query;
const accountAddress = body.params[0];
Expand Down Expand Up @@ -438,7 +438,7 @@ const routes: FastifyPluginAsync = async (server) => {
whitelistResponseSchema,
async function (request, reply) {
try {
printRequest(request, server.log);
printRequest("/deposit", request, server.log);
const body: any = request.body;
const query: any = request.query;
const amount = body.params[0];
Expand Down
3 changes: 2 additions & 1 deletion backend/src/utils/common.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { FastifyBaseLogger, FastifyRequest } from "fastify";

export function printRequest(request: FastifyRequest, log: FastifyBaseLogger) {
export function printRequest(methodName: string, request: FastifyRequest, log: FastifyBaseLogger) {
log.info(methodName, "called: ");
log.info(request.query, "query passed: ");
log.info(request.body, "body passed: ");
}
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "arka_frontend",
"version": "1.0.3",
"version": "1.1.5",
"private": true,
"dependencies": {
"@babel/plugin-proposal-private-property-in-object": "7.21.11",
Expand Down
Loading