Skip to content

Commit

Permalink
fixup! feat(cardano-services): changes the way tx metadatum are read …
Browse files Browse the repository at this point in the history
…from db, from json to raw bytes
  • Loading branch information
iccicci committed Feb 8, 2023
1 parent 9909f41 commit 7c51e61
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/cardano-services/src/Metadata/mappers.ts
Expand Up @@ -8,10 +8,10 @@ export const mapTxMetadata = (metadataModel: Pick<TxMetadataModel, 'bytes' | 'ke

if (bytes && key) {
const biKey = BigInt(key);
const datumMap = usingAutoFree((_) => cmlToCore.txMetadatum(CML.TransactionMetadatum.from_bytes(bytes)));
const metadata = usingAutoFree((_) => cmlToCore.txMetadata(CML.GeneralTransactionMetadata.from_bytes(bytes)));

if (datumMap instanceof Map) {
const datum = datumMap.get(biKey);
if (metadata) {
const datum = metadata.get(biKey);

if (datum) map.set(biKey, datum);
}
Expand Down

0 comments on commit 7c51e61

Please sign in to comment.