From 7ae38906926dc09bc10670c361af0d2bf0050426 Mon Sep 17 00:00:00 2001 From: Hsuan Lee Date: Sat, 19 Jan 2019 18:42:04 +0800 Subject: Update dependency packages --- packages/instant/src/util/etherscan.ts | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 packages/instant/src/util/etherscan.ts (limited to 'packages/instant/src/util/etherscan.ts') diff --git a/packages/instant/src/util/etherscan.ts b/packages/instant/src/util/etherscan.ts deleted file mode 100644 index f9bf82827..000000000 --- a/packages/instant/src/util/etherscan.ts +++ /dev/null @@ -1,30 +0,0 @@ -import * as _ from 'lodash'; - -import { Network } from '../types'; - -const etherscanPrefix = (networkId: number): string | undefined => { - switch (networkId) { - case Network.Kovan: - return 'kovan.'; - case Network.Mainnet: - return ''; - } - return ''; -}; - -export const etherscanUtil = { - getEtherScanTxnAddressIfExists: (txHash: string, networkId: number) => { - const prefix = etherscanPrefix(networkId); - if (_.isUndefined(prefix)) { - return; - } - return `https://${prefix}etherscan.io/tx/${txHash}`; - }, - getEtherScanEthAddressIfExists: (ethAddress: string, networkId: number) => { - const prefix = etherscanPrefix(networkId); - if (_.isUndefined(prefix)) { - return; - } - return `https://${prefix}etherscan.io/address/${ethAddress}`; - }, -}; -- cgit v1.2.3