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
ae759780
Unverified
Commit
ae759780
authored
Mar 11, 2025
by
tom goriunov
Committed by
GitHub
Mar 11, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rootstock checksum is applied to all chains (#2616)
Fixes #2613
parent
de577671
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
getCheckedSummedAddress.ts
lib/address/getCheckedSummedAddress.ts
+8
-2
No files found.
lib/address/getCheckedSummedAddress.ts
View file @
ae759780
...
@@ -2,12 +2,18 @@ import { getAddress } from 'viem';
...
@@ -2,12 +2,18 @@ import { getAddress } from 'viem';
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
const
ERC1191_CHAIN_IDS
=
[
'
30
'
,
// RSK Mainnet
'
31
'
,
// RSK Testnet
];
export
default
function
getCheckedSummedAddress
(
address
:
string
):
string
{
export
default
function
getCheckedSummedAddress
(
address
:
string
):
string
{
try
{
try
{
return
getAddress
(
return
getAddress
(
address
,
address
,
// We need to pass chainId to getAddress to make it work correctly for some chains, e.g. Rootstock
// We need to pass chainId to getAddress to make it work correctly for chains that support ERC-1191
config
.
chain
.
id
?
Number
(
config
.
chain
.
id
)
:
undefined
,
// https://eips.ethereum.org/EIPS/eip-1191#usage--table
ERC1191_CHAIN_IDS
.
includes
(
config
.
chain
.
id
??
''
)
?
Number
(
config
.
chain
.
id
)
:
undefined
,
);
);
}
catch
(
error
)
{
}
catch
(
error
)
{
return
address
;
return
address
;
...
...
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