Skip to content

Commit 06420d7

Browse files
committed
Merge branch 'p2p' of https://github.com/oceanprotocol/ocean.js into p2p
2 parents 9cda783 + 8f165ef commit 06420d7

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

CodeExamples.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ import {
104104
sendTx,
105105
ConfigHelper,
106106
configHelperNetworks,
107+
getNodeEndpointConfig,
107108
amountToUnits,
108109
getEventFromTx,
109110
LoggerInstance
@@ -206,9 +207,7 @@ Next, we define the metadata that will describe our data asset. This is what we
206207
const config = new ConfigHelper().getConfig(
207208
parseInt(String((await publisherAccount.provider.getNetwork()).chainId))
208209
)
209-
if (process.env.NODE_URL) {
210-
config.oceanNodeUri = process.env.NODE_URL
211-
}
210+
Object.assign(config, getNodeEndpointConfig())
212211
aquarius = new Aquarius(config?.oceanNodeUri)
213212
providerUrl = config?.oceanNodeUri
214213
addresses = JSON.parse(

ComputeExamples.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ import {
143143
sendTx,
144144
configHelperNetworks,
145145
ConfigHelper,
146+
getNodeEndpointConfig,
146147
getEventFromTx,
147148
amountToUnits,
148149
isDefined,
@@ -436,9 +437,7 @@ We need to load the configuration. Add the following code into your `run(){ }` f
436437
const config = new ConfigHelper().getConfig(
437438
parseInt(String((await publisherAccount.provider.getNetwork()).chainId))
438439
)
439-
if (process.env.NODE_URL) {
440-
config.oceanNodeUri = process.env.NODE_URL
441-
}
440+
Object.assign(config, getNodeEndpointConfig())
442441
aquariusInstance = new Aquarius(config?.oceanNodeUri)
443442
providerUrl = config?.oceanNodeUri
444443
addresses = JSON.parse(

0 commit comments

Comments
 (0)