Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"yarn": ">=999.0.0",
"npm": ">=999.0.0"
},
"version": "2.32.2",
"version": "2.33.0",
"private": true,
"license": "AGPL-3.0-or-later",
"scripts": {
Expand Down
21 changes: 11 additions & 10 deletions packages/web3-providers/src/LensV3/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,24 @@ import {
follow as lensFollow,
unfollow as lensUnfollow,
} from '@lens-protocol/client/actions'
import { gql } from 'graphql-request'
import { sortBy, uniqBy } from 'lodash-es'
import { fetchJSON } from '../helpers/fetchJSON.js'
import { LENS_ROOT_API } from './constants.js'
import { fragments } from './fragments/index.js'
import type { FollowPair } from './types.js'
import {
createIndicator,
createNextIndicator,
createPageable,
EMPTY_LIST,
type PageIndicator,
} from '@masknet/shared-base'
import { formatLensPost, getAccountAvatar } from './helpers.js'
import { isZero } from '@masknet/web3-shared-base'
import type { LensV3BaseAPI } from '@masknet/web3-providers/types'
import { EVMWeb3 } from '@masknet/web3-providers'
import type { LensV3BaseAPI } from '@masknet/web3-providers/types'
import { isZero } from '@masknet/web3-shared-base'
import { isValidAddress } from '@masknet/web3-shared-evm'
import { gql } from 'graphql-request'
import { sortBy, uniqBy } from 'lodash-es'
import { fetchJSON } from '../helpers/fetchJSON.js'
import { LENS_ROOT_API } from './constants.js'
import { fragments } from './fragments/index.js'
import { formatLensPost, getAccountAvatar } from './helpers.js'
import type { FollowPair } from './types.js'

export class LensV3 {
private signMessage: (message: string) => Promise<string>
Expand All @@ -46,7 +47,7 @@ export class LensV3 {
storage: window.localStorage,
fragments,
})
if (account) this.account = evmAddress(account)
if (account && isValidAddress(account)) this.account = evmAddress(account)
this.signMessage = signMessage || ((message: string) => EVMWeb3.signMessage('message', message))
}

Expand Down
Loading