This PR changes the type of txSkelSigners to a regular list of wallets instead of a nonempty list. This arguably makes the type TxSkel less "safe", in the sense that there's now another way to write invalid transactions (by forgetting to add signers), but we gain a clearer txSkelTemplate, which doesn't any more contain a "hidden default" wallet 1 signer.
We initially thought that we could have both the type safety of nonempty lists and the convenience and clarity of vanilla lists by using OverloadedLists, but we recently learned that this laguage extension affords no compile-time checks. But then, if an empty list of signers will lead to a run time error anyway, we can just throw it ourselves in the twoplaces that make sense.
This PR changes the type of
txSkelSigners
to a regular list of wallets instead of a nonempty list. This arguably makes the typeTxSkel
less "safe", in the sense that there's now another way to write invalid transactions (by forgetting to add signers), but we gain a clearertxSkelTemplate
, which doesn't any more contain a "hidden default"wallet 1
signer.We initially thought that we could have both the type safety of nonempty lists and the convenience and clarity of vanilla lists by using
OverloadedLists
, but we recently learned that this laguage extension affords no compile-time checks. But then, if an empty list of signers will lead to a run time error anyway, we can just throw it ourselves in the two places that make sense.