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

fix: use txResponse events instead of rawLog for parsing AssetClassificationEvents #140

Merged
merged 2 commits into from
Aug 21, 2024

Conversation

rgipson-figure
Copy link
Contributor

@rgipson-figure rgipson-figure commented Aug 21, 2024

Context

Failed calling manualVerifyHash against a txn in provenance 1.9.0 due to rawLog being an empty string (possibly deprecated) when parsing for AssetClassificationEvents

com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
 at [Source: (String)""; line: 1, column: 0]

Changes

Use the events from the cosmos proto for mapping to AssetClassificationEvents

key = attribute.key,
value = attribute.value
key = attribute.key.toStringUtf8(),
value = attribute.value.toStringUtf8()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

)
},
fee = sourceTx.tx.authInfo.fee.amountList.firstOrNull()?.amount?.toBigIntegerOrNull(),
denom = sourceTx.tx.authInfo.fee.amountList.firstOrNull()?.denom,
note = null
),
inputValuesEncoded = false
inputValuesEncoded = true
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The examples I've seen from the txn client have returned the values as encoded for wasm; not sure if rawLogs had them encoded. This will need tested

@rgipson-figure rgipson-figure changed the title fix: use events instead of raw log for retrying dart validation fix: use events instead of raw log for parsing AssetClassificationEvents Aug 21, 2024
@rgipson-figure rgipson-figure changed the title fix: use events instead of raw log for parsing AssetClassificationEvents fix: use txResponse events instead of rawLog for parsing AssetClassificationEvents Aug 21, 2024
mtps
mtps previously approved these changes Aug 21, 2024
hyperschwartz
hyperschwartz previously approved these changes Aug 21, 2024
@rgipson-figure rgipson-figure dismissed stale reviews from hyperschwartz and mtps via 39ffa39 August 21, 2024 17:47
@rgipson-figure rgipson-figure marked this pull request as ready for review August 21, 2024 17:49
@rgipson-figure rgipson-figure requested a review from a team as a code owner August 21, 2024 17:49
@rgipson-figure rgipson-figure merged commit 000d5e1 into main Aug 21, 2024
1 check passed
@rgipson-figure rgipson-figure deleted the hotfix/deprecate-raw-log branch August 21, 2024 17:53
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.

4 participants