Skip to content

Commit

Permalink
Support nested vector in explorer (#681)
Browse files Browse the repository at this point in the history
* Support nested vector in explorer

* Comment and types

* Comments and JSON.parse

* Remove console

---------

Co-authored-by: Alexzander Stone <[email protected]>
  • Loading branch information
BriungRi and Alexzander-Stone authored May 2, 2024
1 parent 33d5a79 commit be80b2b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/pages/Account/Tabs/ModulesTab/Contract.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@ import {
import {useLogEventWithBasic} from "../../hooks/useLogEventWithBasic";
import {ContentCopy} from "@mui/icons-material";
import StyledTooltip from "../../../../components/StyledTooltip";
import {
deserializeVector,
encodeInputArgsForViewRequest,
} from "../../../../utils";
import {encodeInputArgsForViewRequest} from "../../../../utils";
import {accountPagePath} from "../../Index";

type ContractFormType = {
Expand Down Expand Up @@ -293,7 +290,7 @@ function RunContractForm({
? Array.from(new HexString(arg).toUint8Array()).map((x) =>
x.toString(),
)
: deserializeVector(arg);
: JSON.parse(arg);
} else if (type.startsWith("0x1::option::Option")) {
arg ? {vec: [arg]} : undefined;
} else return arg;
Expand Down

0 comments on commit be80b2b

Please sign in to comment.