Skip to content

Conversation

@joe-p
Copy link
Contributor

@joe-p joe-p commented Dec 15, 2025

Uses the data factory from algorandfoundation/algokit-polytest#19

We should probably merge the algokit-polytest PR first so we can point the to algokit-polytest#main

@joe-p joe-p changed the base branch from main to decoupling December 15, 2025 20:09
key,
{
id: value.id,
transaction: new Transaction(transformTransaction(value.stxn.txn)),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think having an independence function here will allow us to test the transaction encode/decode in isolation but I'm a bit concern about the maintenance effort. In the past, debugging issues when converting JSON -> transaction was a time consuming process.
I'm wondering should we use the transaction codec directly here? In my test, switching to use the codec as below

        transaction: new Transaction(transactionParamsCodec.decode(value.stxn.txn, 'json')),

all the tests still pass.

Copy link
Contributor Author

@joe-p joe-p Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in 297dccd I have updated it to use the codec. Note that I did have to add numeric map keys support for JSON, which encodes bigints as strings in the JSON

@joe-p joe-p force-pushed the decoupling-test/transact_polytest branch from a32dea8 to 5d982cb Compare December 17, 2025 14:37
@joe-p joe-p merged commit 3e612c2 into decoupling Dec 18, 2025
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants