@reef-knot/wallet-adapter-bitkeep 1.1.1 → 1.3.0
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/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -7
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAG9D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,OAAO,CAAC,EAAE;YACR,QAAQ,CAAC,EAAE,iBAAiB,CAAC;SAC9B,CAAC;KACH;CACF;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAG9D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,OAAO,CAAC,EAAE;YACR,QAAQ,CAAC,EAAE,iBAAiB,CAAC;SAC9B,CAAC;KACH;CACF;AAID,eAAO,MAAM,EAAE,WAAW,CAAC;AAC3B,eAAO,MAAM,IAAI,WAAW,CAAC;AAK7B,qBAAa,eAAgB,SAAQ,iBAAiB;IACpD,QAAQ,CAAC,EAAE,YAAM;IACjB,QAAQ,CAAC,IAAI,YAAQ;gBACT,MAAM,EAAE,KAAK,EAAE;CAQ5B;AAED,eAAO,MAAM,MAAM,EAAE,iBAUnB,CAAC;AAIH,eAAO,MAAM,OAAO,mBAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { InjectedConnector } from 'wagmi/connectors/injected';
|
|
2
2
|
import Memo from './icons/bitget.svg.js';
|
|
3
3
|
|
|
4
|
+
// The current metrics implementation is based on walletId,
|
|
5
|
+
// using previous "bitkeep" name here not to break metrics
|
|
6
|
+
const id = 'bitget';
|
|
7
|
+
const name = 'Bitget';
|
|
8
|
+
const currentHref = globalThis.window ? encodeURIComponent(globalThis.window.location.href) : '';
|
|
4
9
|
class BitgetConnector extends InjectedConnector {
|
|
5
10
|
constructor(chains) {
|
|
6
11
|
super({
|
|
@@ -12,17 +17,15 @@ class BitgetConnector extends InjectedConnector {
|
|
|
12
17
|
}
|
|
13
18
|
}
|
|
14
19
|
});
|
|
15
|
-
this.id =
|
|
16
|
-
this.name =
|
|
20
|
+
this.id = id;
|
|
21
|
+
this.name = name;
|
|
17
22
|
}
|
|
18
23
|
}
|
|
19
24
|
const Bitget = ({
|
|
20
25
|
chains
|
|
21
26
|
}) => ({
|
|
22
|
-
walletName:
|
|
23
|
-
|
|
24
|
-
// using previous "bitkeep" name here not to break metrics
|
|
25
|
-
walletId: 'bitkeep',
|
|
27
|
+
walletName: name,
|
|
28
|
+
walletId: id,
|
|
26
29
|
icon: Memo,
|
|
27
30
|
detector: () => {
|
|
28
31
|
var _a, _b;
|
|
@@ -31,10 +34,11 @@ const Bitget = ({
|
|
|
31
34
|
downloadURLs: {
|
|
32
35
|
default: 'https://web3.bitget.com/'
|
|
33
36
|
},
|
|
37
|
+
deeplink: `https://bkcode.vip?action=dapp&url=${currentHref}`,
|
|
34
38
|
connector: new BitgetConnector(chains)
|
|
35
39
|
});
|
|
36
40
|
// BitKeep is the previous name of the wallet.
|
|
37
41
|
// Exporting the wallet adapter with the old name for compatibility.
|
|
38
42
|
const BitKeep = Bitget;
|
|
39
43
|
|
|
40
|
-
export { BitKeep, Bitget, BitgetConnector };
|
|
44
|
+
export { BitKeep, Bitget, BitgetConnector, id, name };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reef-knot/wallet-adapter-bitkeep",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"lint": "eslint --ext ts,tsx,js,mjs ."
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@reef-knot/types": "^1.
|
|
35
|
+
"@reef-knot/types": "^1.8.0",
|
|
36
36
|
"@svgr/rollup": "^6.5.1",
|
|
37
37
|
"eslint-config-custom": "*"
|
|
38
38
|
},
|