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:
parent
8b954b5eb6
commit
3983c83eb9
6
package-lock.json
generated
6
package-lock.json
generated
@ -120,9 +120,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@oceanprotocol/keeper-contracts": {
|
"@oceanprotocol/keeper-contracts": {
|
||||||
"version": "0.3.19",
|
"version": "0.3.21",
|
||||||
"resolved": "https://registry.npmjs.org/@oceanprotocol/keeper-contracts/-/keeper-contracts-0.3.19.tgz",
|
"resolved": "https://registry.npmjs.org/@oceanprotocol/keeper-contracts/-/keeper-contracts-0.3.21.tgz",
|
||||||
"integrity": "sha512-5pfcJ07v2UH3XwFPYTzPOm1UpArh1KvyDU45i+3YDMnW4LasuPDkf6yfBKOrjTxTEuwmIi8SGYdBrqFmzfPwFQ=="
|
"integrity": "sha512-Tmeg2O1f92cj8yK2QSCBfqeHakaaALxEd7aOXVOPRBBkgyMZY2/LROH28oz2xLc7ui1hImFhGKjfL19gkktFdA=="
|
||||||
},
|
},
|
||||||
"@oceanprotocol/secret-store-client": {
|
"@oceanprotocol/secret-store-client": {
|
||||||
"version": "0.0.9",
|
"version": "0.0.9",
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/oceanprotocol/squid-js#readme",
|
"homepage": "https://github.com/oceanprotocol/squid-js#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@oceanprotocol/keeper-contracts": "0.3.19",
|
"@oceanprotocol/keeper-contracts": "0.3.21",
|
||||||
"@oceanprotocol/secret-store-client": "0.0.9",
|
"@oceanprotocol/secret-store-client": "0.0.9",
|
||||||
"bignumber.js": "^8.0.1",
|
"bignumber.js": "^8.0.1",
|
||||||
"eth-crypto": "^1.2.5",
|
"eth-crypto": "^1.2.5",
|
||||||
|
@ -35,7 +35,7 @@ export default class Keeper {
|
|||||||
public async getNetworkName(): Promise<string> {
|
public async getNetworkName(): Promise<string> {
|
||||||
return Web3Provider.getWeb3().eth.net.getId()
|
return Web3Provider.getWeb3().eth.net.getId()
|
||||||
.then((networkId) => {
|
.then((networkId) => {
|
||||||
let network: string = "unknown"
|
let network: string = "Unknown"
|
||||||
|
|
||||||
switch (networkId) {
|
switch (networkId) {
|
||||||
case 1:
|
case 1:
|
||||||
@ -53,8 +53,11 @@ export default class Keeper {
|
|||||||
case 42:
|
case 42:
|
||||||
network = "Kovan"
|
network = "Kovan"
|
||||||
break
|
break
|
||||||
|
case 8995:
|
||||||
|
network = "Ocean_POA_AWS"
|
||||||
|
break
|
||||||
default:
|
default:
|
||||||
network = "development"
|
network = "Development"
|
||||||
}
|
}
|
||||||
return network
|
return network
|
||||||
})
|
})
|
||||||
|
@ -135,8 +135,7 @@ export default class Ocean {
|
|||||||
|
|
||||||
const storedDdo = await aquarius.storeDDO(ddo)
|
const storedDdo = await aquarius.storeDDO(ddo)
|
||||||
|
|
||||||
await didRegistry.registerAttribute(id, ValueType.DID, "Metadata", serviceEndpoint,
|
await didRegistry.registerAttribute(id, ValueType.DID, "Metadata", serviceEndpoint, publisher.getId())
|
||||||
publisher.getId())
|
|
||||||
|
|
||||||
return storedDdo
|
return storedDdo
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ describe("Keeper", () => {
|
|||||||
|
|
||||||
it("should get development as default", async () => {
|
it("should get development as default", async () => {
|
||||||
const networkName: string = await keeper.getNetworkName()
|
const networkName: string = await keeper.getNetworkName()
|
||||||
assert(networkName === "development")
|
assert(networkName === "Development")
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user