Skip to content

Commit b0ed9a3

Browse files
authored
Merge pull request #73 from iotaledger/fix/indexation-on-visualizer
Fix: Remove legacy indexed message code
2 parents 689ddd0 + 3c5ef01 commit b0ed9a3

File tree

8 files changed

+9
-276
lines changed

8 files changed

+9
-276
lines changed

src/app/App.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ import { AnalyticsRouteProps } from "./routes/AnalyticsRouteProps";
3333
import Explorer from "./routes/Explorer";
3434
import Address from "./routes/explorer/Address";
3535
import { AddressRouteProps } from "./routes/explorer/AddressRouteProps";
36-
import Indexed from "./routes/explorer/Indexed";
37-
import { IndexedRouteProps } from "./routes/explorer/IndexedRouteProps";
3836
import Message from "./routes/explorer/Message";
3937
import { MessageRouteProps } from "./routes/explorer/MessageRouteProps";
4038
import Milestone from "./routes/explorer/Milestone";
@@ -399,11 +397,6 @@ class App extends AsyncComponent<RouteComponentProps, AppState> {
399397
component={(props: RouteComponentProps<MilestoneRouteProps>) =>
400398
(<Milestone {...props} />)}
401399
/>
402-
<Route
403-
path="/explorer/indexed/:index"
404-
component={(props: RouteComponentProps<IndexedRouteProps>) =>
405-
(<Indexed {...props} />)}
406-
/>
407400
<Route
408401
path="/explorer/address/:address"
409402
component={(props: RouteComponentProps<AddressRouteProps>) =>

src/app/components/tangle/TaggedDataPayload.tsx

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Converter } from "@iota/util.js";
22
import React, { Component, ReactNode } from "react";
3-
import { Link } from "react-router-dom";
43
import { ClipboardHelper } from "../../../utils/clipboardHelper";
54
import MessageButton from "../layout/MessageButton";
65
import { TaggedDataPayloadProps } from "./TaggedDataPayloadProps";
@@ -53,10 +52,10 @@ class TaggedDataPayload extends Component<TaggedDataPayloadProps, TaggedDataPayl
5352
*/
5453
public render(): ReactNode {
5554
return (
56-
<div className="indexation-payload">
55+
<div className="tagged-data-payload">
5756
<h2>Tagged Data Payload</h2>
5857
<div className="card--label row middle">
59-
<span className="margin-r-t">Index UTF8 [{this.state.indexLengthBytes}]</span>
58+
<span className="margin-r-t">Tag UTF8 [{this.state.indexLengthBytes}]</span>
6059
<MessageButton
6160
onClick={() => ClipboardHelper.copy(
6261
this.state.utf8Index
@@ -66,16 +65,10 @@ class TaggedDataPayload extends Component<TaggedDataPayloadProps, TaggedDataPayl
6665
/>
6766
</div>
6867
<div className="card--value row">
69-
<Link
70-
to={
71-
`/explorer/indexed/${this.props.payload.tag}`
72-
}
73-
>
74-
{this.state.utf8Index}
75-
</Link>
68+
{this.state.utf8Index}
7669
</div>
7770
<div className="card--label row middle">
78-
<span className="margin-r-t">Index Hex [{this.state.indexLengthBytes}]</span>
71+
<span className="margin-r-t">Tag Hex [{this.state.indexLengthBytes}]</span>
7972
<MessageButton
8073
onClick={() => ClipboardHelper.copy(
8174
this.state.hexIndex.replace(/ /g, "")

src/app/routes/Search.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,6 @@ class Search extends AsyncComponent<RouteComponentProps<SearchRouteProps>, Searc
158158
objParam = Converter.bytesToHex(Blake2b.sum256(writeStream.finalBytes()), true);
159159
} else if (response?.address) {
160160
objType = "address";
161-
} else if (response.indexMessageIds) {
162-
objType = "indexed";
163161
} else if (response.output) {
164162
objType = "message";
165163
objParam = response.output.messageId;

src/app/routes/Visualizer.tsx

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -376,28 +376,16 @@ class Visualizer extends AsyncComponent<RouteComponentProps, VisualizerState> {
376376
this.state.selected.payload.tag && (
377377
<React.Fragment>
378378
<div className="card--label">
379-
Index UTF8
379+
Tag UTF8
380380
</div>
381381
<div className="card--value">
382-
<a
383-
href={this.calculateIndexedLink(this.state.selected.payload.tag)}
384-
target="_blank"
385-
rel="noopener noreferrer"
386-
>
387-
{Converter.hexToUtf8(this.state.selected.payload.tag)}
388-
</a>
382+
{Converter.hexToUtf8(this.state.selected.payload.tag)}
389383
</div>
390384
<div className="card--label">
391-
Index Hex
385+
Tag Hex
392386
</div>
393387
<div className="card--value">
394-
<a
395-
href={this.calculateIndexedLink(this.state.selected.payload.tag)}
396-
target="_blank"
397-
rel="noopener noreferrer"
398-
>
399-
{this.state.selected.payload.tag}
400-
</a>
388+
{this.state.selected.payload.tag}
401389
</div>
402390
</React.Fragment>
403391
)}
@@ -764,7 +752,7 @@ class Visualizer extends AsyncComponent<RouteComponentProps, VisualizerState> {
764752
} else if (payload.type === MILESTONE_PAYLOAD_TYPE) {
765753
payloadTitle = "";
766754
} else if (payload.type === TAGGED_DATA_PAYLOAD_TYPE) {
767-
payloadTitle = " - Indexation";
755+
payloadTitle = " - Tagged data";
768756
}
769757
} else if (node.data.isMilestone) {
770758
payloadTitle = " - Checkpoint";
@@ -796,15 +784,6 @@ class Visualizer extends AsyncComponent<RouteComponentProps, VisualizerState> {
796784
: "";
797785
}
798786

799-
/**
800-
* Calculate the link for the index.
801-
* @param index The payload index.
802-
* @returns The url for the index.
803-
*/
804-
private calculateIndexedLink(index: string): string {
805-
return `${window.location.protocol}//${window.location.host}/explorer/indexed/${index}`;
806-
}
807-
808787
/**
809788
* Highlight the forward and backwards cones.
810789
* @param vertexId The node to highlight.

src/app/routes/explorer/Indexed.scss

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/app/routes/explorer/Indexed.tsx

Lines changed: 0 additions & 167 deletions
This file was deleted.

src/app/routes/explorer/IndexedRouteProps.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/app/routes/explorer/IndexedState.ts

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)