-
Notifications
You must be signed in to change notification settings - Fork 13
test: use algokit-polytest go-algorand transaction generator #494
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
Conversation
packages/transact/tests/common.ts
Outdated
| key, | ||
| { | ||
| id: value.id, | ||
| transaction: new Transaction(transformTransaction(value.stxn.txn)), |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
a32dea8 to
5d982cb
Compare
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