Open aewc opened 2 years ago
Same. It can still be reproduced in 2023.
You need to add getrandom with the feature flag of JS. This is not libsecp256k1, but its dependency rand which depends on getrandom. https://docs.rs/getrandom/latest/getrandom/#webassembly-support
getrandom = { version = "0.2", features = ["js"]}
Fixed by upgrading Substrate to polkadot-v0.9.43
.
This issue may also be related to cargo workspace dependencies. I suspect there was a potential bug when handling the individual default-feature = false
.
When I use this dependency in my wasm project, it will report error when compiling:
is there any features that without using the getrandom?