Skip to content

Commit 2dd335a

Browse files
committed
fix: refine search, display unlock condition, stardust git workflow
1 parent 1e4bc17 commit 2dd335a

File tree

9 files changed

+542
-469
lines changed

9 files changed

+542
-469
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Client Build Stardust
2+
3+
on:
4+
push:
5+
branches: [feat/stardust]
6+
paths:
7+
- "src/**"
8+
- ".github/workflows/build-stardust.yml"
9+
pull_request:
10+
branches: [feat/stardust]
11+
paths:
12+
- "src/**"
13+
- ".github/workflows/build-stardust.yml"
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Use Node.js 14.x
22+
uses: actions/setup-node@v1
23+
with:
24+
node-version: "14"
25+
- name: Client Build
26+
run: |
27+
npm install
28+
npm run build

package-lock.json

Lines changed: 350 additions & 292 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
},
1010
"license": "MIT",
1111
"dependencies": {
12-
"@iota/crypto.js": "^1.9.0-stardust.4",
13-
"@iota/util.js": "^1.9.0-stardust.4",
12+
"@iota/iota.js": "^1.9.0-stardust.6",
1413
"classnames": "^2.3.1",
1514
"humanize-duration": "^3.25.2",
1615
"moment": "^2.29.1",

src/app/components/tangle/Output.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Output extends Component<OutputProps, OutputState> {
3434
public render(): ReactNode {
3535
return (
3636
<div className="output">
37-
<h2>{NameHelper.getOutputTypeName(this.state.output.type)} {this.props.index}</h2>
37+
<h2>{this.props.index}. {NameHelper.getOutputTypeName(this.state.output.type)}</h2>
3838
{/* Diplay metadata for Output Response */}
3939
{this.isOutputResponse(this.props.output) && (
4040
<React.Fragment>

src/app/components/tangle/UnlockCondition.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,9 @@ class UnlockCondition extends Component<UnlockConditionProps> {
9292
</React.Fragment>
9393
)}
9494
{this.props.unlockCondition.type === IMMUTABLE_ALIAS_UNLOCK_CONDITION_TYPE && (
95-
<React.Fragment>
96-
<Address
97-
address={this.props.unlockCondition.address}
98-
/>
99-
</React.Fragment>
95+
<Address
96+
address={this.props.unlockCondition.address}
97+
/>
10098
)}
10199
<div className="card--label">
102100
Type:

src/app/routes/Search.tsx

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Blake2b } from "@iota/crypto.js";
2-
import { serializeMessage, deserializeMessage, IMessage, ADDRESS_UNLOCK_CONDITION_TYPE } from "@iota/iota.js";
3-
import { Converter, WriteStream, ReadStream } from "@iota/util.js";
2+
import { serializeMessage } from "@iota/iota.js";
3+
import { Converter, WriteStream } from "@iota/util.js";
44
import React, { ReactNode } from "react";
55
import { Link, Redirect, RouteComponentProps } from "react-router-dom";
66
import { ReactComponent as ChevronLeftIcon } from "../../assets/chevron-left.svg";
@@ -93,17 +93,25 @@ class Search extends AsyncComponent<RouteComponentProps<SearchRouteProps>, Searc
9393
<span>Addresses</span>
9494
<span>64 Hex characters or Bech32 Format</span>
9595
</li>
96+
<li>
97+
<span>Nft/Alias Addresses</span>
98+
<span>40 Hex characters or Bech32 Format</span>
99+
</li>
96100
<li>
97101
<span>Outputs</span>
98-
<span>68 Hex characters</span>
102+
<span>68 Hex characters or tag</span>
99103
</li>
100104
<li>
101-
<span>Milestone Index</span>
102-
<span>Numeric</span>
105+
<span>Foundry Id</span>
106+
<span>52 Hex characters</span>
103107
</li>
104108
<li>
105-
<span>Indexes</span>
106-
<span>Maximum 64 UTF-8 chars or maximum 128 hex chars</span>
109+
<span>Token Id</span>
110+
<span>76 Hex characters</span>
111+
</li>
112+
<li>
113+
<span>Milestone Index</span>
114+
<span>Numeric</span>
107115
</li>
108116
</ul>
109117
</React.Fragment>
@@ -136,8 +144,6 @@ class Search extends AsyncComponent<RouteComponentProps<SearchRouteProps>, Searc
136144

137145
if (response.message) {
138146
objType = "message";
139-
console.log("message");
140-
console.log(response.message);
141147
// Recalculate the message id from the content, in case
142148
// the lookup was a response to a transaction id lookup
143149
const writeStream = new WriteStream();
@@ -149,17 +155,7 @@ class Search extends AsyncComponent<RouteComponentProps<SearchRouteProps>, Searc
149155
console.log(error.message);
150156
}
151157
}
152-
// console.log("writeStream.finalHex()")
153-
// console.log(writeStream.finalHex())
154158
objParam = Converter.bytesToHex(Blake2b.sum256(writeStream.finalBytes()), true);
155-
// console.log(objParam);
156-
// let rs = new ReadStream(writeStream.finalBytes())
157-
// const hex =
158-
// "020239210d349a33c361bf98ada707663f3f7da71ffff1531c58c1c5c770a60c4223c2f5cc3f1161b74e84a5afc9f4739ab51d0d01c3786334a1877436a3c2cc9ebda101000007000000300401000dad4e62000000000239210d349a33c361bf98ada707663f3f7da71ffff1531c58c1c5c770a60c4223c2f5cc3f1161b74e84a5afc9f4739ab51d0d01c3786334a1877436a3c2cc9ebd0e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a80000000000000000000000000300d85e5b1590d898d1e0cdebb2e3b5337c8b76270142663d78811683ba47c17c9815188080d5ef2f8a8fd08498243a30b2a8eb08e0910573101632bb244c9e27db26121c8af619d90de6cb5e5c407e4edd709e0e06702170e311a1668e0a12480d00d9922819a39e94ddf3907f4b9c8df93f39f026244fcb609205b9a879022599f248afb8e21fbba0ba473b6798ecad3a33e10d1575fd5e3822e2922db4cc24b0808fd6792ee6eaaade15cdc14e43da16883962d15358dc064ba5bb2726cf07790a00f9d9656a60049083eef61487632187b351294c1fa23d118060d813db6d03e8b6105c244d6cd7d831d7f661e985fed1461cdda0ef48e9b973015aa1e28ff1cdd1089f910789cccaeeb24c74b17a36d9777199056d54fea8d28c1e16abee4b710c8038aeaaaaaaaaaa";
159-
// let rs = new ReadStream(Converter.hexToBytes(hex))
160-
// let de = deserializeMessage(rs)
161-
// console.log("deserialize")
162-
// console.log(JSON.stringify(de))
163159
} else if (response?.address) {
164160
objType = "address";
165161
} else if (response.indexMessageIds) {

src/app/routes/explorer/Message.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import AsyncComponent from "../../components/layout/AsyncComponent";
1414
import MessageButton from "../../components/layout/MessageButton";
1515
import Spinner from "../../components/layout/Spinner";
1616
import InclusionState from "../../components/tangle/InclusionState";
17-
import TaggedDataPayload from "../../components/tangle/TaggedDataPayload";
1817
import MessageTangleState from "../../components/tangle/MessageTangleState";
1918
import MilestonePayload from "../../components/tangle/MilestonePayload";
2019
import ReceiptPayload from "../../components/tangle/ReceiptPayload";
20+
import TaggedDataPayload from "../../components/tangle/TaggedDataPayload";
2121
import TransactionPayload from "../../components/tangle/TransactionPayload";
2222
import "./Message.scss";
2323
import { MessageRouteProps } from "./MessageRouteProps";

0 commit comments

Comments
 (0)