blocknative / react-demo Goto Github PK
View Code? Open in Web Editor NEWReact integration for Blocknative's Web3-Onboard library
Home Page: https://www.Blocknative.com
React integration for Blocknative's Web3-Onboard library
Home Page: https://www.Blocknative.com
Delete the yarn.lock, yarn, yarn start, it fails to run
ded503c9fd4c5d7ed6f53ddbaa0ffaa2e5523db1
Originally posted by @okorye in https://github.com/okorye/cautious-giggle/pull/4#issuecomment-2041074599
Hi
I installed bnc-notify 1.5.0 in my NodeJs app,
It took an error that you can see below on initial line
notify = Notify(options);
Error: WebSocket not present in global scope and no wsConstructor option was provided.
at new SturdyWebSocket (D:\Source\CryptomindWallet\node_modules\bnc-notify\dist\notify.umd.js:534:1363)
at new Blocknative (D:\Source\CryptomindWallet\node_modules\bnc-notify\dist\notify.umd.js:2305:4758)
at init$1 (D:\Source\CryptomindWallet\node_modules\bnc-notify\dist\notify.umd.js:3650:2274)
``
Could you please help us to resolve this?
Thanks
We should show the version used for Onboard.js and Notify.js as well as the React Demo version
Here's what happened:
UncheckedJsonRpcSigner
class.JsonRpcSigner
class.See how Uniswap uses it: https://github.com/Uniswap/uniswap-interface/blob/4078390a4890445d1ff0ed5196fd4cb56a44de87/src/utils/index.ts#L28-L30
This is the full error I'm getting....
Starting the development server...
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:140:10)
at module.exports (/Users/brent/Desktop/IAMSOLIDITYDEV/react-demo/node_modules/webpack/lib/util/createHash.js:135:53)
at NormalModule._initBuildHash (/Users/brent/Desktop/IAMSOLIDITYDEV/react-demo/node_modules/webpack/lib/NormalModule.js:412:16)
at handleParseError (/Users/brent/Desktop/IAMSOLIDITYDEV/react-demo/node_modules/webpack/lib/NormalModule.js:463:10)
at /Users/brent/Desktop/IAMSOLIDITYDEV/react-demo/node_modules/webpack/lib/NormalModule.js:495:5
at /Users/brent/Desktop/IAMSOLIDITYDEV/react-demo/node_modules/webpack/lib/NormalModule.js:354:12
at /Users/brent/Desktop/IAMSOLIDITYDEV/react-demo/node_modules/loader-runner/lib/LoaderRunner.js:373:3
at iterateNormalLoaders (/Users/brent/Desktop/IAMSOLIDITYDEV/react-demo/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
at iterateNormalLoaders (/Users/brent/Desktop/IAMSOLIDITYDEV/react-demo/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
at /Users/brent/Desktop/IAMSOLIDITYDEV/react-demo/node_modules/loader-runner/lib/LoaderRunner.js:236:3
at runSyncOrAsync (/Users/brent/Desktop/IAMSOLIDITYDEV/react-demo/node_modules/loader-runner/lib/LoaderRunner.js:130:11)
at iterateNormalLoaders (/Users/brent/Desktop/IAMSOLIDITYDEV/react-demo/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
at Array. (/Users/brent/Desktop/IAMSOLIDITYDEV/react-demo/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
at Storage.finished (/Users/brent/Desktop/IAMSOLIDITYDEV/react-demo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
at /Users/brent/Desktop/IAMSOLIDITYDEV/react-demo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
/Users/brent/Desktop/IAMSOLIDITYDEV/react-demo/node_modules/react-scripts/scripts/start.js:19
throw err;
^
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:140:10)
at module.exports (/Users/brent/Desktop/IAMSOLIDITYDEV/react-demo/node_modules/webpack/lib/util/createHash.js:135:53)
at NormalModule._initBuildHash (/Users/brent/Desktop/IAMSOLIDITYDEV/react-demo/node_modules/webpack/lib/NormalModule.js:412:16)
at /Users/brent/Desktop/IAMSOLIDITYDEV/react-demo/node_modules/webpack/lib/NormalModule.js:444:10
at /Users/brent/Desktop/IAMSOLIDITYDEV/react-demo/node_modules/webpack/lib/NormalModule.js:320:13
at /Users/brent/Desktop/IAMSOLIDITYDEV/react-demo/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /Users/brent/Desktop/IAMSOLIDITYDEV/react-demo/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at context.callback (/Users/brent/Desktop/IAMSOLIDITYDEV/react-demo/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at /Users/brent/Desktop/IAMSOLIDITYDEV/react-demo/node_modules/react-scripts/node_modules/babel-loader/lib/index.js:55:103 {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
Node.js v19.0.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
webpack generates 93 files. Total 50 MB. Is this normal? I have no other modules installed besides what was required to get this to compile. All i want is a bundle that can run within a modern web browser (mobile + desktop). React isn't necessary.
What am i doing wrong with webpack OR is blocknative not browser friendly?
I enabled Auto Selecting a Wallet
const onboard = Onboard({
// ... other options
connect: {
autoConnectLastWallet: true
}
})
For example, I connected Metamask using the Metamask Chrome extension. When I refresh the page, it shows the Metamask modal.
Is there any way to automatically skip the modal and connect to the Metamask account?
The demo compiles with warnings when importing the magic wallet module.
If you remove or comment the import, the app compiles successfully.
Compiled with warnings.
./node_modules/magic-sdk/dist/es/index.js
Critical dependency: require function is used in a way in which dependencies cannot be statically extracte
...
Sending 0.001 Rinkeby ETH with:
Works. But sending via a internal transaction doesn't. I'm getting the following error in the console:
index.js:224 Uncaught (in promise) Error: cannot estimate gas; transaction may fail or may require manual gas limit (error={"code":-32000,"message":"execution reverted"}, method="estimateGas", transaction={"from":"0x4bcb303609F19e71Ab82A3A3393c46BfEa1e44Fc","to":"0xb8c12850827dEd46B9dED8c1B6373da0c4d60370","value":{"type":"BigNumber","hex":"0x038d7ea4c68000"},"data":"0x94debf890000000000000000000000000000000000000000000000000000000000000001","accessList":null}, code=UNPREDICTABLE_GAS_LIMIT, version=providers/5.2.0)
at e.value (index.js:224)
at e.value (index.js:235)
at Sv (json-rpc-provider.js:118)
at n.<anonymous> (json-rpc-provider.js:744)
at c (runtime.js:64)
at Generator._invoke (runtime.js:281)
at Generator.throw (runtime.js:117)
at u (json-rpc-provider.js:30)
Hi,
"Update Balances" feature doesn't work on local for me.
Can you help me?
Cheers.
I need to custom the Available Wallet Modal Design. is Possible???
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.