Skip to content

Commit

Permalink
fix: PRO-2395 fix imports in backend
Browse files Browse the repository at this point in the history
  • Loading branch information
kanthgithub committed Jun 14, 2024
1 parent 06e4617 commit acb5e01
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ FROM node:18-alpine AS runner
WORKDIR /usr/app
ARG APP_ENV
COPY --from=builder /app/build ./build
COPY ./src/migrations ./build/migrations
COPY ./migrations ./build/migrations
COPY package.json ./
COPY --from=builder /app/config.json.default /usr/app/config.json
RUN touch database.sqlite
Expand Down
10 changes: 5 additions & 5 deletions backend/src/plugins/sequelizePlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import fp from "fastify-plugin";
import { FastifyPluginAsync } from "fastify";
import { Sequelize } from 'sequelize';
import dotenv from 'dotenv';
import { initializeAPIKeyModel } from '../models/api-key'; // Assuming path correctness
import { initializeSponsorshipPolicyModel } from '../models/sponsorship-policy';
import { initializeArkaConfigModel } from "../models/arka-config";
import { APIKeyRepository } from "../repository/api-key-repository";
import { ArkaConfigRepository } from "../repository/arka-config-repository";
import { initializeAPIKeyModel } from '../models/api-key.js';
import { initializeSponsorshipPolicyModel } from '../models/sponsorship-policy.js';
import { initializeArkaConfigModel } from "../models/arka-config.js";
import { APIKeyRepository } from "../repository/api-key-repository.js";
import { ArkaConfigRepository } from "../repository/arka-config-repository.js";
const pg = await import('pg');
const Client = pg.default.Client;

Expand Down
2 changes: 1 addition & 1 deletion backend/src/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import ErrorMessage from "../constants/ErrorMessage.js";
import ReturnCode from "../constants/ReturnCode.js";
import { decode } from "../utils/crypto.js";
import { printRequest, getNetworkConfig } from "../utils/common.js";
import { APIKey } from "models/api-key.js";
import { APIKey } from "../models/api-key.js";

const SUPPORTED_ENTRYPOINTS = {
'EPV_06' : "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
Expand Down
2 changes: 1 addition & 1 deletion backend/src/routes/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import ReturnCode from "../constants/ReturnCode.js";
import ErrorMessage from "../constants/ErrorMessage.js";
import { decode } from "../utils/crypto.js";
import { PAYMASTER_ADDRESS } from "../constants/Pimlico.js";
import { APIKey } from "../models/api-key";
import { APIKey } from "../models/api-key.js";
import * as EtherspotAbi from "../abi/EtherspotAbi.js";

const metadataRoutes: FastifyPluginAsync = async (server) => {
Expand Down
6 changes: 3 additions & 3 deletions backend/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ import PimlicoAbi from './abi/PimlicoAbi.js';
import PythOracleAbi from './abi/PythOracleAbi.js';
import { getNetworkConfig } from './utils/common.js';
import { checkDeposit } from './utils/monitorTokenPaymaster.js';
import { APIKey } from 'models/api-key.js';
import { APIKey } from './models/api-key.js';
import { APIKeyRepository } from './repository/api-key-repository.js';
import { ArkaConfig } from 'models/arka-config.js';
import { ArkaConfigRepository } from 'repository/arka-config-repository.js';
import { ArkaConfig } from './models/arka-config.js';
import { ArkaConfigRepository } from './repository/arka-config-repository.js';

let server: FastifyInstance;

Expand Down
1 change: 0 additions & 1 deletion backend/src/utils/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { FastifyBaseLogger, FastifyRequest } from "fastify";
import { BigNumber, ethers } from "ethers";
import SupportedNetworks from "../../config.json" assert { type: "json" };
import { EtherscanResponse, getEtherscanFeeResponse } from "./interface.js";
import { APIKey } from "models/api-key";

export function printRequest(methodName: string, request: FastifyRequest, log: FastifyBaseLogger) {
log.info(methodName, "called: ");
Expand Down
9 changes: 7 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,18 @@ services:
- API_PORT=5050
- UNSAFE_MODE=false
- SUPPORTED_NETWORKS=
- CRON_PRIVATE_KEY=
- CRON_PRIVATE_KEY=""
- DEFAULT_INDEXER_ENDPOINT=http://localhost:3003
- FEE_MARKUP=
- FEE_MARKUP=0
- MULTI_TOKEN_MARKUP=1150000
- ADMIN_WALLET_ADDRESS=""
- ETHERSCAN_GAS_ORACLES=
- DEFAULT_API_KEY=
- WEBHOOK_URL=
- DATABASE_URL="postgresql://arkauser:paymaster@localhost:5432/arkadev"
- DATABASE_SCHEMA_NAME=arka
- DATABASE_SSL_ENABLED=false
- DATABASE_SSL_REJECT_UNAUTHORIZED=false
build:
context: ./backend
dockerfile: Dockerfile
Expand Down

0 comments on commit acb5e01

Please sign in to comment.