Skip to content

Commit 3e5d5be

Browse files
authored
Migrate to standard folder structure for api (#265)
1 parent a80ae20 commit 3e5d5be

File tree

168 files changed

+372
-373
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+372
-373
lines changed

server/api/backend-wallet/create.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { FastifyInstance } from "fastify";
33
import { StatusCodes } from "http-status-codes";
44
import { getConfiguration } from "../../../src/db/configuration/getConfiguration";
55
import { WalletType } from "../../../src/schema/wallet";
6-
import { standardResponseSchema } from "../../helpers/sharedApiSchemas";
6+
import { standardResponseSchema } from "../../schemas/sharedApiSchemas";
77
import { createAwsKmsWallet } from "../../utils/wallets/createAwsKmsWallet";
88
import { createGcpKmsWallet } from "../../utils/wallets/createGcpKmsWallet";
99
import { createLocalWallet } from "../../utils/wallets/createLocalWallet";

server/api/backend-wallet/getAll.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { getAllWallets } from "../../../src/db/wallets/getAllWallets";
55
import {
66
standardResponseSchema,
77
walletDetailsSchema,
8-
} from "../../helpers/sharedApiSchemas";
8+
} from "../../schemas/sharedApiSchemas";
99

1010
// OUTPUT
1111
const responseSchema = Type.Object({

server/api/backend-wallet/getBalance.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import { StatusCodes } from "http-status-codes";
44
import {
55
currencyValueSchema,
66
standardResponseSchema,
7-
} from "../../helpers/sharedApiSchemas";
7+
} from "../../schemas/sharedApiSchemas";
88
import { walletParamSchema } from "../../schemas/wallet";
9-
import { getChainIdFromChain } from "../../utilities/chain";
109
import { getSdk } from "../../utils/cache/getSdk";
10+
import { getChainIdFromChain } from "../../utils/chain";
1111

1212
// INPUTS
1313
const requestSchema = walletParamSchema;

server/api/backend-wallet/import.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { FastifyInstance } from "fastify";
33
import { StatusCodes } from "http-status-codes";
44
import { getConfiguration } from "../../../src/db/configuration/getConfiguration";
55
import { WalletType } from "../../../src/schema/wallet";
6-
import { standardResponseSchema } from "../../helpers/sharedApiSchemas";
6+
import { standardResponseSchema } from "../../schemas/sharedApiSchemas";
77
import { importAwsKmsWallet } from "../../utils/wallets/importAwsKmsWallet";
88
import { importGcpKmsWallet } from "../../utils/wallets/importGcpKmsWallet";
99
import { importLocalWallet } from "../../utils/wallets/importLocalWallet";

server/api/backend-wallet/send.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import { prisma } from "../../../src/db/client";
55
import {
66
standardResponseSchema,
77
transactionWritesResponseSchema,
8-
} from "../../helpers/sharedApiSchemas";
8+
} from "../../schemas/sharedApiSchemas";
99
import { walletAuthSchema } from "../../schemas/wallet";
10-
import { getChainIdFromChain } from "../../utilities/chain";
10+
import { getChainIdFromChain } from "../../utils/chain";
1111

1212
const ParamsSchema = Type.Object({
1313
chain: Type.String(),

server/api/backend-wallet/transfer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ import { queueTx } from "../../../src/db/transactions/queueTx";
1212
import {
1313
standardResponseSchema,
1414
transactionWritesResponseSchema,
15-
} from "../../helpers/sharedApiSchemas";
15+
} from "../../schemas/sharedApiSchemas";
1616
import { walletAuthSchema, walletParamSchema } from "../../schemas/wallet";
17-
import { getChainIdFromChain } from "../../utilities/chain";
1817
import { getContract } from "../../utils/cache/getContract";
1918
import { getSdk } from "../../utils/cache/getSdk";
19+
import { getChainIdFromChain } from "../../utils/chain";
2020

2121
// INPUTS
2222
const requestSchema = Type.Omit(walletParamSchema, ["wallet_address"]);

server/api/chain/get.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import { Static, Type } from "@sinclair/typebox";
22
import { allChains, minimizeChain } from "@thirdweb-dev/chains";
33
import { FastifyInstance } from "fastify";
44
import { StatusCodes } from "http-status-codes";
5-
import { standardResponseSchema } from "../../helpers/sharedApiSchemas";
65
import { createCustomError } from "../../middleware/error";
76
import {
87
chainRequestQuerystringSchema,
98
chainResponseSchema,
109
} from "../../schemas/chain";
10+
import { standardResponseSchema } from "../../schemas/sharedApiSchemas";
1111

1212
// OUPUT
1313
const responseSchema = Type.Object({

server/api/chain/getAll.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { Static, Type } from "@sinclair/typebox";
22
import { allChains, minimizeChain } from "@thirdweb-dev/chains";
33
import { FastifyInstance } from "fastify";
44
import { StatusCodes } from "http-status-codes";
5-
import { standardResponseSchema } from "../../helpers/sharedApiSchemas";
65
import { chainResponseSchema } from "../../schemas/chain";
6+
import { standardResponseSchema } from "../../schemas/sharedApiSchemas";
77

88
// OUPUT
99
const responseSchema = Type.Object({

server/api/configuration/backend-wallet-balance/get.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Static, Type } from "@sinclair/typebox";
22
import { FastifyInstance } from "fastify";
33
import { StatusCodes } from "http-status-codes";
44
import { getConfiguration } from "../../../../src/db/configuration/getConfiguration";
5-
import { standardResponseSchema } from "../../../helpers/sharedApiSchemas";
5+
import { standardResponseSchema } from "../../../schemas/sharedApiSchemas";
66

77
export const ReplySchema = Type.Object({
88
result: Type.Object({

server/api/configuration/backend-wallet-balance/update.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Static, Type } from "@sinclair/typebox";
22
import { FastifyInstance } from "fastify";
33
import { StatusCodes } from "http-status-codes";
44
import { updateConfiguration } from "../../../../src/db/configuration/updateConfiguration";
5-
import { standardResponseSchema } from "../../../helpers/sharedApiSchemas";
5+
import { standardResponseSchema } from "../../../schemas/sharedApiSchemas";
66
import { ReplySchema } from "./get";
77

88
const BodySchema = Type.Partial(

0 commit comments

Comments
 (0)