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

Transaction::note is a base64 string, but should probably be decoded. #147

Open
AlterionX opened this issue Mar 18, 2022 · 1 comment
Open

Comments

@AlterionX
Copy link
Contributor

AlterionX commented Mar 18, 2022

Is your feature request related to a problem? Please describe.
The note for Transactions retrieved from the indexer is a base64 string. This is rather unexpected.

Describe the solution you'd like
The base64 string should be decoded 99% of the time. I'd say 100, but I'm sure there are use cases.

Describe alternatives you've considered
Leaving it as is, mostly.

Additional context
Possibly related to #98

@ivnsch
Copy link
Contributor

ivnsch commented Mar 19, 2022

We could use the same Transaction / ApiTransaction struct everywhere (modified to support deserialization from JSON and MessagePack). It would have to be checked that the indexer's Transaction is meant to be the same instance / has the same fields https://developer.algorand.org/docs/rest-apis/indexer/#transaction.

A variant could be to have a new version of ApiTransaction (which is meant to be 1:1 with the API model) that deserializes from JSON and convert it manually to Transaction (which is the domain representation).

On a more local level - if these are not possible, I agree that we should decode the note (and perhaps add convenience to convert it to e.g. utf-8 text).

Relates also to #142.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants