Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'concat' of undefined on sending #62

Open
blockparty-sh opened this issue Sep 8, 2019 · 3 comments
Open

Cannot read property 'concat' of undefined on sending #62

blockparty-sh opened this issue Sep 8, 2019 · 3 comments

Comments

@blockparty-sh
Copy link
Contributor

I am reposting this error from here: badger-cash/badger#197

Just in case someone is looking here for same problem. I am pretty sure I have gotten this bug in slp-sdk as well, possibly due to some network issue (rest being down/responding incorrectly perhaps?).

@kirkins
Copy link

kirkins commented Dec 2, 2019

Hello I'm having the same issue. I believe the same code is being used successfully elsewhere so I'm wondering why it fails in my case.

Input config below with funding wif switched out:

sendConfig:  { fundingAddress: 'simpleledger:qqaza4qqgnazt7zxexta6zv2gvcyp64kqgdaf0v6vq',
  fundingWif: 'cUCSrdhu7mCzx4sWqL6irqzprkofxPmLHYgkSnG2WaWVqJDXtWRS',
  tokenReceiverAddress: 'simpleledger:qr5jrq0ulfjdu0wk725v02fnfrrts6yrlyzfspntcv',
  bchChangeReceiverAddress: 'bitcoincash:qqaza4qqgnazt7zxexta6zv2gvcyp64kqgpxz5e6j7',
  tokenId:
   '54be8c9eac597633e2fa579565a8b5a5e9a361f82c3cc87a7e5f669c3c4f33ac',
  amount: 100 }

Are one of my values incorrect or wrong format here?

@kirkins
Copy link

kirkins commented Dec 2, 2019

The specific part of the library that causes an error in my case is in lib/TokenType1.js lines 146-147.

inputUtxos = balances_1.slpTokenUtxos[tokenId];
inputUtxos = inputUtxos.concat(balances_1.nonSlpUtxos);

The balances_1.slpTokenUtxos here is an empty object.

@kirkins
Copy link

kirkins commented Dec 3, 2019

Figured it out in my situation, I was using the wrong address and the one being used actually had no slp tokens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants