Skip to content

Error when adding cutom feeRate ---> in pwCore.send(address, amount, {feeRate: 1100}) #24

Description

@dxnght
  • I'm submitting a ...
  • bug report
  • feature request
  • Summary
    The problem is in pwCore.send() method when adding {feeRate: 1100} (for example)
    Related to Builder.calcFee() --->
    const fee = (feeRate / FEE_BASE) * txSize;
    return new models_1.Amount(fee.toString(), models_1.AmountUnit.shannon);

Returned error: SyntaxError: Cannot convert 742.5000000000001 to a BigInt

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

I think the problem is with fee.toString()
I'm using ${value} when creating a new Amount()
Need to be reproduced and re-checked

@sking789 @louzhixian

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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