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

transfer STEEM failed by steem-js #476

Open
past2017 opened this issue Apr 30, 2020 · 1 comment
Open

transfer STEEM failed by steem-js #476

past2017 opened this issue Apr 30, 2020 · 1 comment

Comments

@past2017
Copy link

tranfer STEEM by below code

var steem = require('steem');
var user="test1234"
var pass="yyyyyyyyyyyyyyyyyy"
var wif = steem.auth.toWif(user, pass, 'active');

var from="test1234"
var to="testt2222"
var amount="0.001 STEEM"
var memo="222"
steem.api.setOptions({ url: 'http://127.0.0.1:62001' });

steem.broadcast.transfer(wif, from, to, amount, memo, function(err, result) {
    console.log(err, result);
});

some error report

# node transfer.js 
{ RPCError: Bad Cast:Invalid cast from type 'array_type' to Object
    at new RPCError (/root/src/node_modules/steem/lib/api/transports/http.js:43:106)
    at /root/src/node_modules/steem/lib/api/transports/http.js:93:13
    at process._tickCallback (internal/process/next_tick.js:68:7)
  cause:
   { RPCError: Bad Cast:Invalid cast from type 'array_type' to Object
       at new RPCError (/root/src/node_modules/steem/lib/api/transports/http.js:43:106)
       at /root/src/node_modules/steem/lib/api/transports/http.js:93:13
       at process._tickCallback (internal/process/next_tick.js:68:7)
     name: 'RPCError',
     code: -32000,
     data:
      { code: 7,
        name: 'bad_cast_exception',
        message: 'Bad Cast',
        stack: [Array] } },
  isOperational: true,
  code: -32000,
  data:
   { code: 7,
     name: 'bad_cast_exception',
     message: 'Bad Cast',
     stack: [ [Object] ] } } undefined

but if i use node https://api.steemit.com, all works well, I set almost all plugins in my config.ini

plugin = witness account_by_key account_by_key_api condenser_api
plugin=account_history account_history_api network_broadcast_api transaction_status_api database_api

please help me what i need to set in config.inn to transfer STEMM well with steem-js

@DoctorLai
Copy link
Contributor

Seems like this is a problem with your node setup?

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