Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

algod/client/model/Transaction API response model only supports reporting PaymentTransactionType transaction info #71

Closed
EvanJRichard opened this issue Dec 9, 2019 · 3 comments
Labels
bug Something isn't working FDE obsolete

Comments

@EvanJRichard
Copy link
Contributor

found by @algonautshant
The REST model of a Transaction returned by a TransactionInformation GET will only decode Payment fields. It does not support KeyReg fields or any asset fields. So, if you use the java SDK to GET information about (for example) an asset transfer transaction, you do not get information such as the asset receiver.

@EvanJRichard EvanJRichard added the bug Something isn't working label Dec 9, 2019
@algonautshant
Copy link
Contributor

In case of asset send transaction, since it is not a payment transaction, there will be no PaymentTransactionType. The "to" field is in PaymentTransactionType and not in Transaction. How can one obtain the asset receiver information? This is not possible in Java, and this is part of what this issue is about. I am not understanding how this can be done in go.

@EvanJRichard EvanJRichard changed the title Transaction Model only supports payment information algod/client/model/Transaction returned from only supports payment information Jan 6, 2020
@EvanJRichard EvanJRichard changed the title algod/client/model/Transaction returned from only supports payment information algod/client/model/Transaction API response model only supports reporting PaymentTransactionType transaction info Jan 6, 2020
@EvanJRichard
Copy link
Contributor Author

More context: the algod node potentially reports the following information (go-algorand/daemon/algod/api/spec/v1/model.go) - and of the below, Java only supports PaymentTransactionType

	// This is a list of all supported transactions.
	// To add another one, create a struct with XXXTransactionType and embed it here.
	// To prevent extraneous fields, all must have the "omitempty" tag.

	// Payment contains the additional fields for a payment transaction.
	//
	// required: false
	Payment *PaymentTransactionType `json:"payment,omitempty"`

	// Keyreg contains the additional fields for a keyreg transaction.
	//
	// required: false
	Keyreg *KeyregTransactionType `json:"keyreg,omitempty"`

	// AssetConfig contains the additional fields for an asset config transaction.
	//
	// required: false
	AssetConfig *AssetConfigTransactionType `json:"curcfg,omitempty"`

	// AssetTransfer contains the additional fields for an asset transfer transaction.
	//
	// required: false
	AssetTransfer *AssetTransferTransactionType `json:"curxfer,omitempty"`

	// AssetFreeze contains the additional fields for an asset freeze transaction.
	//
	// required: false
	AssetFreeze *AssetFreezeTransactionType `json:"curfrz,omitempty"`

@EvanJRichard EvanJRichard reopened this Jan 6, 2020
@EvanJRichard EvanJRichard added the 1 Story Point Estimate (Algorand internal use only) label Jan 13, 2020
@ian-algorand ian-algorand added FDE and removed 1 Story Point Estimate (Algorand internal use only) labels May 7, 2020
@ian-algorand
Copy link

fixed with API v2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working FDE obsolete
Projects
None yet
Development

No branches or pull requests

4 participants