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: Add virtual third parties #772

Merged
merged 10 commits into from
Sep 20, 2024
Merged

Conversation

LautaroPetaccio
Copy link
Contributor

This PR adds the capability of using creating virtual third parties. That is, third parties created with the purpose of being temporary third parties until the registration is done on chain.

@coveralls
Copy link

coveralls commented Sep 11, 2024

Pull Request Test Coverage Report for Build 10965795567

Details

  • 107 of 117 (91.45%) changed or added relevant lines in 13 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 71.664%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/ThirdParty/ThirdParty.router.ts 17 18 94.44%
src/ThirdParty/VirtualThirdParty.model.ts 3 4 75.0%
src/Collection/Collection.service.ts 9 11 81.82%
src/ThirdParty/ThirdParty.service.ts 35 41 85.37%
Totals Coverage Status
Change from base Build 10927296799: 0.1%
Covered Lines: 3141
Relevant Lines: 4231

💛 - Coveralls

src/ThirdParty/ThirdParty.router.ts Dismissed Show dismissed Hide dismissed
@@ -11,7 +11,7 @@ import { ItemCuration } from '../Curation/ItemCuration'
import { Bridge } from '../ethereum/api/Bridge'
import { collectionAPI } from '../ethereum/api/collection'
import { peerAPI } from '../ethereum/api/peer'
import { thirdPartyAPI } from '../ethereum/api/thirdParty'
// import { thirdPartyAPI } from '../ethereum/api/thirdParty'
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// import { thirdPartyAPI } from '../ethereum/api/thirdParty'

@@ -49,6 +49,7 @@ import {
isTPItem,
toDBItem,
} from './utils'
import { ThirdPartyService } from '../ThirdParty/ThirdParty.service'
Copy link
Contributor

Choose a reason for hiding this comment

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

could you move this import above?

operation: 'UPDATE',
level: 'ROW',
function: update_updated_at_column_function_name,
condition: 'OLD.* IS DISTINCT FROM NEW.*',
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't the updated_at field be updated with each update? or should it meet a specific condition?

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 updated_at column will get updated only if any column in the row gets updated to something new. If it doesn't, we'll be saving a write operation by not updating the updated_at.

: ([] as ThirdParty[]),
])
const graphThirdParties = fragments.map(toThirdParty)
console.log({ graphThirdParties, virtualThirdParties })
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
console.log({ graphThirdParties, virtualThirdParties })

@LautaroPetaccio LautaroPetaccio merged commit cfe492e into master Sep 20, 2024
4 checks passed
@LautaroPetaccio LautaroPetaccio deleted the feat/add-virtual-third-parties branch September 20, 2024 20:28
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