Don't link to external blockchain explorers

It's unclear whether the use is ok or not without consent. Etherscan.io says consent is required.

Better be on the safe side.
This commit is contained in:
infinite-persistence 2021-04-12 18:48:04 +08:00 committed by Sean Yesmunt
parent f94f98e0f3
commit e9c386678b
2 changed files with 5 additions and 18 deletions

View file

@ -1765,6 +1765,7 @@
"This process cannot be reversed.": "This process cannot be reversed.",
"View transaction": "View transaction",
"Amount copied.": "Amount copied.",
"Copy transaction ID": "Copy transaction ID",
"Transaction ID copied.": "Transaction ID copied.",
"This page can be closed while the transactions are in progress.\nYou can view the status later from:\n • Wallet » Swap » View Past Swaps": "This page can be closed while the transactions are in progress.\nYou can view the status later from:\n • Wallet » Swap » View Past Swaps",
"Credits sent": "Credits sent",

View file

@ -379,23 +379,9 @@ function WalletSwap(props: Props) {
}
const explorerUrl = (coin, txid) => {
if (!txid) {
return '';
}
switch (coin) {
case 'DAI':
case 'USDC':
default:
return '';
case 'BTC':
return `https://www.blockchain.com/btc/tx/${txid}`;
case 'ETH':
return `https://www.blockchain.com/eth/tx/${txid}`;
case 'LTC':
return `https://live.blockcypher.com/ltc/tx/${txid}/`;
case 'BCH':
return `https://www.blockchain.com/bch/tx/${txid}`;
}
// It's unclear whether we can link to sites like blockchain.com.
// Don't do it for now.
return '';
};
if (isSend) {
@ -407,7 +393,7 @@ function WalletSwap(props: Props) {
{!url && (
<Button
button="link"
label={sendTxId.substring(0, 7)}
label={__('Copy transaction ID')}
title={sendTxId}
onClick={() => {
clipboard.writeText(sendTxId);