Skip to content

Commit

Permalink
fix(core): handle values without assets
Browse files Browse the repository at this point in the history
  • Loading branch information
rhyslbw committed Sep 24, 2021
1 parent 38a1867 commit 1ca4335
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/Ogmios/OgmiosToCardanoWasm.ts
Expand Up @@ -19,7 +19,7 @@ export const OgmiosToCardanoWasm = {
),
value: (ogmios: OgmiosSchema.Value): CardanoWasm.Value => {
const value = CardanoWasm.Value.new(CardanoWasm.BigNum.from_str(ogmios.coins.toString()));
const assets = Object.entries(ogmios.assets);
const assets = ogmios.assets !== undefined ? Object.entries(ogmios.assets) : [];
if (assets.length === 0) {
return value;
}
Expand Down

0 comments on commit 1ca4335

Please sign in to comment.