In my use-case, I didn't need to initialize the options (since I am dynamically adding contracts) so I sent an empty object to DrizzleProvider from drizzle-react and I got the following error:
generateContractsInitialState
node_modules/drizzle/dist/drizzle.js:18320
18317 | // Preloaded state
18318 | var contractsInitialState = {};
18319 |
> 18320 | for (var i = 0; i < options.contracts.length; i++) {
| ^ 18321 | // Initial contract details
18322 | var contractName = options.contracts[i].contractName;
18323 | contractsInitialState[contractName] = (0, _generateContractInitialState.generateContractInitialState)(options.contracts[i]);
In my use-case, I didn't need to initialize the options (since I am dynamically adding contracts) so I sent an empty object to
DrizzleProvider
fromdrizzle-react
and I got the following error:which seems to be coming from core
drizzle
.The workaround is to send:
Happy to submit a PR if a fix is desirable.