diff --git a/src/handler/icp/utils/addSelfAsValidator.ts b/src/handler/icp/utils/addSelfAsValidator.ts index 02d7729..75479e5 100644 --- a/src/handler/icp/utils/addSelfAsValidator.ts +++ b/src/handler/icp/utils/addSelfAsValidator.ts @@ -39,7 +39,7 @@ export default async function addSelfAsValidator( async function getStakingSignatureCount() { return Number(await bridge.get_validator_count()); } - const newV = publicKey; + const newV = `${identity.getPrincipal()},${publicKey}`; let validatorsCount = await getStakingSignatureCount(); let signatureCount = Number(await storage.getStakingSignaturesCount(newV)); @@ -61,15 +61,23 @@ export default async function addSelfAsValidator( }; }, ); + console.log( + signatures.map((e) => { + return { + signature: e.signature, + signer: e.signerAddress, + }; + }), + ); await bridge.add_validator( { principal: identity.getPrincipal(), - public_key: newV, + public_key: publicKey, }, signatures.map((e) => { return { - signature: e.signature, + signature: e.signature.replace("0x", ""), signer: e.signerAddress, }; }), diff --git a/src/handler/icp/utils/listenForLockEvents.ts b/src/handler/icp/utils/listenForLockEvents.ts index 002d2c1..489c594 100644 --- a/src/handler/icp/utils/listenForLockEvents.ts +++ b/src/handler/icp/utils/listenForLockEvents.ts @@ -24,7 +24,7 @@ export default async function listenForLockEvents( const latestBlockNumber = Number(latestBlockNumberResponse); if (latestBlockNumber <= lastBlock) { - logger.info(`0 TXs since Last Nonce: ${lastBlock}. Awaiting 10s`); + logger.trace(`0 TXs since Last Nonce: ${lastBlock}. Awaiting 10s`); await setTimeout(10000); continue; }