explorer: remove line breaks from wrapped data (#15379)
This commit is contained in:
parent
480b4e08a9
commit
b9fb595db2
|
@ -1,10 +1,9 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { TransactionInstruction } from "@solana/web3.js";
|
import { TransactionInstruction } from "@solana/web3.js";
|
||||||
import { Address } from "components/common/Address";
|
import { Address } from "components/common/Address";
|
||||||
import { wrap } from "utils";
|
|
||||||
|
|
||||||
export function RawDetails({ ix }: { ix: TransactionInstruction }) {
|
export function RawDetails({ ix }: { ix: TransactionInstruction }) {
|
||||||
const data = wrap(ix.data.toString("hex"), 50);
|
const data = ix.data.toString("hex");
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{ix.keys.map(({ pubkey, isSigner, isWritable }, keyIndex) => (
|
{ix.keys.map(({ pubkey, isSigner, isWritable }, keyIndex) => (
|
||||||
|
@ -27,7 +26,7 @@ export function RawDetails({ ix }: { ix: TransactionInstruction }) {
|
||||||
<tr>
|
<tr>
|
||||||
<td>Instruction Data (Hex)</td>
|
<td>Instruction Data (Hex)</td>
|
||||||
<td className="text-lg-right">
|
<td className="text-lg-right">
|
||||||
<pre className="d-inline-block text-left mb-0">{data}</pre>
|
<pre className="d-inline-block text-left mb-0 data-wrap">{data}</pre>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</>
|
</>
|
||||||
|
|
|
@ -331,3 +331,12 @@ div.inner-cards {
|
||||||
background: red;
|
background: red;
|
||||||
border: 1px solid red;
|
border: 1px solid red;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pre.data-wrap {
|
||||||
|
max-width: 23rem;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
white-space: -moz-pre-wrap;
|
||||||
|
white-space: -pre-wrap;
|
||||||
|
white-space: -o-pre-wrap;
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue