web/storagenode: Use an existing const instead value

Use an exiting constant for the ZK explorer URL rather than hard-coding
the URL value.

Change-Id: I029248c4fc2d1279f6b061ae94ca1036f0790b84
This commit is contained in:
Ivan Fraixedes 2022-02-18 11:49:18 +01:00
parent 12b3fb5fb0
commit 9688c574b7
No known key found for this signature in database
GPG Key ID: 042B474597F96DB7

View File

@ -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) {