Skip to content

Commit

Permalink
Fixes TS and linting ssues post rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarenaldi committed Oct 8, 2023
1 parent 1aab105 commit f606a15
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { MockedResponse } from '@apollo/client/testing';
import { mockTransactionHash } from '@lens-protocol/domain/mocks';

import {
LensTransactionStatusData,
LensTransactionStatusRequest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
IBootstrapPresenter,
} from '../Bootstrap';
import { Logout, LogoutReason } from '../Logout';
import { anonymousSessionData } from '../SessionData';

type BootstrapSetupConfig = {
credentialsGateway?: ICredentialsGateway;
Expand Down Expand Up @@ -54,7 +55,7 @@ describe(`Given the ${Bootstrap.name} interactor`, () => {

await bootstrap.execute();

expect(presenter.anonymous).toHaveBeenCalled();
expect(presenter.present).toHaveBeenCalledWith(anonymousSessionData());
});
});

Expand Down
3 changes: 1 addition & 2 deletions packages/react/src/authentication/adapters/AuthApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}`, () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions packages/shared-kernel/src/ts-helpers/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,11 @@ export type Prettify<T> = {
// eslint-disable-next-line @typescript-eslint/ban-types
} & {};

declare const brand: unique symbol;

/**
* Branding function
*
* @internal
*/
export type Brand<T, TBrand> = T & { [brand]: TBrand };
export type Brand<T, TBrand, ReservedName extends string = '__type__'> = T & {
[K in ReservedName]: TBrand;
};

0 comments on commit f606a15

Please sign in to comment.