Steps to reproduce:
Load an arbitrary PlutusV3 transaction that has redeemers, but does not have any datums, then apply it as an argument to calc_script_hash_from_witness you will get undefined. I believe this is because calc_script_hash_from_witness checks that both the datums and redeemers are Some, and as such does not work properly when only one is defined.
Please modify the function so that it works on transactions with redeemers but no datums.
Steps to reproduce:
Load an arbitrary PlutusV3 transaction that has redeemers, but does not have any datums, then apply it as an argument to
calc_script_hash_from_witnessyou will get undefined. I believe this is becausecalc_script_hash_from_witnesschecks that both the datums and redeemers areSome, and as such does not work properly when only one is defined.Please modify the function so that it works on transactions with redeemers but no datums.