Commit 4d3073d2 authored by Moody Salem's avatar Moody Salem

fix(position page): link to the token page of the explorer instead of the...

fix(position page): link to the token page of the explorer instead of the address page from the position page
parent c732f407
...@@ -185,7 +185,7 @@ function LinkedCurrency({ chainId, currency }: { chainId?: number; currency?: Cu ...@@ -185,7 +185,7 @@ function LinkedCurrency({ chainId, currency }: { chainId?: number; currency?: Cu
if (typeof chainId === 'number' && address) { if (typeof chainId === 'number' && address) {
return ( return (
<ExternalLink href={getExplorerLink(chainId, address, ExplorerDataType.ADDRESS)}> <ExternalLink href={getExplorerLink(chainId, address, ExplorerDataType.TOKEN)}>
<RowFixed> <RowFixed>
<CurrencyLogo currency={currency} size={'20px'} style={{ marginRight: '0.5rem' }} /> <CurrencyLogo currency={currency} size={'20px'} style={{ marginRight: '0.5rem' }} />
<TYPE.main>{currency?.symbol}</TYPE.main> <TYPE.main>{currency?.symbol}</TYPE.main>
......
...@@ -27,6 +27,7 @@ export function getExplorerLink(chainId: number, data: string, type: ExplorerDat ...@@ -27,6 +27,7 @@ export function getExplorerLink(chainId: number, data: string, type: ExplorerDat
case ExplorerDataType.TRANSACTION: case ExplorerDataType.TRANSACTION:
return `https://explorer.arbitrum.io/tx/${data}` return `https://explorer.arbitrum.io/tx/${data}`
case ExplorerDataType.ADDRESS: case ExplorerDataType.ADDRESS:
case ExplorerDataType.TOKEN:
return `https://explorer.arbitrum.io/address/${data}` return `https://explorer.arbitrum.io/address/${data}`
case ExplorerDataType.BLOCK: case ExplorerDataType.BLOCK:
return `https://explorer.arbitrum.io/block/${data}` return `https://explorer.arbitrum.io/block/${data}`
...@@ -40,6 +41,7 @@ export function getExplorerLink(chainId: number, data: string, type: ExplorerDat ...@@ -40,6 +41,7 @@ export function getExplorerLink(chainId: number, data: string, type: ExplorerDat
case ExplorerDataType.TRANSACTION: case ExplorerDataType.TRANSACTION:
return `https://rinkeby-explorer.arbitrum.io/tx/${data}` return `https://rinkeby-explorer.arbitrum.io/tx/${data}`
case ExplorerDataType.ADDRESS: case ExplorerDataType.ADDRESS:
case ExplorerDataType.TOKEN:
return `https://rinkeby-explorer.arbitrum.io/address/${data}` return `https://rinkeby-explorer.arbitrum.io/address/${data}`
case ExplorerDataType.BLOCK: case ExplorerDataType.BLOCK:
return `https://rinkeby-explorer.arbitrum.io/block/${data}` return `https://rinkeby-explorer.arbitrum.io/block/${data}`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment