Skip to content

Commit 790a689

Browse files
authored
Move /wallet endpoints to /backend-wallet (#166)
* Move /wallet endpoints to /backend-wallet * Fix routes
1 parent d3999ce commit 790a689

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

server/api/wallet/create.ts renamed to server/api/backend-wallet/create.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ export const createWallet = async (fastify: FastifyInstance) => {
2828
Reply: Static<typeof responseSchema>;
2929
}>({
3030
method: "POST",
31-
url: "/wallet/create",
31+
url: "/backend-wallet/create",
3232
schema: {
3333
description: "Create a new backend wallet",
34-
tags: ["Wallet"],
35-
operationId: "wallet_create",
34+
tags: ["Backend Wallet"],
35+
operationId: "backendWallet_create",
3636
response: {
3737
...standardResponseSchema,
3838
[StatusCodes.OK]: responseSchema,

server/api/wallet/getAll.ts renamed to server/api/backend-wallet/getAll.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ export async function getAll(fastify: FastifyInstance) {
3232
Reply: Static<typeof responseSchema>;
3333
}>({
3434
method: "GET",
35-
url: "/wallet/get-all",
35+
url: "/backend-wallet/get-all",
3636
schema: {
3737
description: "Get all created EOA wallet",
38-
tags: ["Wallet"],
39-
operationId: "wallet_getAll",
38+
tags: ["Backend Wallet"],
39+
operationId: "backendWallet_getAll",
4040
response: {
4141
...standardResponseSchema,
4242
[StatusCodes.OK]: responseSchema,

server/api/wallet/getBalance.ts renamed to server/api/backend-wallet/getBalance.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ export async function getBalance(fastify: FastifyInstance) {
3737
Reply: Static<typeof responseSchema>;
3838
}>({
3939
method: "GET",
40-
url: "/wallet/:chain/:wallet_address/get-balance",
40+
url: "/backend-wallet/:chain/:wallet_address/get-balance",
4141
schema: {
4242
description: "Get Wallet Balance",
43-
tags: ["Wallet"],
44-
operationId: "wallet_getBalance",
43+
tags: ["Backend Wallet"],
44+
operationId: "backendWallet_getBalance",
4545
params: requestSchema,
4646
response: {
4747
...standardResponseSchema,

server/api/wallet/import.ts renamed to server/api/backend-wallet/import.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ export const importWallet = async (fastify: FastifyInstance) => {
9797
Body: Static<typeof RequestBodySchema>;
9898
}>({
9999
method: "POST",
100-
url: "/wallet/import",
100+
url: "/backend-wallet/import",
101101
schema: {
102102
description: "Import a wallet that has already been created",
103-
tags: ["Wallet"],
104-
operationId: "wallet_import",
103+
tags: ["Backend Wallet"],
104+
operationId: "backendWallet_import",
105105
body: RequestBodySchema,
106106
response: {
107107
...standardResponseSchema,

server/api/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ import { extractEvents } from "./contract/metadata/events";
3636
import { extractFunctions } from "./contract/metadata/functions";
3737

3838
// Wallet
39+
import { createWallet } from "./backend-wallet/create";
40+
import { getAll } from "./backend-wallet/getAll";
41+
import { getBalance } from "./backend-wallet/getBalance";
42+
import { importWallet } from "./backend-wallet/import";
3943
import { accountRoutes } from "./contract/extensions/account";
4044
import { accountFactoryRoutes } from "./contract/extensions/accountFactory";
41-
import { createWallet } from "./wallet/create";
42-
import { getAll } from "./wallet/getAll";
43-
import { getBalance } from "./wallet/getBalance";
44-
import { importWallet } from "./wallet/import";
4545

4646
export const apiRoutes = async (fastify: FastifyInstance) => {
4747
// Wallet

0 commit comments

Comments
 (0)