Can't pass optional params in Contract method. If I mark arg as optional I'm getting error from HL(version 1.4):
class MyContract extends Contract {
async someMethod(ctx, arg1, arg2, optionalArg = undefined) {
// do smth
}
}
// And when I'm calling from client
const res = await contract.submitTransaction('someMethod', 'arg1', 'arg2', 'optional');
// I'm getting arguments error
[DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:0 - endorsement failed -
Error: transaction returned with failure:
Error: Expected 2 parameters, but 3 have been supplied
So Contract method somehow awaits only 2 parameters, but I defined 3...