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

Commit fb52fe4

Browse files
authored
Merge pull request #280 from nevermined-io/update/sdk-1.3.3
Update sdk to 1.3.3 version and Connectkit
2 parents 099fc1a + 4e3a123 commit fb52fe4

File tree

6 files changed

+407
-133
lines changed

6 files changed

+407
-133
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ 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.3.0](https://github.com/nevermined-io/components-catalog/compare/v1.2.0...v1.3.0)
8+
9+
> 24 March 2023
10+
11+
- Find associated datasets [`#277`](https://github.com/nevermined-io/components-catalog/pull/277)
12+
- implement find datasets associated to a subscriptions method [`29b03e5`](https://github.com/nevermined-io/components-catalog/commit/29b03e5d2e9b6b7ab4b6974a9ec2fb49b42f92d3)
13+
- Adding v1.2.0 Changelog updates [`f3cf25b`](https://github.com/nevermined-io/components-catalog/commit/f3cf25baefe59245a4582be2168b65e362625871)
14+
715
#### [v1.2.0](https://github.com/nevermined-io/components-catalog/compare/v1.1.10...v1.2.0)
816

917
> 20 March 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.3.1",
3+
"version": "1.3.2",
44
"main": "./dist/index.js",
55
"types": "./dist/index.d.ts",
66
"dependencies": {
7-
"@nevermined-io/sdk-dtp": "^0.4.3",
8-
"@nevermined-io/sdk": "^1.3.2",
7+
"@nevermined-io/sdk-dtp": "^0.4.4",
8+
"@nevermined-io/sdk": "^1.3.3",
99
"@types/jsonwebtoken": "^8.5.8",
1010
"axios": "^0.27.2",
1111
"axios-retry": "^3.3.1",

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,21 +105,21 @@
105105
]
106106
},
107107
"dependencies": {
108-
"@nevermined-io/sdk": "^1.3.2",
109-
"@nevermined-io/sdk-dtp": "^0.4.3",
108+
"@nevermined-io/sdk": "^1.3.3",
109+
"@nevermined-io/sdk-dtp": "^0.4.4",
110110
"@types/jsonwebtoken": "^8.5.8",
111111
"@wagmi/core": "^0.8.15",
112112
"axios": "^0.27.2",
113113
"axios-retry": "^3.3.1",
114-
"connectkit": "^1.1.1",
114+
"connectkit": "^1.2.2",
115115
"ethers": "^5.7.2",
116116
"js-file-download": "^0.4.12",
117117
"jsonwebtoken": "^8.5.1",
118118
"react": "18.2.0",
119119
"react-dom": "18.2.0",
120120
"tslib": "^2.3.0",
121121
"typescript": "^4.9.5",
122-
"wagmi": "^0.10.11"
122+
"wagmi": "^0.12.10"
123123
},
124124
"nx": {
125125
"targets": {}

providers/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
22
"name": "@nevermined-io/providers",
33
"private": false,
4-
"version": "1.3.1",
4+
"version": "1.3.2",
55
"main": "./dist/index.js",
66
"types": "./dist/index.d.ts",
77
"dependencies": {
88
"@wagmi/core": "^0.8.15",
9-
"connectkit": "^1.1.1",
9+
"connectkit": "^1.2.2",
1010
"ethers": "^5.7.2",
11-
"wagmi": "^0.10.11"
11+
"wagmi": "^0.12.10"
1212
},
1313
"resolutions": {
1414
"connectkit/react": "^18.2.0",
1515
"connectkit/react-dom": "^18.2.0",
16-
"wagmi": "^0.10.11"
16+
"wagmi": "^0.12.10"
1717
}
1818
}

providers/src/client.tsx

Lines changed: 1 addition & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import React, { useState, useEffect, createContext, useContext } from 'react'
22
import {
3-
configureChains,
43
Chain,
5-
createClient,
64
Client,
75
useAccount,
86
useConnect,
@@ -13,71 +11,8 @@ import {
1311
} from 'wagmi'
1412
import { Provider } from '@wagmi/core'
1513
import { ConnectKitProvider } from 'connectkit'
16-
import { WalletConnectConnector } from 'wagmi/connectors/walletConnect'
17-
import { MetaMaskConnector } from 'wagmi/connectors/metaMask'
18-
import { CoinbaseWalletConnector } from 'wagmi/connectors/coinbaseWallet'
19-
import { jsonRpcProvider } from 'wagmi/providers/jsonRpc'
20-
import ChainsConfig from './chain-config'
2114
import { ConnectKitProviderProps } from './types'
2215

23-
/**
24-
* function that build and return the wagmi client
25-
* @deprecated use `Wagmi.createClient` instead, [see here](https://docs.nevermined.io/docs/tutorials/login-wallet-provider)
26-
* @param appName App name required for Coinbase wallet. If appName is undefined Coinbase wallet won't be supported
27-
* @param autoConnect If it is true once that the dapp start to run it will try to connect to the wallet automatically. Default `true`
28-
* @param chainsConfig Config with all the available chains that can be used in the dapp. Default chains supported `Polygon Mainnet`, `Polygon Mumbai`, `spree (localhost)
29-
* @returns
30-
*/
31-
export const getClient = (
32-
appName = 'Nevermined',
33-
autoConnect = true,
34-
chainsConfig = ChainsConfig,
35-
) => {
36-
const { provider, chains } = configureChains(chainsConfig, [
37-
jsonRpcProvider({
38-
rpc: (chain) => {
39-
if (!chainsConfig.some((c) => c.id === chain.id)) return null
40-
41-
return {
42-
http: chain.rpcUrls.default.http[0],
43-
}
44-
},
45-
}),
46-
])
47-
48-
const connectors: (MetaMaskConnector | WalletConnectConnector | CoinbaseWalletConnector)[] = [
49-
new MetaMaskConnector({
50-
chains,
51-
options: {
52-
shimDisconnect: true,
53-
shimChainChangedDisconnect: false,
54-
UNSTABLE_shimOnConnectSelectAccount: true,
55-
},
56-
}),
57-
new WalletConnectConnector({
58-
chains,
59-
options: {
60-
qrcode: true,
61-
},
62-
}),
63-
new CoinbaseWalletConnector({
64-
chains,
65-
options: {
66-
appName,
67-
headlessMode: true,
68-
},
69-
}),
70-
]
71-
72-
const clientbuilt = createClient({
73-
autoConnect,
74-
connectors,
75-
provider,
76-
})
77-
78-
return clientbuilt
79-
}
80-
8116
/**
8217
* This component is a layer of [Wagmi](https://wagmi.sh/docs/getting-started) and [ConnectKit](https://docs.family.co/connectkit)
8318
* which allow to handle Metamask, WalletConnect and Coinbase without needing to set any config
@@ -86,7 +21,7 @@ export interface WalletProviderState {
8621
/** All the wagmi client functionalities
8722
* @see [wagmi](https://wagmi.sh/docs/getting-started)
8823
*/
89-
client: Client
24+
client: Client<Provider>
9025
/** Metamask provider for example web3 or ethers */
9126
getProvider: () => Provider
9227
/** Get all the connectors available */

0 commit comments

Comments
 (0)