Skip to content

Commit

Permalink
chore: update sdk version
Browse files Browse the repository at this point in the history
  • Loading branch information
r-marques committed Apr 19, 2023
1 parent e056cc0 commit f25fcf2
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@nestjs/typeorm": "^8.0.3",
"@nevermined-io/argo-workflows-api": "^0.1.3",
"@nevermined-io/passport-nevermined": "^0.1.1",
"@nevermined-io/sdk": "1.3.3",
"@nevermined-io/sdk": "1.3.4-rc0",
"@nevermined-io/sdk-dtp": "^0.4.4",
"@sideway/address": "^4.1.3",
"@sideway/formula": "^3.0.1",
Expand Down
4 changes: 3 additions & 1 deletion src/access/access.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,16 @@ export class AccessController {
throw new NotFoundException(`Agreement ${transferData.agreementId} not found`)
}

console.log(transferData)
const subscriptionDDO = await this.nvmService.nevermined.assets.resolve(agreement.did)
const duration = await this.nvmService.getDuration(subscriptionDDO)

let expiration = 0
if (duration > 0) {
const currentBlockNumber = await this.nvmService.nevermined.web3.getBlockNumber()
expiration = currentBlockNumber + duration
} else {
// TODO: Remove this once the subscription contract is fixed to accept _expirationBlock = 0
expiration = 1_000_000_000_000
}

const params: ValidationParams = {
Expand Down
24 changes: 24 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1399,6 +1399,30 @@
uuid "^3.4.0"
whatwg-url "^7.1.0"

"@nevermined-io/sdk@1.3.4-rc0":
version "1.3.4-rc0"
resolved "https://registry.yarnpkg.com/@nevermined-io/sdk/-/sdk-1.3.4-rc0.tgz#276983be3019553c476ff264662d4c3fe07fa72a"
integrity sha512-9GzFTEwNcWa+aOnJToB3D0a40C9djp1dWq1MJL14byjP4OwqZgWBWqxqkCD41e+WRI+PXN9xECWO60F26c2Pyg==
dependencies:
"@nevermined-io/subgraphs" "0.5.0"
assert "^2.0.0"
codegen-graph-ts "npm:@nevermined-io/codegen-graph-ts@0.1.4"
crypto-browserify "^3.12.0"
deprecated-decorator "^0.1.6"
ethers "^5.6.9"
https-browserify "^1.0.0"
jose "^4.5.1"
js-file-download "^0.4.12"
node-fetch "^2.6.1"
os-browserify "^0.3.0"
path-browserify "^1.0.1"
save-file "^2.3.1"
stream-browserify "^3.0.0"
stream-http "^3.2.0"
url "^0.11.0"
uuid "^3.4.0"
whatwg-url "^7.1.0"

"@nevermined-io/subgraphs@0.5.0":
version "0.5.0"
resolved "https://registry.npmjs.org/@nevermined-io/subgraphs/-/subgraphs-0.5.0.tgz"
Expand Down

0 comments on commit f25fcf2

Please sign in to comment.