From 9688c574b76903bfa596bcedd14214b15feaca90 Mon Sep 17 00:00:00 2001 From: Ivan Fraixedes Date: Fri, 18 Feb 2022 11:49:18 +0100 Subject: [PATCH] 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 --- .../src/storagenode/payouts/payouts.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/web/storagenode/src/storagenode/payouts/payouts.ts b/web/storagenode/src/storagenode/payouts/payouts.ts index 352ac6445..6d344fa41 100644 --- a/web/storagenode/src/storagenode/payouts/payouts.ts +++ b/web/storagenode/src/storagenode/payouts/payouts.ts @@ -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) {