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

feat: use xrpl.js types and simplify tx parsers #776

Merged
merged 17 commits into from
Jul 26, 2023

Conversation

ckniffen
Copy link
Collaborator

@ckniffen ckniffen commented Jul 7, 2023

High Level Overview of Change

  • Use xrpl.js types for transactions and portions of a transaction like Memos and Metadata.
  • Update simple tx parsers to just use the defaultParser. parser is now an option property of a TransactionMapping.

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Refactor (non-breaking change that only restructures code)

Future updates

Use more types from xrpl.js once they are exported and fixed.

@ckniffen ckniffen force-pushed the feature/use-xrpl-js-types-take-2 branch from 060df10 to 0f3f90b Compare July 7, 2023 22:04
Copy link
Contributor

@jonathanlei jonathanlei left a comment

Choose a reason for hiding this comment

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

Do tests need to be updated?

@ckniffen
Copy link
Collaborator Author

ckniffen commented Jul 8, 2023

Do tests need to be updated?

No because this just updated types and parsers. Since only the output displayed the the user was changed no tests should need to be updated.

) => {
const { t, i18n } = useTranslation()
const language = i18n.resolvedLanguage
const { data } = props
const deleted: any = findNode(data, 'DeletedNode', 'Escrow')
const deleted: any = findNode(data.meta, 'DeletedNode', 'Escrow')
Copy link
Collaborator

Choose a reason for hiding this comment

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

ditto

@@ -18,7 +18,7 @@ export const Description = ({
tx.CancelAfter &&
localizeDate(convertRippleDate(tx.CancelAfter), language, DATE_OPTIONS)

const node = findNode(data, 'CreatedNode', 'PayChannel')
const node = findNode(data.meta, 'CreatedNode', 'PayChannel')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't this happen in the parser?

@ckniffen ckniffen merged commit 600cd0b into staging Jul 26, 2023
4 checks passed
@ckniffen ckniffen deleted the feature/use-xrpl-js-types-take-2 branch July 26, 2023 17:35
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.

3 participants