Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/explorer-icons #1549

Merged
merged 11 commits into from
Nov 9, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ export const PortfolioTokenAsset = ({
tokenRouterAddress,
])

console.log('icon:', icon)

return (
<div
data-test-id="portfolio-token-asset"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ export const MostRecentTransaction = () => {
startedTimestamp={
transaction.timestamp ? transaction.timestamp : transaction.id
}
transactionHash={transaction.transactionHash as string}
isSubmitted={transaction.isSubmitted as boolean}
transactionHash={transaction.transactionHash}
isSubmitted={transaction.isSubmitted}
transactionType={TransactionType.PENDING}
/>
</div>
Expand All @@ -174,10 +174,10 @@ export const MostRecentTransaction = () => {
<div data-test-id="most-recent-transaction-pending" className="mt-6">
<PendingTransaction
connectedAddress={address as Address}
startedTimestamp={transaction?.fromInfo?.time as number}
transactionHash={transaction?.fromInfo?.txnHash as string}
startedTimestamp={transaction?.fromInfo?.time}
transactionHash={transaction?.fromInfo?.txnHash}
transactionType={TransactionType.PENDING}
originValue={transaction?.fromInfo?.value as number}
originValue={transaction?.fromInfo?.value}
originChain={CHAINS_BY_ID[transaction?.fromInfo?.chainID] as Chain}
destinationChain={
CHAINS_BY_ID[transaction?.fromInfo?.destinationChainID] as Chain
Expand Down Expand Up @@ -218,13 +218,13 @@ export const MostRecentTransaction = () => {
<PendingTransaction
connectedAddress={address as Address}
destinationAddress={transaction?.fromInfo?.address as Address}
startedTimestamp={transaction?.fromInfo?.time as number}
completedTimestamp={transaction?.toInfo?.time as number}
transactionHash={transaction?.fromInfo?.txnHash as string}
kappa={transaction?.kappa as string}
startedTimestamp={transaction?.fromInfo?.time}
completedTimestamp={transaction?.toInfo?.time}
transactionHash={transaction?.fromInfo?.txnHash}
kappa={transaction?.kappa}
transactionType={TransactionType.PENDING}
originValue={transaction?.fromInfo?.value as number}
destinationValue={transaction?.toInfo?.value as number}
originValue={transaction?.fromInfo?.value}
destinationValue={transaction?.toInfo?.value}
originChain={CHAINS_BY_ID[transaction?.fromInfo?.chainID] as Chain}
destinationChain={
CHAINS_BY_ID[transaction?.fromInfo?.destinationChainID] as Chain
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,8 @@ const TransactionStatusDetails = ({
window.open(explorerLink, '_blank', 'noopener,noreferrer')
}

console.log('originChain.explorerImg:', originChain?.explorerImg)
bigboydiamonds marked this conversation as resolved.
Show resolved Hide resolved

return (
<div
data-test-id="pending-status"
Expand Down Expand Up @@ -386,7 +388,8 @@ const TransactionStatusDetails = ({
>
<Image
className="w-4 h-4 mx-1 ml-1 mr-1.5 rounded-full"
src={originChain.explorerImg}
placeholder="empty"
src={originChain?.explorerImg?.src}
alt={`${originChain.explorerName} logo`}
/>
<div>Confirmed on {originChain.explorerName}.</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/synapse-interface/constants/chains/master.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export const POLYGON: Chain = {
nativeCurrency: { name: 'Matic', symbol: 'MATIC', decimals: 18 },
explorerUrl: 'https://polygonscan.com',
explorerName: 'PolygonScan',
explorerImg: polygonExplorerImg,
explorerImg: polygonImg,
Copy link
Collaborator

@abtestingalpha abtestingalpha Nov 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're using the SVG in @assets/chains/... vs @assets/explorer/... here, meaning can we do that throughout so we don't have duplicates?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this! I was just testing out a few diff things to try and get the .png file to work. Didn't end up working so I converted all of @assets/explorer/ files from .png to .svg

Switched back in dde17ad

color: 'purple',
}

Expand Down
Loading