@txnlab/use-wallet 1.2.1 → 1.2.3
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/README.md +0 -48
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -380,54 +380,6 @@ export default function App() {
|
|
|
380
380
|
|
|
381
381
|
Note that some of the providers do not require static imports to be provided. This is usually the case of providers that are browser extensions.
|
|
382
382
|
|
|
383
|
-
## Webpack 5
|
|
384
|
-
|
|
385
|
-
Note: Frameworks like `next.js` already include polyfills. This step is required if you're using `create-react-app` with `webpack 5`.
|
|
386
|
-
|
|
387
|
-
1. Install `react-app-rewired` and the missing polyfills.
|
|
388
|
-
|
|
389
|
-
```bash
|
|
390
|
-
yarn add --dev react-app-rewired crypto-browserify stream-browserify assert stream-http https-browserify os-browserify url buffer process
|
|
391
|
-
```
|
|
392
|
-
|
|
393
|
-
2. Create `config-overrides.js` in the root of your project and add the following:
|
|
394
|
-
|
|
395
|
-
```js
|
|
396
|
-
const webpack = require("webpack");
|
|
397
|
-
|
|
398
|
-
module.exports = function override(config) {
|
|
399
|
-
const fallback = config.resolve.fallback || {};
|
|
400
|
-
Object.assign(fallback, {
|
|
401
|
-
crypto: require.resolve("crypto-browserify"),
|
|
402
|
-
stream: require.resolve("stream-browserify"),
|
|
403
|
-
assert: require.resolve("assert"),
|
|
404
|
-
http: require.resolve("stream-http"),
|
|
405
|
-
https: require.resolve("https-browserify"),
|
|
406
|
-
os: require.resolve("os-browserify"),
|
|
407
|
-
url: require.resolve("url"),
|
|
408
|
-
});
|
|
409
|
-
config.resolve.fallback = fallback;
|
|
410
|
-
config.plugins = (config.plugins || []).concat([
|
|
411
|
-
new webpack.ProvidePlugin({
|
|
412
|
-
process: "process/browser",
|
|
413
|
-
Buffer: ["buffer", "Buffer"],
|
|
414
|
-
}),
|
|
415
|
-
]);
|
|
416
|
-
return config;
|
|
417
|
-
};
|
|
418
|
-
```
|
|
419
|
-
|
|
420
|
-
3. Change your scripts in `package.json` to the following:
|
|
421
|
-
|
|
422
|
-
```js
|
|
423
|
-
"scripts": {
|
|
424
|
-
"start": "react-app-rewired start",
|
|
425
|
-
"build": "react-app-rewired build",
|
|
426
|
-
"test": "react-app-rewired test",
|
|
427
|
-
"eject": "react-scripts eject"
|
|
428
|
-
},
|
|
429
|
-
```
|
|
430
|
-
|
|
431
383
|
## Local Development
|
|
432
384
|
|
|
433
385
|
### Install dependencies
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"url": "https://github.com/txnlab/use-wallet/issues"
|
|
13
13
|
},
|
|
14
14
|
"homepage": "https://txnlab.github.io/use-wallet",
|
|
15
|
-
"version": "1.2.
|
|
15
|
+
"version": "1.2.3",
|
|
16
16
|
"description": "React hooks for using Algorand compatible wallets in dApps.",
|
|
17
17
|
"scripts": {
|
|
18
18
|
"dev": "yarn storybook",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@blockshake/defly-connect": "^1.0.0",
|
|
34
34
|
"@json-rpc-tools/utils": "^1.7.6",
|
|
35
35
|
"@mdx-js/react": "^2.1.2",
|
|
36
|
-
"@perawallet/connect": "^1.1.
|
|
36
|
+
"@perawallet/connect": "^1.1.1",
|
|
37
37
|
"@randlabs/myalgo-connect": "^1.4.2",
|
|
38
38
|
"@rollup/plugin-commonjs": "^23.0.2",
|
|
39
39
|
"@rollup/plugin-json": "^5.0.1",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@types/react": "^18.0.15",
|
|
52
52
|
"@walletconnect/client": "^1.8.0",
|
|
53
53
|
"algorand-walletconnect-qrcode-modal": "^1.8.0",
|
|
54
|
-
"algosdk": "^1.
|
|
54
|
+
"algosdk": "^2.1.0",
|
|
55
55
|
"babel-jest": "^29.1.2",
|
|
56
56
|
"babel-loader": "^8.2.3",
|
|
57
57
|
"css-loader": "^6.5.1",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"@randlabs/myalgo-connect": "^1.4.2",
|
|
84
84
|
"@walletconnect/client": "^1.8.0",
|
|
85
85
|
"algorand-walletconnect-qrcode-modal": "^1.8.0",
|
|
86
|
-
"algosdk": "^1.
|
|
86
|
+
"algosdk": "^2.1.0",
|
|
87
87
|
"react": "^18.2.0"
|
|
88
88
|
},
|
|
89
89
|
"main": "dist/cjs/index.js",
|