Skip to content
This repository was archived by the owner on Oct 19, 2023. It is now read-only.

Commit 663e47a

Browse files
authored
Merge pull request #311 from nevermined-io/update/getCurrentAccount
Update/get current account
2 parents d91af20 + a756026 commit 663e47a

File tree

5 files changed

+32
-14
lines changed

5 files changed

+32
-14
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,28 @@ All notable changes to this project will be documented in this file. Dates are d
44

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

7+
#### [v1.7.3](https://github.com/nevermined-io/components-catalog/compare/v1.7.2...v1.7.3)
8+
9+
> 30 June 2023
10+
11+
- Feature/support auth message user profile [`#309`](https://github.com/nevermined-io/components-catalog/pull/309)
12+
- Adding v1.7.0 Changelog updates [`43bf6b8`](https://github.com/nevermined-io/components-catalog/commit/43bf6b83da634421a6477b1820810c558e77e16c)
13+
- add sign message to user profile [`6bbdbaf`](https://github.com/nevermined-io/components-catalog/commit/6bbdbafa2e6134c4e56eaf13133c40d797a1a4cc)
14+
15+
#### [v1.7.2](https://github.com/nevermined-io/components-catalog/compare/v1.7.1...v1.7.2)
16+
17+
> 29 June 2023
18+
19+
- feat: added ability to add a message when asking the user to sign [`#308`](https://github.com/nevermined-io/components-catalog/pull/308)
20+
- fix: documentation [`87b4993`](https://github.com/nevermined-io/components-catalog/commit/87b4993dbb7d33d247803ea3fb558deefdc10b7d)
21+
- fix: dependencies [`565c661`](https://github.com/nevermined-io/components-catalog/commit/565c661c86d276ee2a31bea026359261d1b8a91b)
22+
23+
#### [v1.7.1](https://github.com/nevermined-io/components-catalog/compare/v1.7.0...v1.7.1)
24+
25+
> 22 June 2023
26+
27+
- feat: update sdk to version 1.5.2 [`#307`](https://github.com/nevermined-io/components-catalog/pull/307)
28+
729
#### [v1.7.0](https://github.com/nevermined-io/components-catalog/compare/v1.7.0-rc1...v1.7.0)
830

931
> 13 June 2023

catalog/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "@nevermined-io/catalog",
3-
"version": "1.7.3",
3+
"version": "1.8.0",
44
"main": "./dist/index.js",
55
"types": "./dist/index.d.ts",
66
"dependencies": {
7-
"@nevermined-io/sdk": "^1.5.3",
8-
"@nevermined-io/sdk-dtp": "^0.5.1",
7+
"@nevermined-io/sdk": "^1.5.4",
8+
"@nevermined-io/sdk-dtp": "^0.5.2",
99
"@types/jsonwebtoken": "^8.5.8",
1010
"axios": "^0.27.2",
1111
"axios-retry": "^3.3.1",

catalog/src/utils/index.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,12 @@ import axiosRetry from 'axios-retry'
1919
export const isEmptyObject = (i: any) => !i || Object.keys(i).length < 1
2020

2121
/**
22-
* Returns current account registered in SDK
22+
* Returns account object by passing an account address
2323
* @param sdk Instance of SDK object
24+
* @param accountAddress Account address
2425
*/
25-
export const getCurrentAccount = async (sdk: Nevermined, index = 0) => {
26-
let accounts: Account[] = []
27-
if (sdk.accounts) {
28-
accounts = await sdk.accounts.list()
29-
}
30-
31-
return accounts[index]
26+
export const getAccountObject = async (sdk: Nevermined, accountAddress: string) => {
27+
return sdk.accounts.getAccount(accountAddress)
3228
}
3329

3430
type Template = 'accessTemplate' | 'nft721AccessTemplate' | 'nftAccessTemplate' | 'nftSalesTemplate'

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@
105105
]
106106
},
107107
"dependencies": {
108-
"@nevermined-io/sdk": "^1.5.3",
109-
"@nevermined-io/sdk-dtp": "^0.5.1",
108+
"@nevermined-io/sdk": "^1.5.4",
109+
"@nevermined-io/sdk-dtp": "^0.5.2",
110110
"@types/jsonwebtoken": "^8.5.8",
111111
"@wagmi/core": "^0.8.15",
112112
"axios": "^0.27.2",

providers/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@nevermined-io/providers",
33
"private": false,
4-
"version": "1.7.3",
4+
"version": "1.8.0",
55
"main": "./dist/index.js",
66
"types": "./dist/index.d.ts",
77
"dependencies": {

0 commit comments

Comments
 (0)