appendEmptySignatures method

Tx appendEmptySignatures(
  1. List<SignerData> signers
)

Implementation

Tx appendEmptySignatures(List<SignerData> signers) {
  for (var signer in signers) {
    SignerInfo? signerInfo;
    if (signer.publicKey != null) {
      if (signer.publicKey!.isMultiSig()) {
        //  signerInfo = SignerInfo(signer.publicKey!, signer.sequenceNumber!,
        //      new SignatureV2n.ModeInfo(new SignatureV2Multi(CompactBitArray.FromBits((uint)signer.Key._keys.Length),
        //      new SignatureV2n.SignatureV2Descriptor[] { })));
      } else {
        signerInfo = SignerInfo(
            signer.publicKey!,
            signer.sequenceNumber!,
            ModeInfo(SignatureV2Single(
                mode: SignMode.SIGN_MODE_DIRECT,
                signature: signer.publicKey!.key ?? "")));
      }
    } else {
      signerInfo = SignerInfo(
          signer.publicKey!,
          signer.sequenceNumber!,
          ModeInfo(SignatureV2Single(
              mode: SignMode.SIGN_MODE_DIRECT, signature: "")));
    }

    if (signerInfo == null) {
      auth_info.signer_infos!.add(signerInfo!);
    }
  }

  return this;
}