Skip to content

Commit

Permalink
Update utxo query for version 1.31.0
Browse files Browse the repository at this point in the history
Now the output Amount contains: 
`A lovelaces + TxOutDatumNone`
  • Loading branch information
javiergradiche committed Nov 16, 2021
1 parent f693b3a commit feef911
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ class CardanocliJs {
const value = {};
let datumHash;
valueList.forEach((v) => {
if (v.includes("TxOutDatumHash")) {
if (v.includes("TxOutDatumHash") || v.includes("TxOutDatumNone") ) {
if (!v.includes("None"))
datumHash = JSON.parse(v.trim().split(" ")[2]);
return;
Expand Down

2 comments on commit feef911

@MarceloArraes
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Javier! Do you had to make any change on the transactions for it to work on the 1.31.0, or just this litle change was enought?

txOut: [
    {
      address: wallet.paymentAddr,
      value: { ...wallet.balance().value, [MARCELOCOIN]: 1 },
    },
  ],

changed the way the transaction txOut is written ?

@zachyking
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed the way the transaction txOut is written ?

if it doesn't work you probably need to base16-encode tokenname: my stack exchange q for reference

Please sign in to comment.