toModeInfoAndSignature method

ModeSignature toModeInfoAndSignature()

Implementation

ModeSignature toModeInfoAndSignature() {
  if (single != null) {
    var sigData = single;
    return ModeSignature(
        ModeInfo(SignatureV2Single(
            mode: sigData!.mode, signature: sigData.signature ?? "")),
        sigData.signature);
  }

  //if (this.Multi != null)
  //{
  //    var sigData = this.Multi;
  //    List<ModeInfo> modeInfos = new List<ModeInfo>();
  //    List<byte[]> signatures = new List<byte[]>();
  //    foreach (var signature in sigData.signatures)
  //    {
  //        var sig = signature.ToModeInfoAndSignature();
  //        modeInfos.Add(sig.Key);
  //        signatures.Add(sig.Value);
  //    }

  //    var multisigBytes = ProtoExtensions.SerialiseFromData(new PROTO.MultiSignature()
  //    {
  //        Signatures = signatures
  //    });

  //    return new KeyValuePair<ModeInfo, byte[]>(
  //        new ModeInfo(new SignatureV2Multi(sigData.bitArray, sigData.signatures)),
  //        multisigBytes);
  //}

  throw Exception("");
}