Fix nodejs project in Price Oracle example

This commit is contained in:
Pavel Murygin 2021-10-19 13:58:58 +03:00
parent ae33fa6232
commit 30a3e9c123
3 changed files with 13 additions and 23 deletions

View File

@ -10,7 +10,7 @@
"license": "MIT",
"dependencies": {
"@fluencelabs/aqua-lib": "^0.1.9",
"@fluencelabs/fluence": "^0.11.0",
"@fluencelabs/fluence": "^0.13.0",
"@fluencelabs/fluence-network-environment": "^1.0.10",
"it-all": "^1.0.5"
},
@ -75,9 +75,9 @@
}
},
"node_modules/@fluencelabs/fluence": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/@fluencelabs/fluence/-/fluence-0.11.0.tgz",
"integrity": "sha512-HfUS8eLwfviiJhqsrHnOnRxO20TbdahPreP6AkBXQaEpWeRew6vxAd0Dn+xdzy6KCJ4W9GOKLcgtPfqquIO2Pg==",
"version": "0.13.0",
"resolved": "https://registry.npmjs.org/@fluencelabs/fluence/-/fluence-0.13.0.tgz",
"integrity": "sha512-Dqhr7CAYeAO8Z5jR+mbGu0cVZjkE06cM2L8n9bQWe4T4y2B83ZxUmrs/OTWlYnsLd1Sr2YdDlnyZeUvWLEEmrQ==",
"dependencies": {
"@chainsafe/libp2p-noise": "4.0.0",
"@fluencelabs/avm": "0.14.4",
@ -93,7 +93,6 @@
"libp2p-websockets": "0.16.1",
"loglevel": "1.7.0",
"multiaddr": "10.0.0",
"noble-ed25519": "^1.2.5",
"peer-id": "0.15.3",
"uuid": "8.3.0"
}
@ -1879,11 +1878,6 @@
"node": ">= 0.4.0"
}
},
"node_modules/noble-ed25519": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/noble-ed25519/-/noble-ed25519-1.2.5.tgz",
"integrity": "sha512-7vst+4UhM5QU3jJ3pUqPMKBCOePrxBojmoQa59qcSnYvjFF/T4jqb4WISlfslcWyBw7G5H9V/acpcAxMd8DzUQ=="
},
"node_modules/node-addon-api": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz",
@ -2653,9 +2647,9 @@
}
},
"@fluencelabs/fluence": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/@fluencelabs/fluence/-/fluence-0.11.0.tgz",
"integrity": "sha512-HfUS8eLwfviiJhqsrHnOnRxO20TbdahPreP6AkBXQaEpWeRew6vxAd0Dn+xdzy6KCJ4W9GOKLcgtPfqquIO2Pg==",
"version": "0.13.0",
"resolved": "https://registry.npmjs.org/@fluencelabs/fluence/-/fluence-0.13.0.tgz",
"integrity": "sha512-Dqhr7CAYeAO8Z5jR+mbGu0cVZjkE06cM2L8n9bQWe4T4y2B83ZxUmrs/OTWlYnsLd1Sr2YdDlnyZeUvWLEEmrQ==",
"requires": {
"@chainsafe/libp2p-noise": "4.0.0",
"@fluencelabs/avm": "0.14.4",
@ -2671,7 +2665,6 @@
"libp2p-websockets": "0.16.1",
"loglevel": "1.7.0",
"multiaddr": "10.0.0",
"noble-ed25519": "^1.2.5",
"peer-id": "0.15.3",
"uuid": "8.3.0"
}
@ -4175,11 +4168,6 @@
"resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz",
"integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg=="
},
"noble-ed25519": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/noble-ed25519/-/noble-ed25519-1.2.5.tgz",
"integrity": "sha512-7vst+4UhM5QU3jJ3pUqPMKBCOePrxBojmoQa59qcSnYvjFF/T4jqb4WISlfslcWyBw7G5H9V/acpcAxMd8DzUQ=="
},
"node-addon-api": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz",

View File

@ -14,7 +14,7 @@
],
"dependencies": {
"@fluencelabs/aqua-lib": "^0.1.9",
"@fluencelabs/fluence": "^0.11.0",
"@fluencelabs/fluence": "^0.13.0",
"@fluencelabs/fluence-network-environment": "^1.0.10",
"it-all": "^1.0.5"
},

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
import { setLogLevel, FluencePeer } from "@fluencelabs/fluence";
import { setLogLevel, Fluence } from "@fluencelabs/fluence";
import { krasnodar, Node } from "@fluencelabs/fluence-network-environment";
import { get_price, get_price_par } from "./_aqua/get_crypto_prices";
@ -47,8 +47,8 @@ async function main() {
await Fluence.start({ connectTo: krasnodar[2] });
console.log(
"created a fluence client %s with relay %s",
FluencePeer.default.connectionInfo.selfPeerId,
FluencePeer.default.connectionInfo.connectedRelay
Fluence.getStatus().peerId,
Fluence.getStatus().relayPeerId
);
const network_result = await get_price(
@ -68,6 +68,8 @@ async function main() {
);
console.log("par result: ", network_result_par);
await Fluence.stop();
return;
}