1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00

Updating CodeExamples.md

This commit is contained in:
GitHub Actions Bot 2022-06-06 16:41:43 +00:00
parent 153baef87f
commit f8ba8b7f41

View File

@ -614,7 +614,7 @@ Now let's console log the DID to check everything is working
### 7.3 Marketplace displays fixed rate asset for sale
```Typescript
const fixedRate = new FixedRateExchange(web3, freAddress)
const fixedRate = new FixedRateExchange(freAddress, web3)
const oceanAmount = await (
await fixedRate.calcBaseInGivenOutDT(freId, '1')
).baseTokenAmount
@ -655,7 +655,7 @@ Before we call the contract we have to call `approve` so that the contract can m
DATATOKEN_AMOUNT
)
const fixedRate = new FixedRateExchange(web3, freAddress)
const fixedRate = new FixedRateExchange(freAddress, web3)
```
Now we can make the contract call
```Typescript
@ -826,7 +826,7 @@ Now we need to encrypt file(s) using provider
### 8.3 Consumer gets a dispenser data asset, and downloads it
```Typescript
const datatoken = new Datatoken(web3)
const dispenser = new Dispenser(web3, null, addresses.Dispenser)
const dispenser = new Dispenser(addresses.Dispenser, web3)
let consumerDTBalance = await balance(
web3,