@reef-knot/core-react 1.7.0 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/context/acceptTermsModal.d.ts +4 -2
- package/dist/context/acceptTermsModal.d.ts.map +1 -1
- package/dist/context/reefKnot.d.ts +3 -2
- package/dist/context/reefKnot.d.ts.map +1 -1
- package/dist/walletData/index.d.ts +4 -4
- package/dist/walletData/index.d.ts.map +1 -1
- package/dist/walletData/index.js +8 -4
- package/package.json +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
export type AcceptTermsModalContextValue = {
|
|
3
3
|
acceptTermsModal: {
|
|
4
4
|
isVisible: boolean;
|
|
@@ -10,5 +10,7 @@ export type AcceptTermsModalContextValue = {
|
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
12
|
export declare const AcceptTermsModalContext: React.Context<AcceptTermsModalContextValue>;
|
|
13
|
-
export declare const AcceptTermsModalContextProvider:
|
|
13
|
+
export declare const AcceptTermsModalContextProvider: ({ children, }: {
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
}) => React.JSX.Element;
|
|
14
16
|
//# sourceMappingURL=acceptTermsModal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acceptTermsModal.d.ts","sourceRoot":"","sources":["../../src/context/acceptTermsModal.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"acceptTermsModal.d.ts","sourceRoot":"","sources":["../../src/context/acceptTermsModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAEhE,MAAM,MAAM,4BAA4B,GAAG;IACzC,gBAAgB,EAAE;QAChB,SAAS,EAAE,OAAO,CAAC;QACnB,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;QAC1D,UAAU,EAAE,MAAM,IAAI,CAAC;QACvB,aAAa,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;QAChE,KAAK,CAAC,EAAE,KAAK,CAAC;QACd,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC;KACnE,CAAC;CACH,CAAC;AAKF,eAAO,MAAM,uBAAuB,6CAKF,CAAC;AAEnC,eAAO,MAAM,+BAA+B;cAGhC,MAAM,SAAS;uBA+B1B,CAAC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
1
|
+
import React, { FC, ReactNode } from 'react';
|
|
2
2
|
import { WalletAdapterData } from '@reef-knot/types';
|
|
3
3
|
import { Chain } from 'wagmi/chains';
|
|
4
4
|
export interface ReefKnotContextProps {
|
|
5
5
|
rpc: Record<number, string>;
|
|
6
6
|
walletconnectProjectId?: string;
|
|
7
7
|
chains: Chain[];
|
|
8
|
-
defaultChain
|
|
8
|
+
defaultChain: Chain;
|
|
9
|
+
children?: ReactNode;
|
|
9
10
|
}
|
|
10
11
|
export type ReefKnotContextValue = {
|
|
11
12
|
rpc: Record<number, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reefKnot.d.ts","sourceRoot":"","sources":["../../src/context/reefKnot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,EAAE,EAAW,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"reefKnot.d.ts","sourceRoot":"","sources":["../../src/context/reefKnot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,EAAE,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAKrC,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,YAAY,EAAE,KAAK,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,cAAc,EAAE,iBAAiB,EAAE,CAAC;IACpC,MAAM,EAAE,KAAK,EAAE,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,eAAe,qCAA4C,CAAC;AAEzE,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,oBAAoB,CA8B7C,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { WalletAdapterData } from '@reef-knot/types';
|
|
2
2
|
import type { Chain } from 'wagmi/chains';
|
|
3
3
|
export interface GetConnectorsArgs {
|
|
4
|
-
rpc
|
|
5
|
-
walletconnectProjectId?: string;
|
|
4
|
+
rpc: Record<number, string>;
|
|
6
5
|
chains: Chain[];
|
|
7
|
-
defaultChain
|
|
6
|
+
defaultChain: Chain;
|
|
7
|
+
walletconnectProjectId?: string;
|
|
8
8
|
}
|
|
9
|
-
export declare const getWalletDataList: ({ rpc,
|
|
9
|
+
export declare const getWalletDataList: ({ rpc, chains, defaultChain, walletconnectProjectId, }: GetConnectorsArgs) => WalletAdapterData[];
|
|
10
10
|
export declare const getConnectors: (args: GetConnectorsArgs) => import("@wagmi/connectors/dist/base-84a689bb").C<any, any, any>[];
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/walletData/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAI1C,MAAM,WAAW,iBAAiB;IAChC,GAAG,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/walletData/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAI1C,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,YAAY,EAAE,KAAK,CAAC;IACpB,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,eAAO,MAAM,iBAAiB,2DAK3B,iBAAiB,wBAwBnB,CAAC;AAEF,eAAO,MAAM,aAAa,SAAU,iBAAiB,sEAEpD,CAAC"}
|
package/dist/walletData/index.js
CHANGED
|
@@ -3,9 +3,9 @@ import { WalletsListEthereum } from '@reef-knot/wallets-list';
|
|
|
3
3
|
let walletDataList;
|
|
4
4
|
const getWalletDataList = ({
|
|
5
5
|
rpc,
|
|
6
|
-
walletconnectProjectId,
|
|
7
6
|
chains,
|
|
8
|
-
defaultChain
|
|
7
|
+
defaultChain,
|
|
8
|
+
walletconnectProjectId
|
|
9
9
|
}) => {
|
|
10
10
|
const walletAdapters = Object.values(WalletsListEthereum);
|
|
11
11
|
if (!walletDataList) {
|
|
@@ -13,10 +13,14 @@ const getWalletDataList = ({
|
|
|
13
13
|
// Have to do this because WalletConnect v2 via wagmi always tries to connect
|
|
14
14
|
// to the first chain in the chains array
|
|
15
15
|
const sortedChains = defaultChain ? chains.sort(chain => chain.id === defaultChain.id ? -1 : 1) : chains;
|
|
16
|
+
if (!rpc[defaultChain.id]) {
|
|
17
|
+
throw 'RPC for default chain must be provided';
|
|
18
|
+
}
|
|
16
19
|
walletDataList = walletAdapters.map(walletAdapter => walletAdapter({
|
|
17
20
|
rpc,
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
chains: sortedChains,
|
|
22
|
+
defaultChain,
|
|
23
|
+
walletconnectProjectId
|
|
20
24
|
}));
|
|
21
25
|
}
|
|
22
26
|
return walletDataList;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reef-knot/core-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -37,18 +37,18 @@
|
|
|
37
37
|
"lint": "eslint --ext ts,tsx,js,mjs ."
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@reef-knot/wallets-list": "^1.
|
|
41
|
-
"@reef-knot/types": "^1.
|
|
42
|
-
"@reef-knot/ui-react": "^1.0.
|
|
40
|
+
"@reef-knot/wallets-list": "^1.11.0",
|
|
41
|
+
"@reef-knot/types": "^1.4.0",
|
|
42
|
+
"@reef-knot/ui-react": "^1.0.8",
|
|
43
43
|
"eslint-config-custom": "*",
|
|
44
|
-
"react": "
|
|
44
|
+
"react": "18.2.0",
|
|
45
45
|
"wagmi": "^0.12.19"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"@reef-knot/wallets-list": "^1.4.1",
|
|
49
49
|
"@reef-knot/types": "^1.2.1",
|
|
50
50
|
"@reef-knot/ui-react": "^1.0.4",
|
|
51
|
-
"react": ">=
|
|
51
|
+
"react": ">=18",
|
|
52
52
|
"wagmi": "^0.12.19"
|
|
53
53
|
}
|
|
54
54
|
}
|