Skip to content

Commit

Permalink
Fixes TS issues 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 8076aab
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
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
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 8076aab

Please sign in to comment.