@ckb-ccc/connector-react 0.0.13-alpha.4 → 0.0.13-alpha.5
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/CHANGELOG.md +11 -0
- package/dist/hooks/useCcc.d.ts.map +1 -1
- package/dist/hooks/useCcc.js +2 -1
- package/package.json +2 -2
- package/src/hooks/useCcc.tsx +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @ckb-ccc/connector-react
|
|
2
2
|
|
|
3
|
+
## 0.0.13-alpha.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`9e6b9fd`](https://github.com/ckb-ecofund/ccc/commit/9e6b9fd40274015a0964dec8e0ee58dcbc06c786) Thanks [@Hanssen0](https://github.com/Hanssen0)! - fix(connector-react): if the filter is undefined, accept all
|
|
8
|
+
|
|
9
|
+
- [`6d62032`](https://github.com/ckb-ecofund/ccc/commit/6d620326f42f8c48eff9deb95578cf28d7bf5c97) Thanks [@Hanssen0](https://github.com/Hanssen0)! - fix(core): recordCells should not add usableCells
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`6d62032`](https://github.com/ckb-ecofund/ccc/commit/6d620326f42f8c48eff9deb95578cf28d7bf5c97)]:
|
|
12
|
+
- @ckb-ccc/connector@0.0.13-alpha.5
|
|
13
|
+
|
|
3
14
|
## 0.0.13-alpha.4
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCcc.d.ts","sourceRoot":"","sources":["../../src/hooks/useCcc.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,KAON,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"useCcc.d.ts","sourceRoot":"","sources":["../../src/hooks/useCcc.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,KAON,MAAM,OAAO,CAAC;AA0Cf,wBAAgB,QAAQ,CAAC,EACvB,QAAQ,EACR,cAAc,EACd,IAAI,EACJ,IAAI,EACJ,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,iBAAiB,GAClB,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,cAAc,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,CACb,UAAU,EAAE,GAAG,CAAC,UAAU,EAC1B,MAAM,EAAE,GAAG,CAAC,MAAM,KACf,OAAO,CAAC,OAAO,CAAC,CAAC;IACtB,iBAAiB,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC;IAC1C,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,GAAG,CAAC,iBAAiB,EAAE,CAAC;CAC7C,qBAoFA;AAED,wBAAgB,MAAM;;;;;;;EAQrB"}
|
package/dist/hooks/useCcc.js
CHANGED
|
@@ -8,7 +8,8 @@ class SignersControllerWithFilter extends ccc.SignersController {
|
|
|
8
8
|
this.filter = filter;
|
|
9
9
|
}
|
|
10
10
|
async addSigner(walletName, icon, signerInfo, context) {
|
|
11
|
-
if (
|
|
11
|
+
if (this.filter &&
|
|
12
|
+
!(await this.filter(signerInfo, { name: walletName, icon }))) {
|
|
12
13
|
return;
|
|
13
14
|
}
|
|
14
15
|
return super.addSigner(walletName, icon, signerInfo, context);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckb-ccc/connector-react",
|
|
3
|
-
"version": "0.0.13-alpha.
|
|
3
|
+
"version": "0.0.13-alpha.5",
|
|
4
4
|
"description": "CCC - CKBer's Codebase. Common Chains Connector UI Component for React",
|
|
5
5
|
"author": "Hanssen0 <hanssen0@hanssen0.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@lit/react": "^1.0.5",
|
|
38
38
|
"react": "^18",
|
|
39
|
-
"@ckb-ccc/connector": "0.0.13-alpha.
|
|
39
|
+
"@ckb-ccc/connector": "0.0.13-alpha.5"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "rimraf ./dist && tsc",
|
package/src/hooks/useCcc.tsx
CHANGED
|
@@ -37,7 +37,10 @@ class SignersControllerWithFilter extends ccc.SignersController {
|
|
|
37
37
|
signerInfo: ccc.SignerInfo,
|
|
38
38
|
context: ccc.SignersControllerRefreshContext,
|
|
39
39
|
) {
|
|
40
|
-
if (
|
|
40
|
+
if (
|
|
41
|
+
this.filter &&
|
|
42
|
+
!(await this.filter(signerInfo, { name: walletName, icon }))
|
|
43
|
+
) {
|
|
41
44
|
return;
|
|
42
45
|
}
|
|
43
46
|
|