Skip to content

Pay with forceFee doesn't work #84

Description

@jmn8718

Im trying to perfom a pay action forcing the fee to the value i want, i follow the examples of the repo but i can not make it work, this is my code

const payment = {};
payment[destinationAddress] = btcToSatoshi(amount);
const options = {
	forceFee: btcToSatoshi(fee),
	checkFee: false,
}
_wallet.pay(payment, null, false, true, blocktrail.Wallet.FEE_STRATEGY_FORCE_FEE, null, options)

but i get the following error

{ Error: An internal error was encountered
at Function.Request.handleFailure (/app/node_modules/blocktrail-sdk/lib/request.js:210:17)
at /app/node_modules/blocktrail-sdk/lib/request.js:184:29
at Request.callback (/app/node_modules/superagent/lib/node/index.js:746:30)
at Request.<anonymous> (/app/node_modules/superagent/lib/node/index.js:135:10)
at emitOne (events.js:115:13)
at Request.emit (events.js:210:7)
at IncomingMessage.<anonymous> (/app/node_modules/superagent/lib/node/index.js:938:12)
at emitNone (events.js:110:20)
at IncomingMessage.emit (events.js:207:7)
at endReadableNT (_stream_readable.js:1059:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickDomainCallback (internal/process/next_tick.js:218:9)
at process._tickDomainCallback (internal/process/next_tick.js:218:9) code: 500, statusCode: 500 }

any help?

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