Skip to content

Commit

Permalink
chore: use real xdr in execute proposal modal
Browse files Browse the repository at this point in the history
  • Loading branch information
0xExp-po committed Dec 13, 2024
1 parent 6d8a3bc commit e58538d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dapp/src/components/page/proposal/ExecuteProposalModal.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import React from "react";
import { useState, useEffect } from "react";
import JsonView from "react18-json-view";
import { modifySlashInXdr, processDecodedData } from "utils/utils";
import { modifySlashInXdr } from "utils/utils";
import { stellarLabViewXdrLink } from "constants/serviceLinks";
import { demoOutcomeData } from "constants/demoProposalData";
import * as StellarXdr from "utils/stellarXdr";
import { parseToLosslessJson } from "utils/passToLosslessJson";

interface VotersModalProps {
xdr: string;
Expand All @@ -18,9 +19,8 @@ const VotersModal: React.FC<VotersModalProps> = ({ xdr, onClose }) => {
const getContentFromXdr = async (_xdr: string) => {
try {
if (_xdr) {
const decoded = processDecodedData(_xdr);
console.log("decode:", decoded);
setContent(demoOutcomeData);
const decoded = StellarXdr.decode("TransactionEnvelope", _xdr);
setContent(parseToLosslessJson(decoded));
}
} catch (error) {
console.error("Error decoding XDR:", error);
Expand Down

0 comments on commit e58538d

Please sign in to comment.