@lucid-evolution/utils 0.1.14 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -960,7 +960,7 @@ function assetsToValue(assets) {
|
|
|
960
960
|
const assetsValue = CML.MapAssetNameToCoin.new();
|
|
961
961
|
for (const unit of policyUnits) {
|
|
962
962
|
assetsValue.insert(
|
|
963
|
-
CML.AssetName.
|
|
963
|
+
CML.AssetName.from_bytes((0, import_core_utils4.fromHex)(unit.slice(56))),
|
|
964
964
|
BigInt(assets[unit])
|
|
965
965
|
);
|
|
966
966
|
}
|
package/dist/index.js
CHANGED
|
@@ -845,7 +845,7 @@ function slotToUnixTime(network, slot) {
|
|
|
845
845
|
}
|
|
846
846
|
|
|
847
847
|
// src/value.ts
|
|
848
|
-
import {
|
|
848
|
+
import { fromHex as fromHex4, fromText } from "@lucid-evolution/core-utils";
|
|
849
849
|
function valueToAssets(value) {
|
|
850
850
|
const assets = {};
|
|
851
851
|
assets["lovelace"] = value.coin();
|
|
@@ -880,7 +880,7 @@ function assetsToValue(assets) {
|
|
|
880
880
|
const assetsValue = CML.MapAssetNameToCoin.new();
|
|
881
881
|
for (const unit of policyUnits) {
|
|
882
882
|
assetsValue.insert(
|
|
883
|
-
CML.AssetName.
|
|
883
|
+
CML.AssetName.from_bytes(fromHex4(unit.slice(56))),
|
|
884
884
|
BigInt(assets[unit])
|
|
885
885
|
);
|
|
886
886
|
}
|