Skip to content

Commit

Permalink
fix: Was using ts version of protocol (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinszuchet authored Jan 17, 2025
1 parent 9fc2e78 commit 99e3e10
Show file tree
Hide file tree
Showing 17 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/adapters/rpc-server/rpc-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { getMutualFriendsService } from './services/get-mutual-friends'
import { getPendingFriendshipRequestsService } from './services/get-pending-friendship-requests'
import { upsertFriendshipService } from './services/upsert-friendship'
import { subscribeToFriendshipUpdatesService } from './services/subscribe-to-friendship-updates'
import { SocialServiceDefinition } from '@dcl/protocol/out-ts/decentraland/social_service/v3/social_service_v3.gen'
import { SocialServiceDefinition } from '@dcl/protocol/out-js/decentraland/social_service/v3/social_service_v3.gen'
import { getSentFriendshipRequestsService } from './services/get-sent-friendship-requests'
import { getFriendshipStatusService } from './services/get-friendship-status'

Expand Down
2 changes: 1 addition & 1 deletion src/adapters/rpc-server/services/get-friends.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { FRIENDSHIPS_PER_PAGE, INTERNAL_SERVER_ERROR } from '../constants'
import {
GetFriendsPayload,
PaginatedUsersResponse
} from '@dcl/protocol/out-ts/decentraland/social_service/v3/social_service_v3.gen'
} from '@dcl/protocol/out-js/decentraland/social_service/v3/social_service_v3.gen'

export function getFriendsService({ components: { logs, db } }: RPCServiceContext<'logs' | 'db'>) {
const logger = logs.getLogger('get-friends-service')
Expand Down
2 changes: 1 addition & 1 deletion src/adapters/rpc-server/services/get-friendship-status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { RpcServerContext, RPCServiceContext } from '../../../types'
import {
GetFriendshipStatusPayload,
GetFriendshipStatusResponse
} from '@dcl/protocol/out-ts/decentraland/social_service/v3/social_service_v3.gen'
} from '@dcl/protocol/out-js/decentraland/social_service/v3/social_service_v3.gen'

export function getFriendshipStatusService({ components: { logs, db } }: RPCServiceContext<'logs' | 'db'>) {
const logger = logs.getLogger('get-sent-friendship-requests-service')
Expand Down
2 changes: 1 addition & 1 deletion src/adapters/rpc-server/services/get-mutual-friends.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { INTERNAL_SERVER_ERROR, FRIENDSHIPS_PER_PAGE } from '../constants'
import {
GetMutualFriendsPayload,
PaginatedUsersResponse
} from '@dcl/protocol/out-ts/decentraland/social_service/v3/social_service_v3.gen'
} from '@dcl/protocol/out-js/decentraland/social_service/v3/social_service_v3.gen'
import { normalizeAddress } from '../../../utils/address'
import { getPage } from '../../../utils/pagination'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { RpcServerContext, RPCServiceContext } from '../../../types'
import {
PaginatedFriendshipRequestsResponse,
GetFriendshipRequestsPayload
} from '@dcl/protocol/out-ts/decentraland/social_service/v3/social_service_v3.gen'
} from '@dcl/protocol/out-js/decentraland/social_service/v3/social_service_v3.gen'

export function getPendingFriendshipRequestsService({ components: { logs, db } }: RPCServiceContext<'logs' | 'db'>) {
const logger = logs.getLogger('get-pending-friendship-requests-service')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { RpcServerContext, RPCServiceContext } from '../../../types'
import {
PaginatedFriendshipRequestsResponse,
GetFriendshipRequestsPayload
} from '@dcl/protocol/out-ts/decentraland/social_service/v3/social_service_v3.gen'
} from '@dcl/protocol/out-js/decentraland/social_service/v3/social_service_v3.gen'

export function getSentFriendshipRequestsService({ components: { logs, db } }: RPCServiceContext<'logs' | 'db'>) {
const logger = logs.getLogger('get-sent-friendship-requests-service')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Empty } from '@dcl/protocol/out-ts/google/protobuf/empty.gen'
import { Empty } from '@dcl/protocol/out-js/google/protobuf/empty.gen'
import { RpcServerContext, RPCServiceContext, SubscriptionEventsEmitter } from '../../../types'
import { FriendshipUpdate } from '@dcl/protocol/out-ts/decentraland/social_service/v3/social_service_v3.gen'
import { FriendshipUpdate } from '@dcl/protocol/out-js/decentraland/social_service/v3/social_service_v3.gen'
import mitt from 'mitt'
import { parseEmittedUpdateToFriendshipUpdate } from '../../../logic/friendships'
import emitterToAsyncGenerator from '../../../utils/emitterToGenerator'
Expand Down
2 changes: 1 addition & 1 deletion src/adapters/rpc-server/services/upsert-friendship.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Action, FriendshipStatus, RpcServerContext, RPCServiceContext } from '.
import {
UpsertFriendshipPayload,
UpsertFriendshipResponse
} from '@dcl/protocol/out-ts/decentraland/social_service/v3/social_service_v3.gen'
} from '@dcl/protocol/out-js/decentraland/social_service/v3/social_service_v3.gen'
import {
parseUpsertFriendshipRequest,
validateNewFriendshipAction,
Expand Down
2 changes: 1 addition & 1 deletion src/logic/friendships.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
FriendshipUpdate,
UpsertFriendshipPayload,
FriendshipStatus as FriendshipRequestStatus
} from '@dcl/protocol/out-ts/decentraland/social_service/v3/social_service_v3.gen'
} from '@dcl/protocol/out-js/decentraland/social_service/v3/social_service_v3.gen'
import {
Action,
FRIENDSHIP_ACTION_TRANSITIONS,
Expand Down
2 changes: 1 addition & 1 deletion test/mocks/empty-request.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { Empty } from '@dcl/protocol/out-ts/google/protobuf/empty.gen'
import { Empty } from '@dcl/protocol/out-js/google/protobuf/empty.gen'

export const emptyRequest = {} as Empty
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
FriendshipStatus,
GetFriendshipStatusPayload,
GetFriendshipStatusResponse
} from '@dcl/protocol/out-ts/decentraland/social_service/v3/social_service_v3.gen'
} from '@dcl/protocol/out-js/decentraland/social_service/v3/social_service_v3.gen'
import { mockDb, mockLogs } from '../../../../mocks/components'

describe('getFriendshipStatusService', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { mockDb, mockLogs } from '../../../../mocks/components'
import { getMutualFriendsService } from '../../../../../src/adapters/rpc-server/services/get-mutual-friends'
import { INTERNAL_SERVER_ERROR, FRIENDSHIPS_PER_PAGE } from '../../../../../src/adapters/rpc-server/constants'
import { GetMutualFriendsPayload } from '@dcl/protocol/out-ts/decentraland/social_service/v3/social_service_v3.gen'
import { GetMutualFriendsPayload } from '@dcl/protocol/out-js/decentraland/social_service/v3/social_service_v3.gen'
import { RpcServerContext, AppComponents } from '../../../../../src/types'

describe('getMutualFriendsService', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { mockDb, mockLogs } from '../../../../mocks/components'
import { getPendingFriendshipRequestsService } from '../../../../../src/adapters/rpc-server/services/get-pending-friendship-requests'
import { RpcServerContext, AppComponents } from '../../../../../src/types'
import { PaginatedFriendshipRequestsResponse } from '@dcl/protocol/out-ts/decentraland/social_service/v3/social_service_v3.gen'
import { PaginatedFriendshipRequestsResponse } from '@dcl/protocol/out-js/decentraland/social_service/v3/social_service_v3.gen'
import { emptyRequest } from '../../../../mocks/empty-request'
import { createMockFriendshipRequest, createMockExpectedFriendshipRequest } from '../../../../mocks/friendship-request'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { getSentFriendshipRequestsService } from '../../../../../src/adapters/rp
import { RpcServerContext, AppComponents } from '../../../../../src/types'
import { emptyRequest } from '../../../../mocks/empty-request'
import { createMockFriendshipRequest, createMockExpectedFriendshipRequest } from '../../../../mocks/friendship-request'
import { PaginatedFriendshipRequestsResponse } from '@dcl/protocol/out-ts/decentraland/social_service/v3/social_service_v3.gen'
import { PaginatedFriendshipRequestsResponse } from '@dcl/protocol/out-js/decentraland/social_service/v3/social_service_v3.gen'

describe('getSentFriendshipRequestsService', () => {
let components: jest.Mocked<Pick<AppComponents, 'db' | 'logs'>>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { subscribeToFriendshipUpdatesService } from '../../../../../src/adapters/rpc-server/services/subscribe-to-friendship-updates'
import { Empty } from '@dcl/protocol/out-ts/google/protobuf/empty.gen'
import { Empty } from '@dcl/protocol/out-js/google/protobuf/empty.gen'
import { RpcServerContext, AppComponents } from '../../../../../src/types'
import { mockLogs } from '../../../../mocks/components'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as FriendshipsLogic from '../../../../../src/logic/friendships'
import {
UpsertFriendshipPayload,
UpsertFriendshipResponse
} from '@dcl/protocol/out-ts/decentraland/social_service/v3/social_service_v3.gen'
} from '@dcl/protocol/out-js/decentraland/social_service/v3/social_service_v3.gen'
import { ParsedUpsertFriendshipRequest } from '../../../../../src/logic/friendships'

jest.mock('../../../../../src/logic/friendships')
Expand Down
2 changes: 1 addition & 1 deletion test/unit/logic/friendships.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
validateNewFriendshipAction
} from '../../../src/logic/friendships'
import { Action, FriendshipStatus } from '../../../src/types'
import { FriendshipStatus as FriendshipRequestStatus } from '@dcl/protocol/out-ts/decentraland/social_service/v3/social_service_v3.gen'
import { FriendshipStatus as FriendshipRequestStatus } from '@dcl/protocol/out-js/decentraland/social_service/v3/social_service_v3.gen'

describe('isFriendshipActionValid()', () => {
test('it should be valid if from is null and to is REQUEST ', () => {
Expand Down

0 comments on commit 99e3e10

Please sign in to comment.