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
|
||||
let response
|
||||
try {
|
||||
console.log('ProviderInitialize url: ', initializeUrl)
|
||||
response = await fetch(initializeUrl, {
|
||||
method: 'GET',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
signal
|
||||
})
|
||||
console.log('response: ', response)
|
||||
} catch (e) {
|
||||
console.log('error: ', e)
|
||||
LoggerInstance.error('Provider initialized failed: ')
|
||||
LoggerInstance.error(e)
|
||||
throw new Error(`Provider initialize failed url: ${initializeUrl} `)
|
||||
}
|
||||
if (response?.ok) {
|
||||
const results: ProviderInitialize = await response.json()
|
||||
console.log('results: ', results)
|
||||
return results
|
||||
}
|
||||
const resolvedResponse = await response.json()
|
||||
@ -407,7 +403,6 @@ export class Provider {
|
||||
response.statusText,
|
||||
resolvedResponse
|
||||
)
|
||||
console.log('resolvedResponse: ', resolvedResponse)
|
||||
throw new Error(JSON.stringify(resolvedResponse))
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,6 @@ const ifpsFile: Files = {
|
||||
{
|
||||
type: 'ipfs',
|
||||
hash: 'QmRhsp7eghZtW4PktPC2wAHdKoy2LiF1n6UXMKmAhqQJUA'
|
||||
// not exists anymore? 'QmdMBw956S3i2H2ioS9cERrtxoLJuSsfjzCvkqoDgUa2xm'
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -292,7 +291,6 @@ describe('Publish consume test', async () => {
|
||||
|
||||
resolvedIpfsAssetDdo = await aquarius.waitForAqua(ipfsAssetId)
|
||||
assert(resolvedIpfsAssetDdo, 'Cannot fetch ipfs DDO from Aquarius')
|
||||
console.log('RESOLVE: resolvedIpfsAssetDdo: ', resolvedIpfsAssetDdo)
|
||||
|
||||
resolvedOnchainAssetDdo = await aquarius.waitForAqua(onchainAssetId)
|
||||
assert(resolvedOnchainAssetDdo, 'Cannot fetch onchain DDO from Aquarius')
|
||||
@ -372,7 +370,6 @@ describe('Publish consume test', async () => {
|
||||
}).timeout(40000)
|
||||
|
||||
it('Should order ipfs dataset', async () => {
|
||||
console.log('ORDER resolvedIpfsAssetDdo: ', resolvedIpfsAssetDdo)
|
||||
ipfsOrderTx = await orderAsset(
|
||||
resolvedIpfsAssetDdo.id,
|
||||
resolvedIpfsAssetDdo.services[0].datatokenAddress,
|
||||
|
@ -174,15 +174,6 @@ export async function orderAsset(
|
||||
datatoken: Datatoken,
|
||||
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(
|
||||
did,
|
||||
serviceId,
|
||||
@ -191,8 +182,6 @@ export async function orderAsset(
|
||||
providerUrl
|
||||
)
|
||||
|
||||
console.log('initializeData: ', initializeData)
|
||||
|
||||
const providerFees: ProviderFees = {
|
||||
providerFeeAddress: initializeData.providerFee.providerFeeAddress,
|
||||
providerFeeToken: initializeData.providerFee.providerFeeToken,
|
||||
@ -203,7 +192,6 @@ export async function orderAsset(
|
||||
providerData: initializeData.providerFee.providerData,
|
||||
validUntil: initializeData.providerFee.validUntil
|
||||
}
|
||||
console.log('providerFees: ', providerFees)
|
||||
|
||||
// make the payment
|
||||
const tx = await datatoken.startOrder(
|
||||
@ -212,9 +200,7 @@ export async function orderAsset(
|
||||
0,
|
||||
providerFees
|
||||
)
|
||||
console.log('tx: ', tx)
|
||||
const orderTx = await tx.wait()
|
||||
console.log('orderTx: ', orderTx)
|
||||
const orderStartedTx = getEventFromTx(orderTx, 'OrderStarted')
|
||||
return orderStartedTx
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user