blockchain / service-my-wallet-v3

Blockchain Wallet API Service
https://blockchain.info/api/blockchain_wallet_api
GNU Affero General Public License v3.0
910 stars 518 forks source link

SendMany not working #439

Open ReginaldasR opened 4 years ago

ReginaldasR commented 4 years ago

Hello, I am trying to send batched transaction using sendMany endpoint and I am getting error.

Request line:

http://0.0.0.0:3000/merchant/{guid}/sendmany?password={password}&second_password={second_password}&from=138vc3gVfmuSbLciy3dn4rcg3VS9R1W9Jo&recipients=%7B%22{wallet_address}%22%3A29113%2C%22{wallet_address}%22%3A29113%7D

Error in response: { "error": "Error building transaction" }

Error found in logs:

{ password: '{password}', from: '{from}', second_password: '{secondary_password}', amount: [ 29113, 29113 ], to: [ '{wallet_address}', '{wallet_address} ] } error { error: { AssertionError [ERR_ASSERTION]: [object Object] at new Transaction (/service-my-wallet-v3/node_modules/blockchain-wallet-client/lib/transaction.js:45:3) at Payment.<anonymous> (/service-my-wallet-v3/node_modules/blockchain-wallet-client/lib/payment.js:413:29) at process.internalTickCallback (internal/process/next_tick.js:77:7) generatedMessage: false, name: 'AssertionError [ERR_ASSERTION]', code: 'ERR_ASSERTION', actual: false, expected: true, operator: '==' }, payment: { fees: { limits: { min: 1, max: 40 }, regular: 3, priority: 27 }, coins: [], selectedCoins: [], from: [ '{from}' ], amounts: [ 29113, 29113 ], to: [ '{wallet_address}', '{wallet_address}' ], feePerKb: 3000, extraFeeConsumption: 0, sweepFee: 0, sweepAmount: 0, balance: 0, finalFee: 0, changeAmount: 0, maxFees: { limits: NaN, regular: 0, priority: 0 }, maxSpendableAmounts: { limits: NaN, regular: 0, priority: 0 }, txSize: 0, blockchainFee: 0, blockchainAddress: null, serviceChargeOptions: {}, change: '138vc3gVfmuSbLciy3dn4rcg3VS9R1W9Jo', wifKeys: [], fromAccountIdx: null, fromWatchOnly: false } }

builded application from newest source files, added console.log to see response and found out that application calls https://blockchain.info/unspent url and gets response with code 500 and body No free outputs to spend checked balance and that {from} wallet have enough balance to be sent

justasem commented 4 years ago

@ReginaldasR Did you get any feedback? I am experiencing the same problem.