Skip to content

Commit

Permalink
web/storagenode: Use an existing const instead value
Browse files Browse the repository at this point in the history
Use an exiting constant for the ZK explorer URL rather than hard-coding
the URL value.

Change-Id: I029248c4fc2d1279f6b061ae94ca1036f0790b84
  • Loading branch information
ifraixedes committed Feb 18, 2022
1 parent 12b3fb5 commit 9688c57
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions web/storagenode/src/storagenode/payouts/payouts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,13 +303,16 @@ export class SatellitePayoutForPeriod {
if (this.receipt.indexOf('eth') !== -1) {
return `https://etherscan.io/tx/${prefixed(this.receipt.slice(4))}`;
}
const zkScanUrl = 'https://zkscan.io/explorer/transactions'

if (this.receipt.indexOf('zksync') !== -1) {
return `https://zkscan.io/explorer/transactions/${prefixed(this.receipt.slice(7))}`;
}
if (this.receipt.indexOf('zkwithdraw') !== -1) {
return `${zkScanUrl}/${prefixed(this.receipt.slice(11))}`;
{
const zkScanUrl = 'https://zkscan.io/explorer/transactions'

if (this.receipt.indexOf('zksync') !== -1) {
return `${zkScanUrl}/${prefixed(this.receipt.slice(7))}`;
}
if (this.receipt.indexOf('zkwithdraw') !== -1) {
return `${zkScanUrl}/${prefixed(this.receipt.slice(11))}`;
}
}

if (this.receipt.indexOf('polygon') !== -1) {
Expand Down

0 comments on commit 9688c57

Please sign in to comment.