1
0
mirror of https://github.com/oceanprotocol-archive/squid-js.git synced 2024-02-02 15:31:51 +01:00

added support for POA network

This commit is contained in:
Sebastian Gerske 2018-11-14 09:36:37 +01:00
parent 8b954b5eb6
commit 3983c83eb9
5 changed files with 11 additions and 9 deletions

6
package-lock.json generated
View File

@ -120,9 +120,9 @@
}
},
"@oceanprotocol/keeper-contracts": {
"version": "0.3.19",
"resolved": "https://registry.npmjs.org/@oceanprotocol/keeper-contracts/-/keeper-contracts-0.3.19.tgz",
"integrity": "sha512-5pfcJ07v2UH3XwFPYTzPOm1UpArh1KvyDU45i+3YDMnW4LasuPDkf6yfBKOrjTxTEuwmIi8SGYdBrqFmzfPwFQ=="
"version": "0.3.21",
"resolved": "https://registry.npmjs.org/@oceanprotocol/keeper-contracts/-/keeper-contracts-0.3.21.tgz",
"integrity": "sha512-Tmeg2O1f92cj8yK2QSCBfqeHakaaALxEd7aOXVOPRBBkgyMZY2/LROH28oz2xLc7ui1hImFhGKjfL19gkktFdA=="
},
"@oceanprotocol/secret-store-client": {
"version": "0.0.9",

View File

@ -48,7 +48,7 @@
},
"homepage": "https://github.com/oceanprotocol/squid-js#readme",
"dependencies": {
"@oceanprotocol/keeper-contracts": "0.3.19",
"@oceanprotocol/keeper-contracts": "0.3.21",
"@oceanprotocol/secret-store-client": "0.0.9",
"bignumber.js": "^8.0.1",
"eth-crypto": "^1.2.5",

View File

@ -35,7 +35,7 @@ export default class Keeper {
public async getNetworkName(): Promise<string> {
return Web3Provider.getWeb3().eth.net.getId()
.then((networkId) => {
let network: string = "unknown"
let network: string = "Unknown"
switch (networkId) {
case 1:
@ -53,8 +53,11 @@ export default class Keeper {
case 42:
network = "Kovan"
break
case 8995:
network = "Ocean_POA_AWS"
break
default:
network = "development"
network = "Development"
}
return network
})

View File

@ -135,8 +135,7 @@ export default class Ocean {
const storedDdo = await aquarius.storeDDO(ddo)
await didRegistry.registerAttribute(id, ValueType.DID, "Metadata", serviceEndpoint,
publisher.getId())
await didRegistry.registerAttribute(id, ValueType.DID, "Metadata", serviceEndpoint, publisher.getId())
return storedDdo
}

View File

@ -33,7 +33,7 @@ describe("Keeper", () => {
it("should get development as default", async () => {
const networkName: string = await keeper.getNetworkName()
assert(networkName === "development")
assert(networkName === "Development")
})
})