Skip to content

Commit

Permalink
fix: BE
Browse files Browse the repository at this point in the history
  • Loading branch information
karanpargal committed Sep 6, 2024
1 parent 1c8ae0d commit e33c20c
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ export const createGame = async (
.select()
.single();

console.log(data);

if (error) {
console.error(error);
throw error;
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"build": "([ ! -d dist ] || rm -r dist) && tsc",
"lint": "eslint .",
"pretty": "prettier . --write",
"start": "node ./dist/app.js",
"start": "node --experimental-modules ./dist/backend/app.js",
"types:database": "node ./scripts/generate-supabase-types.js"
},
"engines": {
Expand Down
1 change: 1 addition & 0 deletions packages/backend/services/ethers.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export class EthersService {

await tx.wait();

console.log(tx);
return tx;
} catch (error) {
console.error(error);
Expand Down
9 changes: 7 additions & 2 deletions packages/backend/services/xmtp.service.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { broadCastConfigEntities } from "../../common/xmtp/brodcaster-config";
import { base64ToBytes } from "../utils/functions";
import { RedisService } from "./redis.service";
import { GrpcApiClient } from "@xmtp/grpc-api-client";
import { RedisPersistence } from "@xmtp/redis-persistence";
import { Client, type XmtpEnv } from "@xmtp/xmtp-js";
import { Redis } from "ioredis";

Expand Down Expand Up @@ -49,6 +47,13 @@ export class XmtpClientService {
}

try {
const { GrpcApiClient } = await import(
"@xmtp/grpc-api-client"
);
const { RedisPersistence } = await import(
"@xmtp/redis-persistence"
);

const client = await Client.create(null, {
privateKeyOverride: base64ToBytes(keyBundle),
apiClientFactory: GrpcApiClient.fromOptions as any,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export class ArcadeService {
chain_id: number,
): Promise<void> {
try {
console.log(chain_id);
console.log("Initializing ArcadeService");
console.log("Provider: ", provider);
this.provider = new ethers.BrowserProvider(provider);
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/utils/service/web3auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const privateKeyProvider = new EthereumPrivateKeyProvider({

const web3auth = new Web3Auth({
clientId: process.env.NEXT_PUBLIC_WEB3_AUTH_CLIENT_ID!,
web3AuthNetwork: WEB3AUTH_NETWORK.TESTNET,
web3AuthNetwork: WEB3AUTH_NETWORK.SAPPHIRE_DEVNET,
privateKeyProvider,
});

Expand Down

0 comments on commit e33c20c

Please sign in to comment.