diff --git a/src/components/common/LinkTx.js b/src/components/common/LinkTx.js index c29ffd4..f8d2f2d 100644 --- a/src/components/common/LinkTx.js +++ b/src/components/common/LinkTx.js @@ -5,7 +5,7 @@ export default function LinkTx({ txId, shorten = true }) { const url = `${STACKS_EXPLORER}/txid/${txId}`; return ( - {shorten ? txId.substr(0, 5) + '...' + txId.substr(txId.length - 5) : txId} + {shorten ? txId.substring(0, 5) + '...' + txId.substring(txId.length - 5) : txId} ); diff --git a/src/components/profile/Address.js b/src/components/profile/Address.js index 9298524..1a608e0 100644 --- a/src/components/profile/Address.js +++ b/src/components/profile/Address.js @@ -8,7 +8,7 @@ export function Address() { const displayAddress = useMemo(() => { if (bnsName.loaded) return bnsName.data; if (stxAddress.loaded) - return `${stxAddress.data.substr(0, 5)}...${stxAddress.data.substr( + return `${stxAddress.data.substring(0, 5)}...${stxAddress.data.substring( stxAddress.data.length - 5 )}`; return 'Profile';