Skip to content

Commit 335b440

Browse files
authored
Refactor auth (#1959)
* optional checks * wip * add chainid test * add chainid tests * add chain id * Updating ComputeExamples.md * change paid compute msg * revert msg * use helper * small improvements --------- Co-authored-by: GitHub Actions Bot <>
1 parent f4085bd commit 335b440

8 files changed

Lines changed: 389 additions & 140 deletions

File tree

ComputeExamples.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,10 @@ let's select compute environment which have free and paid resources
819819
computeValidUntil,
820820
providerUrl,
821821
consumerAccount,
822-
resources
822+
resources,
823+
(
824+
await consumerAccount.provider.getNetwork()
825+
).chainId
823826
)
824827

825828
console.log(

package-lock.json

Lines changed: 202 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,16 @@
6666
"crypto-js": "^4.1.1",
6767
"decimal.js": "^10.4.1",
6868
"ethers": "^5.7.2",
69-
"form-data": "^2.3.3"
69+
"form-data": "^2.3.3",
70+
"jsonwebtoken": "^9.0.2"
7071
},
7172
"devDependencies": {
7273
"@istanbuljs/nyc-config-typescript": "^1.0.2",
7374
"@truffle/hdwallet-provider": "^2.0.14",
7475
"@types/chai": "^4.3.1",
7576
"@types/chai-spies": "^1.0.3",
7677
"@types/crypto-js": "^4.1.1",
78+
"@types/jsonwebtoken": "^9.0.10",
7779
"@types/mocha": "^10.0.10",
7880
"@types/node": "^18.0.1",
7981
"@types/node-fetch": "^3.0.3",

0 commit comments

Comments
 (0)