Skip to content

Bug Report: Uncaught Runtime Errors in parseSupplyMarkets #389

@SiddharthV1

Description

@SiddharthV1

Description:
We are encountering uncaught runtime errors in our application, specifically related to reading properties of undefined within the parseSupplyMarkets function. This issue seems to arise when trying to access the supply property.

Error details:

ERROR
Cannot read properties of undefined (reading 'supply')
TypeError: Cannot read properties of undefined (reading 'supply')
    at parseSupplyMarkets (http://localhost:3000/static/js/bundle.js:149275:32)
    at Object.getSuppliedMarkets (http://localhost:3000/static/js/bundle.js:149298:15)
    at http://localhost:3000/static/js/bundle.js:10777:99
    at http://localhost:3000/static/js/bundle.js:141645:18
    at http://localhost:3000/static/js/bundle.js:4059:5
    at invokePassiveEffectCreate (http://localhost:3000/static/js/bundle.js:127146:24)
    at HTMLUnknownElement.callCallback (http://localhost:3000/static/js/bundle.js:110449:18)
    at Object.invokeGuardedCallbackDev (http://localhost:3000/static/js/bundle.js:110493:20)
    at invokeGuardedCallback (http://localhost:3000/static/js/bundle.js:110548:35)
    at flushPassiveEffectsImpl (http://localhost:3000/static/js/bundle.js:127216:13)
ERROR
Cannot read properties of undefined (reading 'supply')
TypeError: Cannot read properties of undefined (reading 'supply')
    at parseSupplyMarkets (http://localhost:3000/static/js/bundle.js:149275:32)
    at Object.getSuppliedMarkets (http://localhost:3000/static/js/bundle.js:149298:15)
    at http://localhost:3000/static/js/bundle.js:10777:99
    at http://localhost:3000/static/js/bundle.js:141645:18
    at http://localhost:3000/static/js/bundle.js:4059:5
    at invokePassiveEffectCreate (http://localhost:3000/static/js/bundle.js:127146:24)
    at HTMLUnknownElement.callCallback (http://localhost:3000/static/js/bundle.js:110449:18)
    at Object.invokeGuardedCallbackDev (http://localhost:3000/static/js/bundle.js:110493:20)
    at invokeGuardedCallback (http://localhost:3000/static/js/bundle.js:110548:35)
    at flushPassiveEffectsImpl (http://localhost:3000/static/js/bundle.js:127216:13)
ERROR
Cannot read properties of undefined (reading 'supply')
TypeError: Cannot read properties of undefined (reading 'supply')
    at parseSupplyMarkets (http://localhost:3000/static/js/bundle.js:149275:32)
    at Object.getSuppliedMarkets (http://localhost:3000/static/js/bundle.js:149298:15)
    at http://localhost:3000/static/js/bundle.js:10777:99
    at http://localhost:3000/static/js/bundle.js:141645:18
    at isWallet (http://localhost:3000/static/js/bundle.js:1283:9)

Expected Behavior:
The parseSupplyMarkets function should handle undefined properties gracefully without throwing runtime errors.

Actual Behavior:
The function throws a TypeError when attempting to read the supply property of undefined.

Potential Fix:
Check if the object containing supply is undefined before attempting to read the supply property.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions