Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
aaitor committed May 2, 2024
1 parent 2bb06e6 commit b4746e7
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 23 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nevermined-io/sdk",
"version": "3.0.0-rc25",
"version": "3.0.0",
"description": "Javascript SDK for connecting with Nevermined Data Platform ",
"main": "./dist/node/sdk.js",
"typings": "./dist/node/sdk.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/keeper/contracts/DIDRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ export class DIDRegistry extends ContractBase {
public async getProvenanceEntry(provId: string) {
const provenance: ProvenanceRegistry = await this.call('getProvenanceEntry', [zeroX(provId)])
const did = provenance[0]
console.log(provenance)

if (did.match(/^0x0+$/)) {
return
}
Expand Down
1 change: 0 additions & 1 deletion src/keeper/contracts/managers/ConditionStoreManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ export class ConditionStoreManager extends ContractBase {

public async getCondition(conditionId: string) {
const a: any = await this.call('getCondition', [zeroX(conditionId)])
console.log('Condition: ', a)
return {
typeRef: a[0], //a.typeRef,
state: Number(a[1]), //Number(a.state),
Expand Down
13 changes: 0 additions & 13 deletions src/nevermined/NvmApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,20 +168,12 @@ export class NvmApp {
config.zeroDevProjectId,
)
this.userAccount = await NvmAccount.fromZeroDevSigner(kernelClient)
// this.zeroDevSignerAccount = smartAccountSigner
// this.useZeroDevSigner = true
} else if (account instanceof NvmAccount) {
this.userAccount = account
} else {
this.userAccount = this.fullSDK.accounts.getAccount(account as string)
}

console.log(
`Using account: ${this.userAccount.getAddress()} with type ${
this.userAccount.accountType.signerType
}`,
)

if (
config &&
config.marketplaceAuthToken &&
Expand All @@ -193,16 +185,13 @@ export class NvmApp {
this.userAccount,
message,
)
console.log('Client assertion: ', clientAssertion)

this.loginCredentials = await this.fullSDK.services.marketplace.login(clientAssertion)
console.log('Login credentials: ', this.loginCredentials)
}

const nodeInfo = await this.fullSDK.services.node.getNeverminedNodeInfo()
this.assetProviders = [nodeInfo['provider-address']]

console.log('Asset Providers: ', this.assetProviders)
if (!isValidAddress(this.configNVM.nftContractAddress as string)) {
const contractABI = await ContractHandler.getABIArtifact(
'NFT1155SubscriptionUpgradeable',
Expand Down Expand Up @@ -644,8 +633,6 @@ export class NvmApp {
const numberCredits = salesService.attributes.main.nftAttributes.amount

const subscriptionOwner = await this.fullSDK.assets.owner(subscriptionDid)
console.log(`Subscription Owner: ${subscriptionOwner}`)
console.log(`User Address: ${address}`)
const balance = await this.fullSDK.nfts1155.balance(subscriptionDid, address)
const isOwner = address.toLowerCase() === subscriptionOwner.toLowerCase()
const canAccess = isOwner || balance >= numberCredits
Expand Down
4 changes: 0 additions & 4 deletions src/nevermined/api/ConditionsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,6 @@ export class ConditionsApi extends Instantiable {
const duration = DDO.getDurationFromService(service)
const expirationBlock =
duration > 0 ? Number(await this.client.public.getBlockNumber()) + duration : 0
console.log(`ConditionsApi :: transferNft with expiration block = ${expirationBlock}`)

const params = template.params(
accessConsumer,
Expand Down Expand Up @@ -497,9 +496,6 @@ export class ConditionsApi extends Instantiable {
const duration = DDO.getDurationFromService(service) || 0
const expirationBlock =
duration > 0 ? Number(await this.client.public.getBlockNumber()) + duration : 0
console.log(
`ConditionsApi :: transferNftForDelegate with expiration block = ${expirationBlock}`,
)

const params = template.params(
accessConsumer,
Expand Down
2 changes: 0 additions & 2 deletions src/nevermined/utils/ServiceAgreement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export class ServiceAgreement extends Instantiable {
throw new Error('TemplateId not found in DDO.')
}

console.log(`Signing service agreement`)
const serviceAgreementHashSignature = await this.createHashSignature(
service.templateId,
serviceAgreementId,
Expand Down Expand Up @@ -57,7 +56,6 @@ export class ServiceAgreement extends Instantiable {
timeoutValues,
)

console.log(`Signing text using agreement: ${serviceAgreementHash}`)
const serviceAgreementHashSignature = await this.nevermined.utils.signature.signText(
getBytes(serviceAgreementHash),
consumer,
Expand Down
1 change: 0 additions & 1 deletion src/nevermined/utils/WebServiceConnector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ export class WebServiceConnector {
}

public async uploadFile(url: string, data: ReadStream, encrypt?: boolean): Promise<any> {
console.log(`Trying to upload file`)
const form = new FormData()
form.append('file', data)
if (encrypt) {
Expand Down

0 comments on commit b4746e7

Please sign in to comment.