/**
* Finalize the transaction group and returned the finalized transactions.
*
* The composer's status will be at least BUILT after executing this method.
 */
Finalize the transaction group and returned the finalized transactions.

The composer's status will be at least BUILT after executing this method.
/ ** * Finalize the transaction group and returned the finalized transactions . * * The composer ' s status will be at least BUILT after executing this method . * /
func (atc *AtomicTransactionComposer) BuildGroup() ([]TransactionWithSigner, error) {
	if atc.status > BUILDING {
		return atc.getFinalizedTxWithSigners(), nil
	}
	if atc.Count() == 0 {
		return nil, fmt.Errorf("attempting to build group with zero transactions")
	}
	var txns []types.Transaction
	for _, txContext := range atc.txContexts {
		txns = append(txns, txContext.txn)
	}
	gid, err := crypto.ComputeGroupID(txns)
	if err != nil {
		return nil, err
	}
	for i := range atc.txContexts {
		atc.txContexts[i].txn.Group = gid
	}
	atc.status = BUILT
	return atc.getFinalizedTxWithSigners(), nil
}
func ( atc * AtomicTransactionComposer ) BuildGroup ( ) ( [ ] TransactionWithSigner , error ) { if atc . status > BUILDING { return atc . getFinalizedTxWithSigners ( ) , nil } if atc . Count ( ) == 0 { return nil , fmt . Errorf ( " " ) } var txns [ ] types . Transaction for _ , txContext := range atc . txContexts { txns = append ( txns , txContext . txn ) } gid , err := crypto . ComputeGroupID ( txns ) if err != nil { return nil , err } for i := range atc . txContexts { atc . txContexts [ i ] . txn . Group = gid } atc . status = BUILT return atc . getFinalizedTxWithSigners ( ) , nil }
Finalize the transaction group and returned the finalized transactions.
Finalize the transaction group and returned the finalized transactions .