Skip to content

Commit

Permalink
Change CSL on txUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
elenabardho committed Feb 13, 2025
1 parent 36898cb commit 56f275c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/utils/txUtils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as CLS from "@emurgo/cardano-serialization-lib-browser";
import * as CSL from "@emurgo/cardano-serialization-lib-browser";
import { deserializeAddress } from "@meshsdk/core";
import dotevn from "dotenv";
import * as blake from 'blakejs';
Expand All @@ -8,13 +8,13 @@ const NEXT_PUBLIC_REST_IPFS_GATEWAY=process.env.NEXT_PUBLIC_REST_IPFS_GATEWAY;
/**
* Decodes a transaction from a hex string to a CardanoSerializationLib Transaction object.
* @param unsignedTransactionHex hex string of the unsigned transaction.
* @returns {CLS.Transaction} the decoded transaction object, or null if the decoding fails.
* @returns {CSL.Transaction} the decoded transaction object, or null if the decoding fails.
*/

export const decodeHextoTx = (unsignedTransactionHex: string) => {
console.log("decodeHextoTx");
try {
const unsignedTransaction = CLS.Transaction.from_hex(unsignedTransactionHex);
const unsignedTransaction = CSL.Transaction.from_hex(unsignedTransactionHex);
return unsignedTransaction;
} catch (error) {
console.error("Error decoding transaction:", error);
Expand Down

0 comments on commit 56f275c

Please sign in to comment.