File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ class Labels {
4242 }
4343
4444 async add ( name , address , color ) {
45+ address = address . toLowerCase ( ) ;
4546 await this . addLabelledAddress ( address ) ;
4647
4748 return await this . set ( {
@@ -79,7 +80,7 @@ class Labels {
7980
8081 shortenAddress ( address ) {
8182 const beginning = address . slice ( 0 , BEGINNING_AND_END_CHARS_IN_ADDR_TO_SHOW ) ;
82- const end = address . slice ( address . length - BEGINNING_AND_END_CHARS_IN_ADDR_TO_SHOW , address . length - 1 ) ;
83+ const end = address . slice ( address . length - BEGINNING_AND_END_CHARS_IN_ADDR_TO_SHOW , address . length ) ;
8384
8485 return `${ beginning } ...${ end } ` ;
8586 }
@@ -170,10 +171,10 @@ class Labels {
170171 }
171172
172173 async getLabelForAddress ( address ) {
173- const retrievedObject = await this . get ( address ) ;
174+ const retrievedObject = await this . get ( address . toLowerCase ( ) ) ;
174175
175176 if ( retrievedObject ) {
176- return retrievedObject [ address ] ;
177+ return retrievedObject [ address . toLowerCase ( ) ] ;
177178 }
178179 }
179180
You can’t perform that action at this time.
0 commit comments