algorand / algorand/java-algorand-sdk

TransactionId empty if SignedTransaction initialized by constructor @JsonCreator

Offen
#424 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug Team Lamprey
Vorherrschende Sprache
Java
Sterne
73
Forks
71
Ø Merge
41 Min.
Gemergte PRs (30 T.)
2

Beschreibung

## Problem

The SignedTransaction created by deserialization JSON (@JSONCreator) doesn't fill the attribute transactionId.
https://github.com/algorand/java-algorand-sdk/blob/develop/src/main/java/com/algorand/algosdk/transaction/SignedTransaction.java#L80

So with Atomic Composer if I put a TxnSigner as a external request that works with deserialization of SignedTransaction, It will not work cause the transactionId is emtpy.
https://github.com/algorand/java-algorand-sdk/blob/develop/src/main/java/com/algorand/algosdk/transaction/AtomicTransactionComposer.java#L188

## Solution

We could add the transactionId into the constructor through@JSONCreator or other options proposed by barnji:
instead of using the txid directly from signed transaction object, use signedtransaction.tx.getTxId() or w/e its called in the atc.
it'd be redundant hashing possibly but safer in the case of a enc/dec stxn

## Dependencies

No dependencies

## Urgency

Low Urgency, easy to implement a workaround

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.