File tree 3 files changed +28
-33
lines changed
3 files changed +28
-33
lines changed Original file line number Diff line number Diff line change 1
1
version https://git-lfs.github.com/spec/v1
2
- oid sha256:b909342aace2dbceb84932b805ba7512fca66af4948aec15353e0483986121b3
3
- size 905929
2
+ oid sha256:e7cfcf1c7453298f3998ec5bdd77a4ace4a029b71027135a29b8004cc36fb694
3
+ size 906477
Original file line number Diff line number Diff line change 1
1
module . exports = {
2
- "env" : {
3
- "browser" : true ,
4
- "node" : true ,
5
- "commonjs" : true ,
6
- "es6" : true ,
7
- "jest" : true
8
- } ,
9
- "extends" : "eslint:recommended" ,
10
- "parserOptions" : {
11
- "sourceType" : "module" ,
12
- "ecmaVersion" : 2017
13
- } ,
14
- "rules" : {
15
- "linebreak-style" : [
16
- "error" ,
17
- "unix"
18
- ] ,
19
- "quotes" : [
20
- "warn" ,
21
- "double"
22
- ] ,
23
- "semi" : [
24
- "error" ,
25
- "always"
26
- ] ,
27
- "no-console" : [
28
- "off"
29
- ]
30
- }
2
+ env : {
3
+ browser : true ,
4
+ node : true ,
5
+ commonjs : true ,
6
+ es6 : true ,
7
+ jest : true ,
8
+ } ,
9
+ extends : "eslint:recommended" ,
10
+ parserOptions : {
11
+ sourceType : "module" ,
12
+ ecmaVersion : 2020 ,
13
+ } ,
14
+ rules : {
15
+ "linebreak-style" : [ "error" , "unix" ] ,
16
+ quotes : [ "warn" , "double" ] ,
17
+ semi : [ "error" , "always" ] ,
18
+ "no-console" : [ "off" ] ,
19
+ } ,
31
20
} ;
Original file line number Diff line number Diff line change @@ -263,7 +263,10 @@ class TrustWeb3Provider extends BaseProvider {
263
263
var message ;
264
264
let address ;
265
265
266
- if ( this . address === payload . params [ 0 ] . toLowerCase ( ) ) {
266
+ if (
267
+ typeof payload . params ?. [ 0 ] . toLowerCase ( ) === "string" &&
268
+ this . address === payload . params ?. [ 0 ] . toLowerCase ( )
269
+ ) {
267
270
message = payload . params [ 1 ] ;
268
271
address = payload . params [ 0 ] ;
269
272
} else {
@@ -297,7 +300,10 @@ class TrustWeb3Provider extends BaseProvider {
297
300
let address ;
298
301
let data ;
299
302
300
- if ( this . address === payload . params [ 0 ] . toLowerCase ( ) ) {
303
+ if (
304
+ typeof payload . params ?. [ 0 ] === "string" &&
305
+ this . address === payload . params ?. [ 0 ] . toLowerCase ( )
306
+ ) {
301
307
data = payload . params [ 1 ] ;
302
308
address = payload . params [ 0 ] ;
303
309
} else {
You can’t perform that action at this time.
0 commit comments