Skip to content

Fix partial fromJust in votingScriptWitnessSingleton #1129

@Jimbo4350

Description

@Jimbo4350

Bug

votingScriptWitnessSingleton calls fromJust on the result of getVotingScriptCredentials, which returns Nothing when the VotingProcedures map is empty. Passing an empty VotingProcedures paired with a witness crashes at runtime.

The bug exists in two places:

Fix

votingScriptWitnessSingleton should return Map.empty when getVotingScriptCredentials returns Nothing, rather than calling fromJust.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions