Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
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
LuckySwap
interface
Commits
81b13469
Unverified
Commit
81b13469
authored
Aug 31, 2021
by
Jordan Frankfurt
Committed by
GitHub
Aug 31, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update explorer links for arbitrum (#2279)
parent
f51335df
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
chains.ts
src/constants/chains.ts
+2
-2
anonymizeLink.test.ts
src/utils/anonymizeLink.test.ts
+1
-1
anonymizeLink.ts
src/utils/anonymizeLink.ts
+1
-1
getExplorerLink.ts
src/utils/getExplorerLink.ts
+4
-4
No files found.
src/constants/chains.ts
View file @
81b13469
...
@@ -66,7 +66,7 @@ export const CHAIN_INFO: ChainInfo = {
...
@@ -66,7 +66,7 @@ export const CHAIN_INFO: ChainInfo = {
[
SupportedChainId
.
ARBITRUM_ONE
]:
{
[
SupportedChainId
.
ARBITRUM_ONE
]:
{
bridge
:
'
https://bridge.arbitrum.io/
'
,
bridge
:
'
https://bridge.arbitrum.io/
'
,
docs
:
'
https://offchainlabs.com/
'
,
docs
:
'
https://offchainlabs.com/
'
,
explorer
:
'
https://
explorer.arbitrum
.io/
'
,
explorer
:
'
https://
arbiscan
.io/
'
,
infoLink
:
'
https://info.uniswap.org/#/arbitrum
'
,
infoLink
:
'
https://info.uniswap.org/#/arbitrum
'
,
label
:
'
Arbitrum
'
,
label
:
'
Arbitrum
'
,
logoUrl
:
arbitrumLogoUrl
,
logoUrl
:
arbitrumLogoUrl
,
...
@@ -74,7 +74,7 @@ export const CHAIN_INFO: ChainInfo = {
...
@@ -74,7 +74,7 @@ export const CHAIN_INFO: ChainInfo = {
[
SupportedChainId
.
ARBITRUM_RINKEBY
]:
{
[
SupportedChainId
.
ARBITRUM_RINKEBY
]:
{
bridge
:
'
https://bridge.arbitrum.io/
'
,
bridge
:
'
https://bridge.arbitrum.io/
'
,
docs
:
'
https://offchainlabs.com/
'
,
docs
:
'
https://offchainlabs.com/
'
,
explorer
:
'
https://explorer.arbitrum.io/
'
,
explorer
:
'
https://
rinkeby-
explorer.arbitrum.io/
'
,
infoLink
:
'
https://info.uniswap.org/#/arbitrum/
'
,
infoLink
:
'
https://info.uniswap.org/#/arbitrum/
'
,
label
:
'
Arbitrum Rinkeby
'
,
label
:
'
Arbitrum Rinkeby
'
,
logoUrl
:
arbitrumLogoUrl
,
logoUrl
:
arbitrumLogoUrl
,
...
...
src/utils/anonymizeLink.test.ts
View file @
81b13469
...
@@ -31,7 +31,7 @@ describe('#anonymizeLink', () => {
...
@@ -31,7 +31,7 @@ describe('#anonymizeLink', () => {
)
)
})
})
it
(
'
works for arbitrum urls
'
,
()
=>
{
it
(
'
works for arbitrum urls
'
,
()
=>
{
expect
(
anonymizeLink
(
'
https://
explorer.arbitrum.io/0x/0xabc
'
)).
toEqual
(
'
https://explorer.arbitrum
.io/0x/***
'
)
expect
(
anonymizeLink
(
'
https://
arbiscan.io/0x/0xabc
'
)).
toEqual
(
'
https://arbiscan
.io/0x/***
'
)
})
})
it
(
'
works for arbitrum rinkeby urls
'
,
()
=>
{
it
(
'
works for arbitrum rinkeby urls
'
,
()
=>
{
expect
(
anonymizeLink
(
'
https://rinkeby-explorer.arbitrum.io/0x/0xabc
'
)).
toEqual
(
expect
(
anonymizeLink
(
'
https://rinkeby-explorer.arbitrum.io/0x/0xabc
'
)).
toEqual
(
...
...
src/utils/anonymizeLink.ts
View file @
81b13469
...
@@ -7,7 +7,7 @@ const EXPLORER_HOSTNAMES: { [hostname: string]: true } = {
...
@@ -7,7 +7,7 @@ const EXPLORER_HOSTNAMES: { [hostname: string]: true } = {
'
optimistic.etherscan.io
'
:
true
,
'
optimistic.etherscan.io
'
:
true
,
'
kovan-optimistic.etherscan.io
'
:
true
,
'
kovan-optimistic.etherscan.io
'
:
true
,
'
rinkeby-explorer.arbitrum.io
'
:
true
,
'
rinkeby-explorer.arbitrum.io
'
:
true
,
'
explorer.arbitrum
.io
'
:
true
,
'
arbiscan
.io
'
:
true
,
}
}
/**
/**
...
...
src/utils/getExplorerLink.ts
View file @
81b13469
...
@@ -27,14 +27,14 @@ export function getExplorerLink(chainId: number, data: string, type: ExplorerDat
...
@@ -27,14 +27,14 @@ export function getExplorerLink(chainId: number, data: string, type: ExplorerDat
if
(
chainId
===
SupportedChainId
.
ARBITRUM_ONE
)
{
if
(
chainId
===
SupportedChainId
.
ARBITRUM_ONE
)
{
switch
(
type
)
{
switch
(
type
)
{
case
ExplorerDataType
.
TRANSACTION
:
case
ExplorerDataType
.
TRANSACTION
:
return
`https://
explorer.arbitrum
.io/tx/
${
data
}
`
return
`https://
arbiscan
.io/tx/
${
data
}
`
case
ExplorerDataType
.
ADDRESS
:
case
ExplorerDataType
.
ADDRESS
:
case
ExplorerDataType
.
TOKEN
:
case
ExplorerDataType
.
TOKEN
:
return
`https://
explorer.arbitrum
.io/address/
${
data
}
`
return
`https://
arbiscan
.io/address/
${
data
}
`
case
ExplorerDataType
.
BLOCK
:
case
ExplorerDataType
.
BLOCK
:
return
`https://
explorer.arbitrum
.io/block/
${
data
}
`
return
`https://
arbiscan
.io/block/
${
data
}
`
default
:
default
:
return
`https://
explorer.arbitrum
.io/`
return
`https://
arbiscan
.io/`
}
}
}
}
...
...
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