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

small changes for order

This commit is contained in:
paulo-ocean 2024-09-17 12:53:06 +01:00
parent a06a5c5cab
commit 3255ce173a
2 changed files with 4 additions and 3 deletions

View File

@ -510,7 +510,7 @@ export class Provider {
)) + 1
).toString()
const signature = await this.signProviderRequest(signer, did + nonce)
const signature = await this.signProviderRequest(signer, did + nonce) // did + nonce
let consumeUrl = downloadUrl
consumeUrl += `?fileIndex=${fileIndex}`
consumeUrl += `&documentId=${did}`

View File

@ -66,6 +66,7 @@ export async function orderAsset(
)
const templateIndex = await datatoken.getId(asset.datatokens[datatokenIndex].address)
const fixedRates = await datatoken.getFixedRates(
asset.datatokens[datatokenIndex].address
)
@ -137,7 +138,7 @@ export async function orderAsset(
orderParams._consumeMarketFee
)
}
if (templateIndex === 2) {
if (templateIndex === 2 || templateIndex === 4) {
return await datatoken.buyFromDispenserAndOrder(
asset.services[serviceIndex].datatokenAddress,
orderParams,
@ -210,7 +211,7 @@ export async function orderAsset(
orderParams._consumeMarketFee
)
}
if (templateIndex === 2) {
if (templateIndex === 2 || templateIndex === 4) {
const tx: any = await approve(
consumerAccount,
config,