case xdr.EnvelopeType.envelopeTypeTx():
        envelope = new xdr.TransactionEnvelope.envelopeTypeTx(
          new xdr.TransactionV1Envelope({
            tx: xdr.Transaction.fromXDR(rawTx), // make a copy of tx
            signatures