@reef-knot/web3-react 3.0.0 → 3.0.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/helpers/index.d.ts +0 -1
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/index.js +0 -1
- package/dist/helpers/providerDetectors.js +1 -1
- package/dist/hooks/useConnectorError.js +1 -1
- package/dist/hooks/useConnectorInfo.js +0 -1
- package/package.json +5 -6
- package/dist/helpers/userAgents.d.ts +0 -8
- package/dist/helpers/userAgents.d.ts.map +0 -1
- package/dist/helpers/userAgents.js +0 -11
package/dist/helpers/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC"}
|
package/dist/helpers/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { hasInjected, isDappBrowserProvider, isMetamaskProvider } from './providerDetectors.js';
|
|
2
|
-
export { browser, device, isMobile, isMobileOrTablet, isTablet, os } from './userAgents.js';
|
|
3
2
|
export { LedgerErrorsDict, interceptLedgerError } from './interceptLedgerError.js';
|
|
4
3
|
export { getUnsupportedChainError } from './unsupportedChainError.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useWeb3 } from './useWeb3.js';
|
|
2
2
|
import { useReefKnotContext, getUnsupportedChainError } from '@reef-knot/core-react';
|
|
3
|
-
import '
|
|
3
|
+
import '@reef-knot/wallets-helpers';
|
|
4
4
|
import { interceptLedgerError } from '../helpers/interceptLedgerError.js';
|
|
5
5
|
import { useConnectorInfo } from './useConnectorInfo.js';
|
|
6
6
|
import { useSupportedChains } from './useSupportedChains.js';
|
|
@@ -2,7 +2,6 @@ import { useAccount } from 'wagmi';
|
|
|
2
2
|
import { SafeConnector } from 'wagmi/connectors/safe';
|
|
3
3
|
import { LedgerHIDConnector, LedgerLiveConnector } from '@reef-knot/ledger-connector';
|
|
4
4
|
import { isDappBrowserProvider, isMetamaskProvider } from '../helpers/providerDetectors.js';
|
|
5
|
-
import '../helpers/userAgents.js';
|
|
6
5
|
import '@reef-knot/core-react';
|
|
7
6
|
|
|
8
7
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reef-knot/web3-react",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -46,17 +46,16 @@
|
|
|
46
46
|
"@babel/preset-react": "7.18.6",
|
|
47
47
|
"@babel/preset-typescript": "7.18.6",
|
|
48
48
|
"@ethersproject/providers": "^5.7.2",
|
|
49
|
-
"@reef-knot/core-react": "^3.
|
|
49
|
+
"@reef-knot/core-react": "^3.1.2",
|
|
50
50
|
"@reef-knot/ledger-connector": "^3.0.0",
|
|
51
|
+
"@reef-knot/wallets-helpers": "^1.1.6",
|
|
51
52
|
"@testing-library/react": "^12.1.5",
|
|
52
53
|
"@testing-library/react-hooks": "^7.0.2",
|
|
53
54
|
"@types/react": "18.2.45",
|
|
54
|
-
"@types/ua-parser-js": "^0.7.36",
|
|
55
55
|
"babel-loader": "8.2.2",
|
|
56
56
|
"babel-plugin-styled-components": "1.13.2",
|
|
57
57
|
"eslint-config-custom": "*",
|
|
58
|
-
"react": "18.2.0"
|
|
59
|
-
"ua-parser-js": "1.0.33"
|
|
58
|
+
"react": "18.2.0"
|
|
60
59
|
},
|
|
61
60
|
"dependencies": {
|
|
62
61
|
"tiny-invariant": "^1.1.0"
|
|
@@ -65,8 +64,8 @@
|
|
|
65
64
|
"@ethersproject/providers": "5",
|
|
66
65
|
"@reef-knot/core-react": "^3.0.0",
|
|
67
66
|
"@reef-knot/ledger-connector": "^3.0.0",
|
|
67
|
+
"@reef-knot/wallets-helpers": "^1.1.6",
|
|
68
68
|
"react": ">=18",
|
|
69
|
-
"ua-parser-js": "^1.0.33",
|
|
70
69
|
"wagmi": "^0.12.19"
|
|
71
70
|
}
|
|
72
71
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="ua-parser-js" />
|
|
2
|
-
export declare const device: import("ua-parser-js").IDevice;
|
|
3
|
-
export declare const browser: import("ua-parser-js").IBrowser;
|
|
4
|
-
export declare const os: import("ua-parser-js").IOS;
|
|
5
|
-
export declare const isMobile: boolean;
|
|
6
|
-
export declare const isTablet: boolean;
|
|
7
|
-
export declare const isMobileOrTablet: boolean;
|
|
8
|
-
//# sourceMappingURL=userAgents.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"userAgents.d.ts","sourceRoot":"","sources":["../../src/helpers/userAgents.ts"],"names":[],"mappings":";AAIA,eAAO,MAAM,MAAM,gCAAqB,CAAC;AACzC,eAAO,MAAM,OAAO,iCAAsB,CAAC;AAC3C,eAAO,MAAM,EAAE,4BAAiB,CAAC;AAEjC,eAAO,MAAM,QAAQ,SAA2B,CAAC;AACjD,eAAO,MAAM,QAAQ,SAA2B,CAAC;AACjD,eAAO,MAAM,gBAAgB,SAAuB,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { UAParser } from 'ua-parser-js';
|
|
2
|
-
|
|
3
|
-
var parser = new UAParser();
|
|
4
|
-
var device = parser.getDevice();
|
|
5
|
-
var browser = parser.getBrowser();
|
|
6
|
-
var os = parser.getOS();
|
|
7
|
-
var isMobile = device.type === 'mobile';
|
|
8
|
-
var isTablet = device.type === 'tablet';
|
|
9
|
-
var isMobileOrTablet = isMobile || isTablet;
|
|
10
|
-
|
|
11
|
-
export { browser, device, isMobile, isMobileOrTablet, isTablet, os };
|