@reef-knot/wallet-adapter-metamask 1.2.0 → 2.0.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 +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -11
- package/package.json +5 -4
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;AAIrD,eAAO,MAAM,EAAE,aAAa,CAAC;AAC7B,eAAO,MAAM,IAAI,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAIrD,eAAO,MAAM,EAAE,aAAa,CAAC;AAC7B,eAAO,MAAM,IAAI,aAAa,CAAC;AAW/B,eAAO,MAAM,QAAQ,EAAE,iBAcrB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { injected } from 'wagmi/connectors';
|
|
2
2
|
import Memo from './icons/metamask.svg.js';
|
|
3
3
|
import Memo$1 from './icons/metamask-inverted.svg.js';
|
|
4
4
|
|
|
5
|
-
const id = '
|
|
5
|
+
const id = 'metaMask';
|
|
6
6
|
const name = 'MetaMask';
|
|
7
7
|
const currentHref = globalThis.window ? globalThis.window.location.hostname + globalThis.window.location.pathname // encoding not supported
|
|
8
8
|
: '';
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const getMetaMaskConnector = () => injected({
|
|
10
|
+
target: 'metaMask',
|
|
11
|
+
shimDisconnect: true
|
|
12
|
+
});
|
|
13
|
+
const MetaMask = () => ({
|
|
12
14
|
walletName: name,
|
|
13
15
|
walletId: id,
|
|
16
|
+
type: injected.type,
|
|
14
17
|
icon: {
|
|
15
18
|
light: Memo,
|
|
16
19
|
dark: Memo$1
|
|
@@ -23,12 +26,7 @@ const MetaMask = ({
|
|
|
23
26
|
default: 'https://metamask.io/download/'
|
|
24
27
|
},
|
|
25
28
|
deeplink: `https://metamask.app.link/dapp/${currentHref}`,
|
|
26
|
-
|
|
27
|
-
chains,
|
|
28
|
-
options: {
|
|
29
|
-
UNSTABLE_shimOnConnectSelectAccount: true // allows to select a different MetaMask account
|
|
30
|
-
}
|
|
31
|
-
})
|
|
29
|
+
createConnectorFn: getMetaMaskConnector()
|
|
32
30
|
});
|
|
33
31
|
|
|
34
32
|
export { MetaMask, id, name };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reef-knot/wallet-adapter-metamask",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -32,12 +32,13 @@
|
|
|
32
32
|
"lint": "eslint --ext ts,tsx,js,mjs ."
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@reef-knot/types": "^
|
|
35
|
+
"@reef-knot/types": "^2.0.0",
|
|
36
36
|
"@svgr/rollup": "^6.5.1",
|
|
37
37
|
"eslint-config-custom": "*"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"wagmi": "
|
|
41
|
-
"@reef-knot/types": "^
|
|
40
|
+
"wagmi": "2.10.4",
|
|
41
|
+
"@reef-knot/types": "^2.0.0",
|
|
42
|
+
"@tanstack/react-query": "^5.29.0"
|
|
42
43
|
}
|
|
43
44
|
}
|