diff --git a/packages/backend/services/xmtp.service.ts b/packages/backend/services/xmtp.service.ts index 9a48988..a572510 100644 --- a/packages/backend/services/xmtp.service.ts +++ b/packages/backend/services/xmtp.service.ts @@ -1,7 +1,7 @@ -import { broadCastConfigEntities } from "../../common/xmtp/brodcaster-config"; import { base64ToBytes } from "../utils/functions"; import { RedisService } from "./redis.service"; import { Client, type XmtpEnv } from "@xmtp/xmtp-js"; +import { broadCastConfigEntities } from "common"; import { Redis } from "ioredis"; export class XmtpClientService { @@ -45,6 +45,10 @@ export class XmtpClientService { console.error(`Missing ${config.id}_FILE_PERSISTENCE_PATH`); return; } + const { GrpcApiClient } = await import("@xmtp/grpc-api-client"); + const { RedisPersistence } = await import( + "@xmtp/redis-persistence" + ); try { const { GrpcApiClient } = await import( diff --git a/packages/backend/utils/functions/start-broadcast.ts b/packages/backend/utils/functions/start-broadcast.ts index 2cfe702..7f607e5 100644 --- a/packages/backend/utils/functions/start-broadcast.ts +++ b/packages/backend/utils/functions/start-broadcast.ts @@ -1,6 +1,6 @@ -import { broadCastConfigEntities } from "../../../common/xmtp/brodcaster-config"; import { Broadcast as BroadcastService } from "../../services/broadcast.service"; import type { Client } from "@xmtp/xmtp-js"; +import { broadCastConfigEntities } from "common"; const XMTP_RATE_LIMIT = 1000; const XMTP_RATE_LIMIT_TIME = 60 * 1000; // 1 minute diff --git a/packages/common/index.ts b/packages/common/index.ts index dc71384..4015386 100644 --- a/packages/common/index.ts +++ b/packages/common/index.ts @@ -1,6 +1,7 @@ import * as ConnectFour from "./connect-four"; import * as Contracts from "./contracts"; import * as RockPaperScissors from "./rock-paper-scissors"; +export { broadCastConfigEntities } from "./xmtp/brodcaster-config"; export const gameBetWinnerPercentage = 60; export const gameBetPoolPercentage = 20;