Skip to content

Commit c5ca178

Browse files
[Release] New release 2.33.0 (minor) (#12220)
* chore: bump version to 2.33.0 * fix: initialize lens client only with valid address (#12221) --------- Co-authored-by: Wukong Sun <[email protected]>
1 parent d82e171 commit c5ca178

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"yarn": ">=999.0.0",
88
"npm": ">=999.0.0"
99
},
10-
"version": "2.32.2",
10+
"version": "2.33.0",
1111
"private": true,
1212
"license": "AGPL-3.0-or-later",
1313
"scripts": {

packages/web3-providers/src/LensV3/index.ts

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,24 @@ import {
1717
follow as lensFollow,
1818
unfollow as lensUnfollow,
1919
} from '@lens-protocol/client/actions'
20-
import { gql } from 'graphql-request'
21-
import { sortBy, uniqBy } from 'lodash-es'
22-
import { fetchJSON } from '../helpers/fetchJSON.js'
23-
import { LENS_ROOT_API } from './constants.js'
24-
import { fragments } from './fragments/index.js'
25-
import type { FollowPair } from './types.js'
2620
import {
2721
createIndicator,
2822
createNextIndicator,
2923
createPageable,
3024
EMPTY_LIST,
3125
type PageIndicator,
3226
} from '@masknet/shared-base'
33-
import { formatLensPost, getAccountAvatar } from './helpers.js'
34-
import { isZero } from '@masknet/web3-shared-base'
35-
import type { LensV3BaseAPI } from '@masknet/web3-providers/types'
3627
import { EVMWeb3 } from '@masknet/web3-providers'
28+
import type { LensV3BaseAPI } from '@masknet/web3-providers/types'
29+
import { isZero } from '@masknet/web3-shared-base'
30+
import { isValidAddress } from '@masknet/web3-shared-evm'
31+
import { gql } from 'graphql-request'
32+
import { sortBy, uniqBy } from 'lodash-es'
33+
import { fetchJSON } from '../helpers/fetchJSON.js'
34+
import { LENS_ROOT_API } from './constants.js'
35+
import { fragments } from './fragments/index.js'
36+
import { formatLensPost, getAccountAvatar } from './helpers.js'
37+
import type { FollowPair } from './types.js'
3738

3839
export class LensV3 {
3940
private signMessage: (message: string) => Promise<string>
@@ -46,7 +47,7 @@ export class LensV3 {
4647
storage: window.localStorage,
4748
fragments,
4849
})
49-
if (account) this.account = evmAddress(account)
50+
if (account && isValidAddress(account)) this.account = evmAddress(account)
5051
this.signMessage = signMessage || ((message: string) => EVMWeb3.signMessage('message', message))
5152
}
5253

0 commit comments

Comments
 (0)