HcashOrg/hcGUI

DecodeRawTransaction inputs has incorrect amount

coolsnady opened this issue · 0 comments

DecodeRawTransaction inputs has incorrect amount
···
serializedTx := req.SerializedTransaction

var mtx wire.MsgTx
err := mtx.Deserialize(bytes.NewReader(serializedTx))
if err != nil {
	return nil, status.Errorf(codes.InvalidArgument, "Could not decode Tx: %v",
		err)
}

txHash := mtx.TxHash()
resp := &pb.DecodeRawTransactionResponse{
	Transaction: &pb.DecodedTransaction{
		TransactionHash: txHash[:],
		TransactionType: marshalTxType(wallet.TxTransactionType(&mtx)),
		Version:         int32(mtx.Version),
		LockTime:        mtx.LockTime,
		Expiry:          mtx.Expiry,
		Inputs:          marshalDecodedTxInputs(&mtx),
		Outputs:         marshalDecodedTxOutputs(&mtx, s.chainParams),
	},
}

····
more detailed information is required by the HCD query