When leaving the page open with mining/stacking instructions, this error eventually pops up:
Unhandled Rejection (TypeError): Cannot read property 'data' of undefined
getWinningDetailsFor
src/lib/citycoin.js:155
152 | const minerOfBlockCV = hexToCV(minerOfBlock.data);
153 | console.log({ minerOfBlockCV: cvToString(minerOfBlockCV) });
154 | // add commit to total
> 155 | const nextSum = sum + minerOfBlockCV.value.data.ustx.value.toNumber();
| ^ 156 | // check total for winning amount
157 | if (sum <= winningAmount && nextSum > winningAmount) {
158 | winner = minerOfBlockCV;
View compiled
async getMiningDetails
src/lib/citycoin.js:105
102 | for (let tx of txs) {
103 | if (tx.contract_call.function_name === 'mine-tokens-over-30-blocks') {
104 | for (let i = 29; i >= 0; i--) {
> 105 | winningDetails.push(await getWinningDetailsFor(tx.block_height + i, minerId));
| ^ 106 | }
107 | } else {
108 | winningDetails.push(await getWinningDetailsFor(tx.block_height, minerId));