From f0885e157657c970501a2e68dc241cbda959c55a Mon Sep 17 00:00:00 2001 From: Adi Bhagavath Date: Mon, 20 Nov 2023 22:25:51 +0530 Subject: [PATCH] Pass networkAddress and anchorUri from ENV --- demo/src/demo.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/demo/src/demo.ts b/demo/src/demo.ts index f81e58e7..fe06211a 100644 --- a/demo/src/demo.ts +++ b/demo/src/demo.ts @@ -34,7 +34,8 @@ function getChallenge(): string { } async function main() { - const networkAddress = 'ws://127.0.0.1:9944' + const networkAddress : string = process.env.NETWORK_ADDRESS ? process.env.NETWORK_ADDRESS : 'ws://127.0.0.1:9944'; + const anchorUri : string = process.env.ANCHOR_URI ? process.env.ANCHOR_URI : '//Alice'; Cord.ConfigService.set({ submitTxResolveOn: Cord.Chain.IS_IN_BLOCK }) await Cord.connect(networkAddress) @@ -43,7 +44,7 @@ async function main() { console.log(`\n❄️ New Network Member`) const authorityAuthorIdentity = Crypto.makeKeypairFromUri( - '//Alice', + anchorUri, 'sr25519' ) // Setup network authority account.