Skip to content

Commit

Permalink
Merge pull request #43 from o1-labs/develop
Browse files Browse the repository at this point in the history
v0.2.0
  • Loading branch information
shimkiv authored Apr 23, 2024
2 parents 845da97 + 173bc16 commit 0ba43b3
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 17 deletions.
8 changes: 4 additions & 4 deletions css/daisyui.css

Large diffs are not rendered by default.

40 changes: 28 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -411,27 +411,35 @@ <h1 class="text-xl underline">{{header}}</h1>
{{#failureReason}}
<tr class="!bg-red-600">
{{/failureReason}}
<td title="{{hash}}">
<td class="align-top" title="{{hash}}">
<div class="badge badge-primary badge-outline">
<a class="link link-primary" href="./index.html?target=transaction&hash={{hash}}" target="_self">
{{hashView}}
</a>
</div>
<br />
{{#memo}}
<div class="text-gray-600 text-xs mt-0.5 pl-2.5">
<span class="underline">Memo</span><span>:</span>
<br />
<div>{{memoView}}</div>
</div>
{{/memo}}
</td>
<td title="{{feePayer.publicKey}}">
<td class="align-top" title="{{feePayer.publicKey}}">
<div class="badge badge-secondary badge-outline">
<a class="link link-secondary" href="./index.html?target=account&publicKey={{feePayer.publicKey}}" target="_self">{{feePayerView}}</a>
</div>
</td>
<td title="{{receiver.publicKey}}">
<td class="align-top" title="{{receiver.publicKey}}">
<div class="badge badge-secondary badge-outline">
<a class="link link-secondary" href="./index.html?target=account&publicKey={{receiver.publicKey}}" target="_self">{{receiverView}}</a>
</div>
</td>
<td><div class="badge badge-accent badge-outline">{{kind}}</div></td>
<td><div class="badge badge-ghost">{{amountView}}</div></td>
<td><div class="badge badge-ghost">{{feeView}}</div></td>
<td><div class="badge badge-ghost">{{nonce}}</div></td>
<td class="align-top"><div class="badge badge-accent badge-outline">{{kind}}</div></td>
<td class="align-top"><div class="badge badge-ghost">{{amountView}}</div></td>
<td class="align-top"><div class="badge badge-ghost">{{feeView}}</div></td>
<td class="align-top"><div class="badge badge-ghost">{{nonce}}</div></td>
</tr>
{{/valueTransfers}}
</tbody>
Expand Down Expand Up @@ -481,19 +489,27 @@ <h1 class="text-xl underline">{{header}}</h1>
{{#isFailedTxn}}
<tr class="!bg-red-600">
{{/isFailedTxn}}
<td title="{{hash}}">
<td class="align-top" title="{{hash}}">
<div class="badge badge-primary badge-outline">
<a class="link link-primary" href="./index.html?target=transaction&hash={{hash}}" target="_self">
{{hashView}}
</a>
</div>
<br />
{{#zkappCommand.memo}}
<div class="text-gray-600 text-xs mt-0.5 pl-2.5">
<span class="underline">Memo</span><span>:</span>
<br />
<span>{{memoView}}</span>
</div>
{{/zkappCommand.memo}}
</td>
<td title="{{zkappCommand.feePayer.body.publicKey}}">
<td class="align-top" title="{{zkappCommand.feePayer.body.publicKey}}">
<div class="badge badge-secondary badge-outline">
<a class="link link-secondary" href="./index.html?target=account&publicKey={{zkappCommand.feePayer.body.publicKey}}" target="_self">{{feePayerView}}</a>
</div>
</td>
<td>
<td class="align-top">
{{^zkappCommand.accountUpdates}}
<div class="badge badge-secondary badge-outline">
No data found
Expand All @@ -506,8 +522,8 @@ <h1 class="text-xl underline">{{header}}</h1>
<br />
{{/zkappCommand.accountUpdates}}
</td>
<td><div class="badge badge-ghost">{{feeView}}</div></td>
<td><div class="badge badge-ghost">{{zkappCommand.feePayer.body.nonce}}</div></td>
<td class="align-top"><div class="badge badge-ghost">{{feeView}}</div></td>
<td class="align-top"><div class="badge badge-ghost">{{zkappCommand.feePayer.body.nonce}}</div></td>
</tr>
{{/zkApps}}
</tbody>
Expand Down
16 changes: 16 additions & 0 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -636,13 +636,21 @@
}

function renderValueTransfersList(header, valueTransfers, containerId) {
for (const valueTransfer of valueTransfers) {
valueTransfer.memo = decodeBase58Message(valueTransfer.memo).trim();
}
renderTemplate("valueTransfersListTemplate", containerId, {
header,
valueTransfers,
txnsCounter: valueTransfers.length,
hashView: function () {
return ellipsify(this.hash);
},
memoView: function () {
return this
? this.replace(RegExp(String.fromCharCode(28), "g"), "")
: "";
},
feePayerView: function () {
return ellipsify(this.feePayer.publicKey);
},
Expand All @@ -661,6 +669,9 @@
function renderZkAppsList(header, zkApps, containerId) {
for (const zkApp of zkApps) {
zkApp.isFailedTxn = zkApp.failureReason?.length > 0;
zkApp.zkappCommand.memo = decodeBase58Message(
zkApp.zkappCommand.memo
).trim();
}
renderTemplate("zkAppsListTemplate", containerId, {
header,
Expand All @@ -669,6 +680,11 @@
hashView: function () {
return ellipsify(this.hash);
},
memoView: function () {
return this
? this.replace(RegExp(String.fromCharCode(28), "g"), "")
: "";
},
feePayerView: function () {
return ellipsify(this.zkappCommand.feePayer.body.publicKey);
},
Expand Down
6 changes: 5 additions & 1 deletion js/constants.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Update application version for every new release
const applicationVersion = "v0.1.9";
const applicationVersion = "v0.2.0";

const timeZoneOffset = new Date().getTimezoneOffset() * 60000;
const minaTokenId = "wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf";
Expand Down Expand Up @@ -119,6 +119,7 @@ const valueTransfersMempoolGraphQlQuery = {
fee
nonce
hash
memo
}
}`,
variables: null,
Expand All @@ -141,6 +142,7 @@ const zkAppsMempoolGraphQlQuery = {
publicKey
}
}
memo
}
}
}`,
Expand Down Expand Up @@ -200,6 +202,7 @@ const getBlockDetailsGraphQlQuery = function (numberOrHash) {
fee
nonce
hash
memo
}
zkappCommands {
failureReason {
Expand All @@ -220,6 +223,7 @@ const getBlockDetailsGraphQlQuery = function (numberOrHash) {
publicKey
}
}
memo
}
}
}
Expand Down

0 comments on commit 0ba43b3

Please sign in to comment.