Skip to content

Commit

Permalink
Merge pull request #690 from nevermined-io/fix/update-metadata
Browse files Browse the repository at this point in the history
Fix/update metadata
  • Loading branch information
eruizgar91 authored Jul 11, 2024
2 parents 99bdc33 + f97c839 commit 210e7fa
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 15 deletions.
24 changes: 20 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v3.0.17-rc1](https://github.com/nevermined-io/sdk-js/compare/v3.0.17-rc0...v3.0.17-rc1)

> 11 July 2024
- feat: move code and debug [`5b81b36`](https://github.com/nevermined-io/sdk-js/commit/5b81b36b59e2115b944ad38fe26274eba20bd62d)
- Automated CHANGELOG.md update [`0e43079`](https://github.com/nevermined-io/sdk-js/commit/0e43079df13c681d6656527828a6369dd183bf83)
- fix: build [`b5caa1e`](https://github.com/nevermined-io/sdk-js/commit/b5caa1e2d66f8bfda4cd5eb736df473ba1b91579)

#### [v3.0.17-rc0](https://github.com/nevermined-io/sdk-js/compare/v3.0.16...v3.0.17-rc0)

> 11 July 2024
- docs: updating documentation [skip actions] [`99bdc33`](https://github.com/nevermined-io/sdk-js/commit/99bdc334b53f3e411ac12aa4574b46d7fc06f192)
- fix: update method to allow list/unlist of assets [`dee69c0`](https://github.com/nevermined-io/sdk-js/commit/dee69c04d9dc77789c35dcfe2f859095257e213b)
- feat: bumpversion [`c73c788`](https://github.com/nevermined-io/sdk-js/commit/c73c7883c0c469035b720253603ad99dc5d28e40)

#### [v3.0.16](https://github.com/nevermined-io/sdk-js/compare/v3.0.16-rc3...v3.0.16)

> 3 July 2024
Expand Down Expand Up @@ -2076,7 +2092,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

> 2 May 2022
- add aave service agreement to ddo when creating nft721 asset [`#248`](https://github.com/nevermined-io/sdk-js/pull/248)
- add aave service agreement to ddo when creating nft721 asset [`#248`](https://github.com/nevermined-io/sdk-js/pull/248)
- Adding v0.19.21 Changelog updates [`c93cdc5`](https://github.com/nevermined-io/sdk-js/commit/c93cdc55f139a43db4130ccb0f80924d2645a931)

#### [v0.19.21](https://github.com/nevermined-io/sdk-js/compare/v0.19.20...v0.19.21)
Expand Down Expand Up @@ -2339,7 +2355,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

> 18 January 2022
- Removing not used parameter [`#186`](https://github.com/nevermined-io/sdk-js/pull/186)
- Removing not used parameter [`#186`](https://github.com/nevermined-io/sdk-js/pull/186)
- [wip] Create agreement+pay in one transaction [`#183`](https://github.com/nevermined-io/sdk-js/pull/183)
- Adapting to contracts `v1.3.3` [`#177`](https://github.com/nevermined-io/sdk-js/pull/177)
- Adding v0.17.2 Changelog updates [`5eddda4`](https://github.com/nevermined-io/sdk-js/commit/5eddda43954e013e6e6f7344c9a877d801aacb5c)
Expand Down Expand Up @@ -2845,7 +2861,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Feature/sync develop [`#268`](https://github.com/nevermined-io/sdk-js/pull/268)
- Quick fix for non-eip1559 networks [`#266`](https://github.com/nevermined-io/sdk-js/pull/266)
- integrate Permissions and refactor search query [`#264`](https://github.com/nevermined-io/sdk-js/pull/264)
- add aave service agreement to ddo when creating nft721 asset [`#248`](https://github.com/nevermined-io/sdk-js/pull/248)
- add aave service agreement to ddo when creating nft721 asset [`#248`](https://github.com/nevermined-io/sdk-js/pull/248)
- Get the keeper version from the artifacts instead of package version [`#244`](https://github.com/nevermined-io/sdk-js/pull/244)
- replace `metadata-api` url by `marketplace-api` and sort type [`#243`](https://github.com/nevermined-io/sdk-js/pull/243)
- fixing issues with BigNumbers [`#246`](https://github.com/nevermined-io/sdk-js/pull/246)
Expand Down Expand Up @@ -2884,7 +2900,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Feature/190 add did to sec markets [`#191`](https://github.com/nevermined-io/sdk-js/pull/191)
- Adding utility methods for getting nft token uri [`#189`](https://github.com/nevermined-io/sdk-js/pull/189)
- Lint ... [`#187`](https://github.com/nevermined-io/sdk-js/pull/187)
- Removing not used parameter [`#186`](https://github.com/nevermined-io/sdk-js/pull/186)
- Removing not used parameter [`#186`](https://github.com/nevermined-io/sdk-js/pull/186)
- [wip] Create agreement+pay in one transaction [`#183`](https://github.com/nevermined-io/sdk-js/pull/183)
- Adapting to contracts `v1.3.3` [`#177`](https://github.com/nevermined-io/sdk-js/pull/177)
- Correct typo in route [`#184`](https://github.com/nevermined-io/sdk-js/pull/184)
Expand Down
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.16",
"version": "3.0.17",
"description": "Javascript SDK for connecting with Nevermined Data Platform ",
"main": "./dist/node/sdk.js",
"typings": "./dist/node/sdk.d.ts",
Expand Down
20 changes: 10 additions & 10 deletions src/nevermined/api/RegistryBaseApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -444,21 +444,21 @@ export abstract class RegistryBaseApi extends Instantiable {
publishMetadataOptions,
))
if (ddoVersion.immutableBackend) ddo._nvm.versions[lastIndex + 1] = ddoVersion

observer.next(UpdateProgressStep.UpdatingAssetOnChain)
await this.nevermined.keeper.didRegistry.updateMetadataUrl(
ddo.id,
checksum,
from,
metadataService.serviceEndpoint,
ddoVersion.immutableUrl,
txParams,
)
} catch (error) {
this.logger.log(`Unable to publish immutable content`)
}
}

observer.next(UpdateProgressStep.UpdatingAssetOnChain)
await this.nevermined.keeper.didRegistry.updateMetadataUrl(
ddo.id,
checksum,
from,
metadataService.serviceEndpoint,
ddoVersion.immutableUrl,
txParams,
)

observer.next(UpdateProgressStep.StoringDDOMarketplaceAPI)
const storedDdo = await this.nevermined.services.metadata.updateDDO(ddo.id, ddo)

Expand Down

0 comments on commit 210e7fa

Please sign in to comment.