From 5be6fc2583394e6c518865c00c418499bbadcada Mon Sep 17 00:00:00 2001 From: Muhammad Usman Date: Tue, 10 Dec 2024 12:58:39 +0500 Subject: [PATCH] fix(deps): uncomment update schema --- src/deps/index.ts | 2 +- src/handler/chains/casper/utils/getBalance.ts | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/deps/index.ts b/src/deps/index.ts index ffc49f9..8bf73d5 100644 --- a/src/deps/index.ts +++ b/src/deps/index.ts @@ -66,7 +66,7 @@ export async function configDeps( new NonceManager(stakingSigner), ); const orm = await MikroORM.init(MikroOrmConfig); - // await orm.schema.updateSchema(); + await orm.schema.updateSchema(); await runMigrationsIfAny(orm.getMigrator(), logger); const em = orm.em; const serverLinkHandler = process.env.SERVER_LINK diff --git a/src/handler/chains/casper/utils/getBalance.ts b/src/handler/chains/casper/utils/getBalance.ts index 02a7518..f90c76f 100644 --- a/src/handler/chains/casper/utils/getBalance.ts +++ b/src/handler/chains/casper/utils/getBalance.ts @@ -7,12 +7,17 @@ export default async function getBalance( signer: Keys.Ed25519, ) { try { + console.log( + "casper", + signer.publicKey.toHex(), + signer.publicKey.toAccountHashStr(), + ); const balance = await useMutexAndRelease( fetchProvider, async (provider) => { return await provider.nodeClient.queryBalance( - PurseIdentifier.MainPurseUnderAccountHash, - signer.publicKey.toAccountHashStr(), + PurseIdentifier.MainPurseUnderPublicKey, + signer.publicKey.toHex(), ); }, );