Skip to content

Commit

Permalink
chnages: version change, minor response changes for metadata and add …
Browse files Browse the repository at this point in the history
…stake routes
  • Loading branch information
nikhilkumar1612 committed Dec 26, 2024
1 parent 9b63ee4 commit e903c10
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
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.8.0",
"version": "2.0.0",
"description": "ARKA - (Albanian for Cashier's case) is the first open source Paymaster as a service software",
"type": "module",
"directories": {
Expand Down
4 changes: 3 additions & 1 deletion backend/src/paymaster/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,9 @@ export class Paymaster {
}
);
}
return tx
return {
message: `Successfully staked with transaction Hash ${tx.hash}`
};
} catch (error) {
log?.error(`error while adding stake to verifying paymaster ${error}`);
throw new Error(ErrorMessage.FAILED_TO_ADD_STAKE);
Expand Down
2 changes: 1 addition & 1 deletion backend/src/routes/admin-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ const adminRoutes: FastifyPluginAsync = async (server) => {
chainId,
server.log
);
return reply.code(ReturnCode.SUCCESS).send({tx});
return reply.code(ReturnCode.SUCCESS).send(tx);
} catch (error: any) {
request.log.error(error);
return reply.code(ReturnCode.FAILURE).send({ error: error.message ?? ErrorMessage.FAILED_TO_PROCESS });
Expand Down
3 changes: 2 additions & 1 deletion backend/src/routes/metadata-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ const metadataRoutes: FastifyPluginAsync = async (server) => {
multiTokenPaymasters,
sponsorDetails: { name: sponsorName, icon: sponsorImage },
verifyingPaymaster: { address: verifyingPaymaster, deposit: verifyingPaymasterDeposit },
verifyingPaymasters: apiKeyEntity.verifyingPaymasters ? JSON.parse(apiKeyEntity.verifyingPaymasters) : undefined
verifyingPaymasters: apiKeyEntity.verifyingPaymasters ? JSON.parse(apiKeyEntity.verifyingPaymasters) : undefined,
verifyingPaymastersV2: apiKeyEntity.verifyingPaymastersV2 ? JSON.parse(apiKeyEntity.verifyingPaymastersV2) : undefined,
})
} catch (err: any) {
request.log.error(err);
Expand Down

0 comments on commit e903c10

Please sign in to comment.