Skip to content

Commit

Permalink
Merge pull request #149 from phershbe/update-substring-methods
Browse files Browse the repository at this point in the history
Change "substr" to "substring" in multiple places
  • Loading branch information
whoabuddy authored Jun 16, 2022
2 parents dab5303 + df5ce95 commit b69ac68
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/common/LinkTx.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default function LinkTx({ txId, shorten = true }) {
const url = `${STACKS_EXPLORER}/txid/${txId}`;
return (
<a href={`${url}${CHAIN_SUFFIX}`} target="_blank" rel="noreferrer">
{shorten ? txId.substr(0, 5) + '...' + txId.substr(txId.length - 5) : txId}
{shorten ? txId.substring(0, 5) + '...' + txId.substring(txId.length - 5) : txId}
<i className="bi bi-box-arrow-up-right ms-1" />
</a>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/profile/Address.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit b69ac68

Please sign in to comment.