From c2fdd18f0977b8230a934a7de7ed35ff40cd8859 Mon Sep 17 00:00:00 2001 From: Shahar Yakir Date: Tue, 12 Mar 2024 13:42:53 +0000 Subject: [PATCH] rotate in prog --- script/deploy.sh | 12 +++--------- src/controller.ts | 5 +++++ src/ton-reader-client.ts | 4 ++-- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/script/deploy.sh b/script/deploy.sh index 5e2e32d..e600167 100755 --- a/script/deploy.sh +++ b/script/deploy.sh @@ -1,17 +1,11 @@ #!/bin/bash set -e -if [ ! -f ".secret" ]; then - echo >&2 "Error: .secret does not exist." - exit 1 -fi -source .secret - if [[ $1 == "testnet" ]]; then - values=("prod-testnet-1") - echo "Deploying to tesnet only!" + values=("prod-testnet-1") + echo "Deploying to tesnet only!" else - values=("prod-testnet-1" "prod-1" "prod-2" "prod-3") + values=("prod-testnet-1" "prod-1" "prod-2" "prod-3") fi for heroku_app in "${values[@]}"; do diff --git a/src/controller.ts b/src/controller.ts index 6bdfc0c..085b836 100644 --- a/src/controller.ts +++ b/src/controller.ts @@ -52,6 +52,11 @@ export class Controller { this.keypair = tweetnacl.sign.keyPair.fromSecretKey( Buffer.from(this.config.privateKey, "base64"), ); + + if (process.env.IS_LOCAL === "1") { + console.log("public key", Buffer.from(this.keypair.publicKey).toString("base64")); + } + this.tonReaderClient = tonReaderClient; } diff --git a/src/ton-reader-client.ts b/src/ton-reader-client.ts index 7c2cd03..55b646d 100644 --- a/src/ton-reader-client.ts +++ b/src/ton-reader-client.ts @@ -48,11 +48,11 @@ export class TonReaderClientImpl implements TonReaderClient { ); const verifierRegistryAddress = await sourcesRegistryContract.getVerifierRegistryAddress(); - const verifierRegstryContract = tc.open( + const verifierRegistryContract = tc.open( VerifierRegistry.createFromAddress(verifierRegistryAddress), ); - const res = await verifierRegstryContract.getVerifier(toBigIntBE(sha256(verifierId))); + const res = await verifierRegistryContract.getVerifier(toBigIntBE(sha256(verifierId))); const verifierConfig = res.settings!.beginParse(); const quorum = verifierConfig.loadUint(8);