You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
763 B

import { shell } from 'electron'
const testnetUrl = 'https://testnet.smartbit.com.au'
const mainnetUrl = 'https://smartbit.com.au'
const showTransaction = (isTestnet, txid) =>
(isTestnet ? shell.openExternal(`${testnetUrl}/tx/${txid}`) : shell.openExternal(`${mainnetUrl}/tx/${txid}`))
const showBlock = (isTestnet, blockHash) =>
(isTestnet ? shell.openExternal(`${testnetUrl}/block/${blockHash}`) : shell.openExternal(`${mainnetUrl}/block/${blockHash}`))
const showChannelClosing = channel =>
showTransaction(channel.closing_txid)
const showChannelPoint = channel =>
showTransaction(channel.channel.channel_point.split(':')[0])
export default {
testnetUrl,
mainnetUrl,
showTransaction,
showBlock,
showChannelClosing,
showChannelPoint
}