Skip to content

Commit

Permalink
feat: Add isApproved to the ThirdParty endpoint (#763)
Browse files Browse the repository at this point in the history
* feat: Add isApproved to the ThirdParty endpoitng

* fix: Tests

* fix: Types
  • Loading branch information
LautaroPetaccio committed Aug 9, 2024
1 parent fe43e60 commit 77c0dfa
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions spec/mocks/collections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export const thirdPartyFragmentMock: ThirdPartyFragment = {
id: dbTPCollectionMock.third_party_id,
root: 'aRoot',
managers: [wallet.address],
isApproved: true,
maxItems: '10',
metadata: {
type: ThirdPartyMetadataType.THIRD_PARTY_V1,
Expand Down
2 changes: 2 additions & 0 deletions src/ThirdParty/ThirdParty.router.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ describe('ThirdParty router', () => {
{
id: '1',
root: 'aRoot',
isApproved: true,
managers: ['0x1'],
maxItems: '3',
metadata,
},
{
id: '2',
root: 'anotherRoot',
isApproved: true,
managers: ['0x2', '0x3'],
maxItems: '2',
metadata,
Expand Down
4 changes: 4 additions & 0 deletions src/ThirdParty/utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ describe('toThirdParty', () => {
root: 'aRoot',
managers: ['0x1', '0x2'],
maxItems: '1',
isApproved: true,
metadata: {
type: ThirdPartyMetadataType.THIRD_PARTY_V1,
thirdParty: {
Expand All @@ -34,6 +35,7 @@ describe('toThirdParty', () => {
root: fragment.root,
managers: fragment.managers,
maxItems: fragment.maxItems,
isApproved: true,
name: name,
description: description,
contracts: [{ network: 'amoy', address: '0x0' }],
Expand All @@ -51,6 +53,7 @@ describe('toThirdParty', () => {
root: 'aRoot',
managers: ['0x2'],
maxItems: '2',
isApproved: true,
metadata: {
type: ThirdPartyMetadataType.THIRD_PARTY_V1,
thirdParty: null,
Expand All @@ -64,6 +67,7 @@ describe('toThirdParty', () => {
root: fragment.root,
managers: fragment.managers,
maxItems: fragment.maxItems,
isApproved: fragment.isApproved,
name: '',
description: '',
contracts: [],
Expand Down
2 changes: 2 additions & 0 deletions src/ethereum/api/fragments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export const thirdPartyFragment = () => gql`
root
managers
maxItems
isApproved
metadata {
type
thirdParty {
Expand Down Expand Up @@ -168,6 +169,7 @@ export type CollectionFragment = {
export type ThirdPartyFragment = {
id: string
root: string
isApproved: boolean
managers: string[]
maxItems: string
metadata: ThirdPartyMetadata
Expand Down

0 comments on commit 77c0dfa

Please sign in to comment.