Closed niklabh closed 3 years ago
don't hesitate to seek help and open an issue on https://github.com/polkadot-js/api/ if there's anything you can't solve. I'll take a quick look now.
What I did:
--resolveJsonModule
Please make sure to triple-check the changes I made with the id
params, and the councilMembers
array. These were normal lint issues that came up because of the bump.
edit: a dependency bump needs to be made regularly, and many are still lacking. Not to mention the other projects such as auth-server that I didn't touch.
Thankyou very much
There is memory leak/infinte loop in polkadot.js api or react-context.
This example can reproduce the issue
import React, {useContext, useEffect} from 'react';
import { ApiPromiseContext } from '@substrate/react-context';
function App() {
const { api, isApiReady } = useContext(ApiPromiseContext);
useEffect(() => {
if (!isApiReady){
return;
}
api.query.timestamp.now().then(console.log);
}, [api, isApiReady]);
return (
<div>
Memory leak
</div>
);
}
export default App;
@substrate/react-context has been upgraded afair, can you try with the earlier version? This is what changed, and could very well be the origin of the problem https://github.com/paritytech/substrate-js-utils/commit/717298952f6bdb8552232bd2246fc60cef2753d9#diff-8b186436e62efe7d5dd561abd16d87eddfb98281d8cbf8aef2ab6f6b0aabab86