Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
469f7997
Unverified
Commit
469f7997
authored
May 12, 2025
by
tom goriunov
Committed by
GitHub
May 12, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Invalid case-sensitive comparison in AddressFromTo (#2719)
Fixes #2688
parent
6aa1b99e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
10 deletions
+15
-10
AddressFromTo.tsx
ui/shared/address/AddressFromTo.tsx
+8
-7
utils.ts
ui/shared/address/utils.ts
+7
-3
No files found.
ui/shared/address/AddressFromTo.tsx
View file @
469f7997
...
@@ -36,6 +36,8 @@ const AddressFromTo = ({ from, to, current, mode: modeProp, className, isLoading
...
@@ -36,6 +36,8 @@ const AddressFromTo = ({ from, to, current, mode: modeProp, className, isLoading
)
??
'
long
'
;
)
??
'
long
'
;
const
Entity
=
tokenHash
&&
tokenSymbol
?
AddressEntityWithTokenFilter
:
AddressEntity
;
const
Entity
=
tokenHash
&&
tokenSymbol
?
AddressEntityWithTokenFilter
:
AddressEntity
;
const
isOutgoing
=
current
?
current
.
toLowerCase
()
===
from
.
hash
.
toLowerCase
()
:
false
;
const
isIncoming
=
current
?
current
.
toLowerCase
()
===
to
?.
hash
?.
toLowerCase
()
:
false
;
if
(
mode
===
'
compact
'
)
{
if
(
mode
===
'
compact
'
)
{
return
(
return
(
...
@@ -49,8 +51,8 @@ const AddressFromTo = ({ from, to, current, mode: modeProp, className, isLoading
...
@@ -49,8 +51,8 @@ const AddressFromTo = ({ from, to, current, mode: modeProp, className, isLoading
<
Entity
<
Entity
address=
{
from
}
address=
{
from
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
noLink=
{
current
===
from
.
hash
}
noLink=
{
isOutgoing
}
noCopy=
{
current
===
from
.
hash
}
noCopy=
{
isOutgoing
}
noIcon=
{
noIcon
}
noIcon=
{
noIcon
}
tokenHash=
{
tokenHash
}
tokenHash=
{
tokenHash
}
tokenSymbol=
{
tokenSymbol
}
tokenSymbol=
{
tokenSymbol
}
...
@@ -63,8 +65,8 @@ const AddressFromTo = ({ from, to, current, mode: modeProp, className, isLoading
...
@@ -63,8 +65,8 @@ const AddressFromTo = ({ from, to, current, mode: modeProp, className, isLoading
<
Entity
<
Entity
address=
{
to
}
address=
{
to
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
noLink=
{
current
===
to
.
hash
}
noLink=
{
isIncoming
}
noCopy=
{
current
===
to
.
hash
}
noCopy=
{
isIncoming
}
noIcon=
{
noIcon
}
noIcon=
{
noIcon
}
tokenHash=
{
tokenHash
}
tokenHash=
{
tokenHash
}
tokenSymbol=
{
tokenSymbol
}
tokenSymbol=
{
tokenSymbol
}
...
@@ -78,7 +80,6 @@ const AddressFromTo = ({ from, to, current, mode: modeProp, className, isLoading
...
@@ -78,7 +80,6 @@ const AddressFromTo = ({ from, to, current, mode: modeProp, className, isLoading
);
);
}
}
const
isOutgoing
=
current
===
from
.
hash
;
const
iconSize
=
20
;
const
iconSize
=
20
;
return
(
return
(
...
@@ -102,8 +103,8 @@ const AddressFromTo = ({ from, to, current, mode: modeProp, className, isLoading
...
@@ -102,8 +103,8 @@ const AddressFromTo = ({ from, to, current, mode: modeProp, className, isLoading
<
Entity
<
Entity
address=
{
to
}
address=
{
to
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
noLink=
{
current
===
to
.
hash
}
noLink=
{
isIncoming
}
noCopy=
{
current
===
to
.
hash
}
noCopy=
{
isIncoming
}
noIcon=
{
noIcon
}
noIcon=
{
noIcon
}
tokenHash=
{
tokenHash
}
tokenHash=
{
tokenHash
}
tokenSymbol=
{
tokenSymbol
}
tokenSymbol=
{
tokenSymbol
}
...
...
ui/shared/address/utils.ts
View file @
469f7997
...
@@ -7,15 +7,19 @@ export function getTxCourseType(from: string, to: string | undefined, current?:
...
@@ -7,15 +7,19 @@ export function getTxCourseType(from: string, to: string | undefined, current?:
return
'
unspecified
'
;
return
'
unspecified
'
;
}
}
if
(
to
&&
from
===
to
&&
from
===
current
)
{
const
fromLower
=
from
.
toLowerCase
();
const
toLower
=
to
?.
toLowerCase
();
const
currentLower
=
current
.
toLowerCase
();
if
(
toLower
&&
fromLower
===
toLower
&&
fromLower
===
currentLower
)
{
return
'
self
'
;
return
'
self
'
;
}
}
if
(
from
===
current
)
{
if
(
from
Lower
===
currentLower
)
{
return
'
out
'
;
return
'
out
'
;
}
}
if
(
to
&&
to
===
current
)
{
if
(
to
Lower
&&
toLower
===
currentLower
)
{
return
'
in
'
;
return
'
in
'
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment