Add integration/unit test coverage for transaction history, search, holders, and sell payout - #715
Merged
Conversation
…olders, and sell payout
|
@CeceOs92 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds test coverage (and, where the feature didn't exist yet, the minimal implementation to support it) across four areas of the public API and pricing logic:
/wallets/:address/activityendpoint always returns entries newest-first, with sort order preserved across paginated pages.Alice/Alicia/Bob/Bobby) and asserting/creators?search=returns only correct partial, case-insensitive matches./creators/:id/holderswas missingkey_count,share_percent,rank, and a deterministic tie-break. Added these (additive, non-breaking) plus a secondaryownerAddress ascsort, and a real-DB integration test verifying descending key-count order, alphabetical tie-break, required response fields, and thatshare_percentsums to 100% across all holders.computeSellPayout, the sell-side counterpart tocomputeBuyCost, applying the bonding curve formula and deducting the protocol fee. Added unit tests for 5%/0%/100% fee rates, the last-key-sell case, and the non-negative payout guarantee.Changes
src/modules/creators/creator-holders.service.ts— addkey_count,share_percent,rankfields; addownerAddresstie-break to sort.src/modules/creators/creator-holders.integration.test.ts,creator-holders-held-since.integration.test.ts— update fixtures for new requiredHolderRecordfields.src/utils/pricing.utils.ts— addcomputeSellPayout.src/utils/pricing.utils.test.ts— unit tests forcomputeSellPayout.src/__tests__/integration/wallet-activity-order.integration.test.ts— new.src/__tests__/integration/creator-holders-key-count-sort.integration.test.ts— new.src/modules/creators/creator-list-search-partial-name.integration.test.ts— new.Closes #683
Closes #685
Closes #692
Closes #694