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: unit test and fix fetchStxPendingTxData function #204

Conversation

teebszet
Copy link
Member

@teebszet teebszet commented Aug 9, 2023

🔘 PR Type

What kind of change does this PR introduce?

  • Bugfix

📜 Background

Issue Link: https://linear.app/xverseapp/issue/ENG-2581/unit-test-and-fix-fetch-fetchpendingstxtransactions-function
Context Link (if applicable):

🔄 Changes

Does this PR introduce a breaking change?

  • Yes, Incompatible API changes
  • No, Adds functionality (backwards compatible)
  • No, Bug fixes (backwards compatible)

Changes:

  • fix logic in fetchStxPendingTxData
  • add unit tests

Impact:

  • fetchStxPendingTxData
  • fetchStxAddressData (total_transactions)

🖼 Screenshot / 📹 Video

✅ Review checklist

Please ensure the following are true before merging:

  • Code Style is consistent with the project guidelines.
  • Code is readable and well-commented.
  • No unnecessary or debugging code has been added.
  • Security considerations have been taken into account.
  • The change has been manually tested and works as expected.
  • Breaking changes and their impacts have been considered and documented.
  • Code does not introduce new technical debt or issues.

@teebszet teebszet requested a review from yknl August 9, 2023 04:51
@@ -151,20 +151,24 @@ export function parseBtcTransactionData(
return parsedTx;
}

export function deDuplicatePendingTx({
export function getUniquePendingTx({
Copy link
Contributor

Choose a reason for hiding this comment

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

Is deDuplicatePendingTx used anywhere else? Potentially directly imported by the app and extension?

Copy link
Member Author

@teebszet teebszet Aug 9, 2023

Choose a reason for hiding this comment

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

@yknl xverse-core doesn't export the helper.ts functions, so the export is only available locally to the package:

api/index.ts

export * from './btc';
export * from './xverse';
export * from './stacks';
export * from './gamma';
export * from './ordinals';
export * from './esplora/esploraAPiProvider';
export * from './ordinals/provider';

@teebszet teebszet changed the title Tim/eng 2581 unit test and fix fetch fetchpendingstxtransactions function fix: unit test and fix fetch fetchpendingstxtransactions function Aug 9, 2023
@teebszet teebszet changed the title fix: unit test and fix fetch fetchpendingstxtransactions function fix: unit test and fix fetchStxPendingTransactions function Aug 9, 2023
@teebszet teebszet changed the title fix: unit test and fix fetchStxPendingTransactions function fix: unit test and fix fetchStxPendingTxData function Aug 9, 2023
@teebszet
Copy link
Member Author

teebszet commented Aug 9, 2023

renamed to: #205

@teebszet teebszet closed this Aug 9, 2023
@victorkirov victorkirov deleted the tim/eng-2581-unit-test-and-fix-fetch-fetchpendingstxtransactions-function branch October 31, 2023 06:59
teebszet added a commit that referenced this pull request Oct 8, 2024
* refactor: gather fungible token derived state into one place

and add unit tests

* refactor: add visible back and deprecate it so PR core is not breaking change

* chore: readability

Co-authored-by: Victor Kirov <[email protected]>

* fix: move the logic to always support runes tokens to be clearer

* chore: add comments and readability

* chore: extend manageTokens type to cater for tokens that were not set yet

---------

Co-authored-by: Victor Kirov <[email protected]>
Co-authored-by: fede erbes <[email protected]>
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