message: chore(utxo-lib): wrap verifySignature checks for zcash as unsafe
diff: @@ -8,6 +8,7 @@ import { Network, PsbtTransaction, Signer } from '../../';
  import { Psbt as PsbtBase } from 'bip174';
  import * as types from 'bitcoinjs-lib/src/types';
  import { UtxoTransaction } from '../UtxoTransaction';
  +import { ValidateSigFunction } from 'bitcoinjs-lib/src/psbt';
  const typeforce = require('typeforce');
  enum Subtype {
  @@ -128,9 +129,17 @@ export class ZcashPsbt extends UtxoPsbt<ZcashTransaction<bigint>> {
  // transactions because zcash hashes the value directly. Thus, it is unnecessary to have
  // the previous transaction hash on the unspent.
  signInput(inputIndex: number, keyPair: Signer, sighashTypes?: number[]): this {
  + return this.withUnsafeSignNonSegwitTrue(super.signInput.bind(this, inputIndex, keyPair, sighashTypes));
  + }
  +
  + validateSignaturesOfInput(inputIndex: number, validator: ValidateSigFunction, pubkey?: Buffer): boolean {
  + return this.withUnsafeSignNonSegwitTrue(super.validateSignaturesOfInput.bind(this, inputIndex, validator, pubkey));
  + }
  +
  + private withUnsafeSignNonSegwitTrue<T>(fn: () => T): T {
  (this as any).__CACHE.__UNSAFE_SIGN_NONSEGWIT = true;
  try {
  - return super.signInput(inputIndex, keyPair, sighashTypes);
  + return fn();
  } finally {
  (this as any).__CACHE.__UNSAFE_SIGN_NONSEGWIT = false;
  }
  