Skip to content

Commit 12da74b

Browse files
committed
fix: clean
1 parent 116c725 commit 12da74b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

apps/namadillo/src/App/Transactions/TransactionCard.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,13 @@ const getRedelegationTransactionInfo = (
129129
tx: Tx["tx"]
130130
): TransactionInfo | undefined => {
131131
if (!tx?.data) return undefined;
132-
const parsed = typeof tx.data === "string" ? JSON.parse(tx.data) : tx.data;
132+
let parsed;
133+
try {
134+
parsed = JSON.parse(tx.data);
135+
} catch (error) {
136+
parsed = tx.data;
137+
}
138+
133139
return {
134140
amount: BigNumber(parsed.amount),
135141
sender: parsed.src_validator,

0 commit comments

Comments
 (0)