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
c63bb84f
Unverified
Commit
c63bb84f
authored
Jul 14, 2021
by
Moody Salem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(block number): link to the correct page in etherscan for optimism block number links
parent
f0d10ba0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
getExplorerLink.ts
src/utils/getExplorerLink.ts
+3
-0
getLibrary.ts
src/utils/getLibrary.ts
+5
-4
No files found.
src/utils/getExplorerLink.ts
View file @
c63bb84f
...
@@ -62,6 +62,9 @@ export function getExplorerLink(chainId: number, data: string, type: ExplorerDat
...
@@ -62,6 +62,9 @@ export function getExplorerLink(chainId: number, data: string, type: ExplorerDat
return `
$
{
prefix
}
/token/
$
{
data
}
`
return `
$
{
prefix
}
/token/
$
{
data
}
`
case ExplorerDataType.BLOCK:
case ExplorerDataType.BLOCK:
if (chainId === SupportedChainId.OPTIMISM || chainId === SupportedChainId.OPTIMISTIC_KOVAN) {
return `
$
{
prefix
}
/tx/
$
{
data
}
`
}
return `
$
{
prefix
}
/block/
$
{
data
}
`
return `
$
{
prefix
}
/block/
$
{
data
}
`
case ExplorerDataType.ADDRESS:
case ExplorerDataType.ADDRESS:
...
...
src/utils/getLibrary.ts
View file @
c63bb84f
import
{
Web3Provider
}
from
'
@ethersproject/providers
'
import
{
Web3Provider
}
from
'
@ethersproject/providers
'
import
ms
from
'
ms.macro
'
import
{
SupportedChainId
}
from
'
../constants/chains
'
import
{
SupportedChainId
}
from
'
../constants/chains
'
const
NETWORK_POLLING_INTERVALS
:
{
[
chainId
:
number
]:
number
}
=
{
const
NETWORK_POLLING_INTERVALS
:
{
[
chainId
:
number
]:
number
}
=
{
[
SupportedChainId
.
ARBITRUM_ONE
]:
1
_000
,
[
SupportedChainId
.
ARBITRUM_ONE
]:
ms
`1s`
,
[
SupportedChainId
.
ARBITRUM_RINKEBY
]:
1
_000
,
[
SupportedChainId
.
ARBITRUM_RINKEBY
]:
ms
`1s`
,
[
SupportedChainId
.
OPTIMISM
]:
1
_000
,
[
SupportedChainId
.
OPTIMISM
]:
ms
`1s`
,
[
SupportedChainId
.
OPTIMISTIC_KOVAN
]:
1
_000
,
[
SupportedChainId
.
OPTIMISTIC_KOVAN
]:
ms
`1s`
,
}
}
export
default
function
getLibrary
(
provider
:
any
):
Web3Provider
{
export
default
function
getLibrary
(
provider
:
any
):
Web3Provider
{
...
...
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