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:
parent
a06a5c5cab
commit
3255ce173a
@ -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}`
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user