Skip to content

setupRefund() failing #19

@meinharrd

Description

@meinharrd

hi there,

when following the docs and examples to set up a channel, i get this error:

bitcore-channel.js:140 Uncaught TypeError: Cannot read property 'script' of undefined

this happens because outputs[] is empty. the insight api call however does return utxo transactions. so i assume that something in Consumer.processFunding() is not parsing them properly.

my code:

var consumer = new Consumer({
  network: 'testnet',
  fundingKey: fundingKey,
  refundKey: refundKey,
  commitmentKey: commitmentKey,
  providerPublicKey: providerPublicKey,
});

var insight = new Insight(bitcore.Networks.testnet);
insight.getUnspentUtxos(consumer.fundingAddress, function(err, utxos) {
  consumer.processFunding(utxos);
  consumer.setupRefund();
});

any clues?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions