diff --git a/packages/api-bindings/src/lens/__helpers__/queries/transaction.ts b/packages/api-bindings/src/lens/__helpers__/queries/transaction.ts index ec5e7cc1b4..0d513a9fd6 100644 --- a/packages/api-bindings/src/lens/__helpers__/queries/transaction.ts +++ b/packages/api-bindings/src/lens/__helpers__/queries/transaction.ts @@ -1,5 +1,6 @@ import { MockedResponse } from '@apollo/client/testing'; import { mockTransactionHash } from '@lens-protocol/domain/mocks'; + import { LensTransactionStatusData, LensTransactionStatusRequest, diff --git a/packages/domain/src/use-cases/authentication/__tests__/Bootstrap.spec.ts b/packages/domain/src/use-cases/authentication/__tests__/Bootstrap.spec.ts index 7bb748da3b..7616000bad 100644 --- a/packages/domain/src/use-cases/authentication/__tests__/Bootstrap.spec.ts +++ b/packages/domain/src/use-cases/authentication/__tests__/Bootstrap.spec.ts @@ -13,6 +13,7 @@ import { IBootstrapPresenter, } from '../Bootstrap'; import { Logout, LogoutReason } from '../Logout'; +import { anonymousSessionData } from '../SessionData'; type BootstrapSetupConfig = { credentialsGateway?: ICredentialsGateway; @@ -54,7 +55,7 @@ describe(`Given the ${Bootstrap.name} interactor`, () => { await bootstrap.execute(); - expect(presenter.anonymous).toHaveBeenCalled(); + expect(presenter.present).toHaveBeenCalledWith(anonymousSessionData()); }); }); diff --git a/packages/react/src/authentication/adapters/AuthApi.ts b/packages/react/src/authentication/adapters/AuthApi.ts index a7762285f0..3286088d39 100644 --- a/packages/react/src/authentication/adapters/AuthApi.ts +++ b/packages/react/src/authentication/adapters/AuthApi.ts @@ -9,14 +9,13 @@ import { AuthRefreshData, AuthRefreshVariables, SafeApolloClient, - AuthChallenge, ChallengeRequest, SignedAuthChallenge, } from '@lens-protocol/api-bindings'; import { Credentials } from './Credentials'; -export type Challenge = { +export type AuthChallenge = { id: string; text: string; }; diff --git a/packages/react/src/authentication/adapters/__tests__/CredentialsFactory.spec.ts b/packages/react/src/authentication/adapters/__tests__/CredentialsFactory.spec.ts index c8de7a6179..b8a1610417 100644 --- a/packages/react/src/authentication/adapters/__tests__/CredentialsFactory.spec.ts +++ b/packages/react/src/authentication/adapters/__tests__/CredentialsFactory.spec.ts @@ -11,12 +11,12 @@ import { failure, success } from '@lens-protocol/shared-kernel'; import { mock } from 'jest-mock-extended'; import { when } from 'jest-when'; -import { AuthApi, Challenge } from '../AuthApi'; +import { AuthApi, AuthChallenge } from '../AuthApi'; import { Credentials } from '../Credentials'; import { CredentialsFactory } from '../CredentialsFactory'; import { mockCredentials } from '../__helpers__/mocks'; -const challenge: Challenge = { +const challenge: AuthChallenge = { id: faker.datatype.uuid(), text: 'Challenge to sign from backend', }; diff --git a/packages/react/src/wallet/adapters/__tests__/ConcreteWallet.spec.ts b/packages/react/src/wallet/adapters/__tests__/ConcreteWallet.spec.ts index 720cb606d7..e1ee82f837 100644 --- a/packages/react/src/wallet/adapters/__tests__/ConcreteWallet.spec.ts +++ b/packages/react/src/wallet/adapters/__tests__/ConcreteWallet.spec.ts @@ -44,13 +44,7 @@ const chainType = ChainType.POLYGON; function setupWalletInstance({ signerFactory }: { signerFactory: ISignerFactory }) { const transactionFactory = mockITransactionFactory(); - return ConcreteWallet.create( - { - address, - }, - signerFactory, - transactionFactory, - ); + return ConcreteWallet.create(address, signerFactory, transactionFactory); } describe(`Given an instance of ${ConcreteWallet.name}`, () => { diff --git a/packages/react/src/wallet/infrastructure/__helpers__/mocks.ts b/packages/react/src/wallet/infrastructure/__helpers__/mocks.ts index df16040a1f..864f88c792 100644 --- a/packages/react/src/wallet/infrastructure/__helpers__/mocks.ts +++ b/packages/react/src/wallet/infrastructure/__helpers__/mocks.ts @@ -5,7 +5,7 @@ import { mock } from 'jest-mock-extended'; import { when } from 'jest-when'; import { production } from '../../../environments'; -import { RequiredSigner } from '../../../wallet/adapters/ConcreteWallet'; +import { RequiredSigner } from '../../adapters/ConcreteWallet'; import { ISignerBinding } from '../SignerFactory'; export class VoidJsonRpcProvider extends providers.JsonRpcProvider { diff --git a/packages/shared-kernel/src/ts-helpers/types.ts b/packages/shared-kernel/src/ts-helpers/types.ts index 017f327e49..06da046279 100644 --- a/packages/shared-kernel/src/ts-helpers/types.ts +++ b/packages/shared-kernel/src/ts-helpers/types.ts @@ -158,11 +158,11 @@ export type Prettify = { // eslint-disable-next-line @typescript-eslint/ban-types } & {}; -declare const brand: unique symbol; - /** * Branding function * * @internal */ -export type Brand = T & { [brand]: TBrand }; +export type Brand = T & { + [K in ReservedName]: TBrand; +};