@reef-knot/wallet-adapter-metamask 1.0.0 → 1.2.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 CHANGED
@@ -1,3 +1,5 @@
1
1
  import { WalletAdapterType } from '@reef-knot/types';
2
+ export declare const id = "metamask";
3
+ export declare const name = "MetaMask";
2
4
  export declare const MetaMask: WalletAdapterType;
3
5
  //# sourceMappingURL=index.d.ts.map
@@ -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,QAAQ,EAAE,iBAiBrB,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;AAK/B,eAAO,MAAM,QAAQ,EAAE,iBAkBrB,CAAC"}
package/dist/index.js CHANGED
@@ -2,11 +2,15 @@ import { MetaMaskConnector } from 'wagmi/connectors/metaMask';
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 = 'metamask';
6
+ const name = 'MetaMask';
7
+ const currentHref = globalThis.window ? globalThis.window.location.hostname + globalThis.window.location.pathname // encoding not supported
8
+ : '';
5
9
  const MetaMask = ({
6
10
  chains
7
11
  }) => ({
8
- walletName: 'MetaMask',
9
- walletId: 'metamask',
12
+ walletName: name,
13
+ walletId: id,
10
14
  icon: {
11
15
  light: Memo,
12
16
  dark: Memo$1
@@ -16,8 +20,9 @@ const MetaMask = ({
16
20
  return !!((_b = (_a = globalThis.window) === null || _a === void 0 ? void 0 : _a.ethereum) === null || _b === void 0 ? void 0 : _b.isMetaMask);
17
21
  },
18
22
  downloadURLs: {
19
- default: 'https://metamask.app.link/dapp/'
23
+ default: 'https://metamask.io/download/'
20
24
  },
25
+ deeplink: `https://metamask.app.link/dapp/${currentHref}`,
21
26
  connector: new MetaMaskConnector({
22
27
  chains,
23
28
  options: {
@@ -26,4 +31,4 @@ const MetaMask = ({
26
31
  })
27
32
  });
28
33
 
29
- export { MetaMask };
34
+ export { MetaMask, id, name };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reef-knot/wallet-adapter-metamask",
3
- "version": "1.0.0",
3
+ "version": "1.2.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.3.0",
35
+ "@reef-knot/types": "^1.8.0",
36
36
  "@svgr/rollup": "^6.5.1",
37
37
  "eslint-config-custom": "*"
38
38
  },