@indigo-labs/indigo-sdk 0.1.23 → 0.1.25
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.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
- package/src/contracts/cdp.ts +1 -0
- package/src/helpers/asset-helpers.ts +1 -2
package/dist/index.js
CHANGED
|
@@ -376,7 +376,6 @@ var IAssetHelpers = class {
|
|
|
376
376
|
CDPContract.address(params.cdpParams, lucid),
|
|
377
377
|
params.cdpParams.iAssetAuthToken[0].unCurrencySymbol + (0, import_lucid5.fromText)(params.cdpParams.iAssetAuthToken[1].unTokenName)
|
|
378
378
|
).then((utxos) => {
|
|
379
|
-
console.log("iasset utxos", utxos);
|
|
380
379
|
return utxos.map((utxo) => {
|
|
381
380
|
if (!utxo.datum) return void 0;
|
|
382
381
|
const datum = parseIAssetDatum(utxo.datum);
|
|
@@ -384,7 +383,7 @@ var IAssetHelpers = class {
|
|
|
384
383
|
return { utxo, datum };
|
|
385
384
|
}).find((utxo) => utxo !== void 0);
|
|
386
385
|
}).then((result) => {
|
|
387
|
-
if (!result) throw new Error("Unable to locate IAsset by name
|
|
386
|
+
if (!result) throw new Error("Unable to locate IAsset by name: " + assetName);
|
|
388
387
|
return result;
|
|
389
388
|
});
|
|
390
389
|
}
|
|
@@ -939,6 +938,7 @@ var CDPContract = class _CDPContract {
|
|
|
939
938
|
const cdp = (await lucid.utxosByOutRef([cdpRef]))[0];
|
|
940
939
|
if (!cdp.datum) throw new Error("Unable to find CDP Datum");
|
|
941
940
|
const cdpDatum = parseCDPDatum(cdp.datum);
|
|
941
|
+
console.log("cdpDatum.iasset", cdpDatum.iasset);
|
|
942
942
|
const iAsset = await (assetRef ? IAssetHelpers.findIAssetByRef(assetRef, lucid) : IAssetHelpers.findIAssetByName(cdpDatum.iasset, params, lucid));
|
|
943
943
|
const gov = govRef ? (await lucid.utxosByOutRef([govRef]))[0] : await lucid.utxoByUnit(
|
|
944
944
|
params.govParams.govNFT[0].unCurrencySymbol + (0, import_lucid13.fromText)(params.govParams.govNFT[1].unTokenName)
|
package/dist/index.mjs
CHANGED
|
@@ -224,7 +224,6 @@ var IAssetHelpers = class {
|
|
|
224
224
|
CDPContract.address(params.cdpParams, lucid),
|
|
225
225
|
params.cdpParams.iAssetAuthToken[0].unCurrencySymbol + fromText(params.cdpParams.iAssetAuthToken[1].unTokenName)
|
|
226
226
|
).then((utxos) => {
|
|
227
|
-
console.log("iasset utxos", utxos);
|
|
228
227
|
return utxos.map((utxo) => {
|
|
229
228
|
if (!utxo.datum) return void 0;
|
|
230
229
|
const datum = parseIAssetDatum(utxo.datum);
|
|
@@ -232,7 +231,7 @@ var IAssetHelpers = class {
|
|
|
232
231
|
return { utxo, datum };
|
|
233
232
|
}).find((utxo) => utxo !== void 0);
|
|
234
233
|
}).then((result) => {
|
|
235
|
-
if (!result) throw new Error("Unable to locate IAsset by name
|
|
234
|
+
if (!result) throw new Error("Unable to locate IAsset by name: " + assetName);
|
|
236
235
|
return result;
|
|
237
236
|
});
|
|
238
237
|
}
|
|
@@ -810,6 +809,7 @@ var CDPContract = class _CDPContract {
|
|
|
810
809
|
const cdp = (await lucid.utxosByOutRef([cdpRef]))[0];
|
|
811
810
|
if (!cdp.datum) throw new Error("Unable to find CDP Datum");
|
|
812
811
|
const cdpDatum = parseCDPDatum(cdp.datum);
|
|
812
|
+
console.log("cdpDatum.iasset", cdpDatum.iasset);
|
|
813
813
|
const iAsset = await (assetRef ? IAssetHelpers.findIAssetByRef(assetRef, lucid) : IAssetHelpers.findIAssetByName(cdpDatum.iasset, params, lucid));
|
|
814
814
|
const gov = govRef ? (await lucid.utxosByOutRef([govRef]))[0] : await lucid.utxoByUnit(
|
|
815
815
|
params.govParams.govNFT[0].unCurrencySymbol + fromText4(params.govParams.govNFT[1].unTokenName)
|
package/package.json
CHANGED
package/src/contracts/cdp.ts
CHANGED
|
@@ -348,6 +348,7 @@ export class CDPContract {
|
|
|
348
348
|
const cdp = (await lucid.utxosByOutRef([cdpRef]))[0];
|
|
349
349
|
if (!cdp.datum) throw new Error('Unable to find CDP Datum');
|
|
350
350
|
const cdpDatum = parseCDPDatum(cdp.datum);
|
|
351
|
+
console.log('cdpDatum.iasset', cdpDatum.iasset);
|
|
351
352
|
const iAsset = await (assetRef
|
|
352
353
|
? IAssetHelpers.findIAssetByRef(assetRef, lucid)
|
|
353
354
|
: IAssetHelpers.findIAssetByName(cdpDatum.iasset, params, lucid));
|
|
@@ -45,7 +45,6 @@ export class IAssetHelpers {
|
|
|
45
45
|
fromText(params.cdpParams.iAssetAuthToken[1].unTokenName),
|
|
46
46
|
)
|
|
47
47
|
.then((utxos) => {
|
|
48
|
-
console.log('iasset utxos', utxos);
|
|
49
48
|
return utxos
|
|
50
49
|
.map((utxo) => {
|
|
51
50
|
if (!utxo.datum) return undefined;
|
|
@@ -56,7 +55,7 @@ export class IAssetHelpers {
|
|
|
56
55
|
.find((utxo) => utxo !== undefined);
|
|
57
56
|
})
|
|
58
57
|
.then((result) => {
|
|
59
|
-
if (!result) throw new Error('Unable to locate IAsset by name
|
|
58
|
+
if (!result) throw new Error('Unable to locate IAsset by name: ' + assetName);
|
|
60
59
|
return result;
|
|
61
60
|
});
|
|
62
61
|
}
|