mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
remove console.logs
This commit is contained in:
parent
88fea271da
commit
4e0536a1f8
@ -382,22 +382,18 @@ export class Provider {
|
|||||||
if (validUntil) initializeUrl += '&validUntil=' + validUntil
|
if (validUntil) initializeUrl += '&validUntil=' + validUntil
|
||||||
let response
|
let response
|
||||||
try {
|
try {
|
||||||
console.log('ProviderInitialize url: ', initializeUrl)
|
|
||||||
response = await fetch(initializeUrl, {
|
response = await fetch(initializeUrl, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
signal
|
signal
|
||||||
})
|
})
|
||||||
console.log('response: ', response)
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log('error: ', e)
|
|
||||||
LoggerInstance.error('Provider initialized failed: ')
|
LoggerInstance.error('Provider initialized failed: ')
|
||||||
LoggerInstance.error(e)
|
LoggerInstance.error(e)
|
||||||
throw new Error(`Provider initialize failed url: ${initializeUrl} `)
|
throw new Error(`Provider initialize failed url: ${initializeUrl} `)
|
||||||
}
|
}
|
||||||
if (response?.ok) {
|
if (response?.ok) {
|
||||||
const results: ProviderInitialize = await response.json()
|
const results: ProviderInitialize = await response.json()
|
||||||
console.log('results: ', results)
|
|
||||||
return results
|
return results
|
||||||
}
|
}
|
||||||
const resolvedResponse = await response.json()
|
const resolvedResponse = await response.json()
|
||||||
@ -407,7 +403,6 @@ export class Provider {
|
|||||||
response.statusText,
|
response.statusText,
|
||||||
resolvedResponse
|
resolvedResponse
|
||||||
)
|
)
|
||||||
console.log('resolvedResponse: ', resolvedResponse)
|
|
||||||
throw new Error(JSON.stringify(resolvedResponse))
|
throw new Error(JSON.stringify(resolvedResponse))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +79,6 @@ const ifpsFile: Files = {
|
|||||||
{
|
{
|
||||||
type: 'ipfs',
|
type: 'ipfs',
|
||||||
hash: 'QmRhsp7eghZtW4PktPC2wAHdKoy2LiF1n6UXMKmAhqQJUA'
|
hash: 'QmRhsp7eghZtW4PktPC2wAHdKoy2LiF1n6UXMKmAhqQJUA'
|
||||||
// not exists anymore? 'QmdMBw956S3i2H2ioS9cERrtxoLJuSsfjzCvkqoDgUa2xm'
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -292,7 +291,6 @@ describe('Publish consume test', async () => {
|
|||||||
|
|
||||||
resolvedIpfsAssetDdo = await aquarius.waitForAqua(ipfsAssetId)
|
resolvedIpfsAssetDdo = await aquarius.waitForAqua(ipfsAssetId)
|
||||||
assert(resolvedIpfsAssetDdo, 'Cannot fetch ipfs DDO from Aquarius')
|
assert(resolvedIpfsAssetDdo, 'Cannot fetch ipfs DDO from Aquarius')
|
||||||
console.log('RESOLVE: resolvedIpfsAssetDdo: ', resolvedIpfsAssetDdo)
|
|
||||||
|
|
||||||
resolvedOnchainAssetDdo = await aquarius.waitForAqua(onchainAssetId)
|
resolvedOnchainAssetDdo = await aquarius.waitForAqua(onchainAssetId)
|
||||||
assert(resolvedOnchainAssetDdo, 'Cannot fetch onchain DDO from Aquarius')
|
assert(resolvedOnchainAssetDdo, 'Cannot fetch onchain DDO from Aquarius')
|
||||||
@ -372,7 +370,6 @@ describe('Publish consume test', async () => {
|
|||||||
}).timeout(40000)
|
}).timeout(40000)
|
||||||
|
|
||||||
it('Should order ipfs dataset', async () => {
|
it('Should order ipfs dataset', async () => {
|
||||||
console.log('ORDER resolvedIpfsAssetDdo: ', resolvedIpfsAssetDdo)
|
|
||||||
ipfsOrderTx = await orderAsset(
|
ipfsOrderTx = await orderAsset(
|
||||||
resolvedIpfsAssetDdo.id,
|
resolvedIpfsAssetDdo.id,
|
||||||
resolvedIpfsAssetDdo.services[0].datatokenAddress,
|
resolvedIpfsAssetDdo.services[0].datatokenAddress,
|
||||||
|
@ -174,15 +174,6 @@ export async function orderAsset(
|
|||||||
datatoken: Datatoken,
|
datatoken: Datatoken,
|
||||||
providerUrl: string
|
providerUrl: string
|
||||||
) {
|
) {
|
||||||
console.log('Before providerInitialize')
|
|
||||||
console.log(did)
|
|
||||||
console.log(datatokenAddress)
|
|
||||||
console.log(consumerAccount)
|
|
||||||
console.log(serviceId)
|
|
||||||
console.log(serviceIndex)
|
|
||||||
console.log(datatoken)
|
|
||||||
console.log(providerUrl)
|
|
||||||
console.log('--------------------------------------------------------')
|
|
||||||
const initializeData = await ProviderInstance.initialize(
|
const initializeData = await ProviderInstance.initialize(
|
||||||
did,
|
did,
|
||||||
serviceId,
|
serviceId,
|
||||||
@ -191,8 +182,6 @@ export async function orderAsset(
|
|||||||
providerUrl
|
providerUrl
|
||||||
)
|
)
|
||||||
|
|
||||||
console.log('initializeData: ', initializeData)
|
|
||||||
|
|
||||||
const providerFees: ProviderFees = {
|
const providerFees: ProviderFees = {
|
||||||
providerFeeAddress: initializeData.providerFee.providerFeeAddress,
|
providerFeeAddress: initializeData.providerFee.providerFeeAddress,
|
||||||
providerFeeToken: initializeData.providerFee.providerFeeToken,
|
providerFeeToken: initializeData.providerFee.providerFeeToken,
|
||||||
@ -203,7 +192,6 @@ export async function orderAsset(
|
|||||||
providerData: initializeData.providerFee.providerData,
|
providerData: initializeData.providerFee.providerData,
|
||||||
validUntil: initializeData.providerFee.validUntil
|
validUntil: initializeData.providerFee.validUntil
|
||||||
}
|
}
|
||||||
console.log('providerFees: ', providerFees)
|
|
||||||
|
|
||||||
// make the payment
|
// make the payment
|
||||||
const tx = await datatoken.startOrder(
|
const tx = await datatoken.startOrder(
|
||||||
@ -212,9 +200,7 @@ export async function orderAsset(
|
|||||||
0,
|
0,
|
||||||
providerFees
|
providerFees
|
||||||
)
|
)
|
||||||
console.log('tx: ', tx)
|
|
||||||
const orderTx = await tx.wait()
|
const orderTx = await tx.wait()
|
||||||
console.log('orderTx: ', orderTx)
|
|
||||||
const orderStartedTx = getEventFromTx(orderTx, 'OrderStarted')
|
const orderStartedTx = getEventFromTx(orderTx, 'OrderStarted')
|
||||||
return orderStartedTx
|
return orderStartedTx
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user