Skip to content

Commit

Permalink
fix: supports signless by default experience
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarenaldi committed Feb 24, 2025
1 parent aa3a491 commit 905614c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 19 deletions.
20 changes: 4 additions & 16 deletions packages/client/src/actions/accountManager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,10 @@ import { assertOk, never, uri } from '@lens-protocol/types';
import type { SessionClient } from '../clients';
import { loginAsOnboardingUser, storageClient, wallet } from '../test-utils';
import { handleOperationWith } from '../viem';
import {
createAccountWithUsername,
enableSignless,
fetchAccount,
setAccountMetadata,
} from './account';
import { createAccountWithUsername, fetchAccount, setAccountMetadata } from './account';
import { fetchMeDetails } from './authentication';

describe('Given a new Lens Account', { timeout: 10000 }, () => {
describe(`Given the '${createAccountWithUsername.name}' action`, { timeout: 10000 }, () => {
let newAccount: Account;
let sessionClient: SessionClient;

Expand Down Expand Up @@ -43,15 +38,8 @@ describe('Given a new Lens Account', { timeout: 10000 }, () => {
sessionClient = result.value;
});

describe(`When invoking the '${enableSignless.name}' action`, () => {
beforeAll(async () => {
const result = await enableSignless(sessionClient)
.andThen(handleOperationWith(wallet))
.andThen(sessionClient.waitForTransaction);
assertOk(result);
});

it(`Then it should be reflected in the '${fetchMeDetails.name}' action result`, async () => {
describe('When creating a new Account', () => {
it('Then it should have Signless enabled by defailt', async () => {
const result = await fetchMeDetails(sessionClient);

assertOk(result);
Expand Down
8 changes: 8 additions & 0 deletions packages/graphql/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -1256,6 +1256,11 @@ input CreateAccountWithUsernameRequest {
"""Any account managers you wish to add to the account"""
accountManager: [EvmAddress!]

"""
Enable signless on creation adding the lens API key to the account manager
"""
enableSignless: Boolean! = true

"""The processing params for the namespace create rules."""
createNamespaceRuleProcessingParams: [NamespaceRulesProcessingParams!]

Expand Down Expand Up @@ -6422,6 +6427,7 @@ enum SimpleCollectValidationFailedReason {
LIMIT_REACHED
NOT_ENOUGH_BALANCE
NOT_A_FOLLOWER
POST_DELETED
}

union SimpleCollectValidationOutcome = SimpleCollectValidationPassed | SimpleCollectValidationFailed
Expand Down Expand Up @@ -7189,6 +7195,8 @@ enum TransactionOperation {
SPONSORSHIP_SIGNER_ADDED
SPONSORSHIP_SIGNER_REMOVED
FEED_FACTORY_DEPLOYMENT
ACCOUNT_BLOCKED
ACCOUNT_UNBLOCKED
}

input TransactionStatusRequest {
Expand Down
1 change: 1 addition & 0 deletions packages/graphql/src/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1136,4 +1136,5 @@ export enum SimpleCollectValidationFailedReason {
LimitReached = 'LIMIT_REACHED',
NotEnoughBalance = 'NOT_ENOUGH_BALANCE',
NotAFollower = 'NOT_A_FOLLOWER',
PostDeleted = 'POST_DELETED',
}
Loading

0 comments on commit 905614c

Please sign in to comment.