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

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

Open
2 tasks done
dxnght opened this issue Dec 23, 2021 · 0 comments
Open
2 tasks done

Comments

@dxnght
Copy link

dxnght commented Dec 23, 2021

  • 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

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

1 participant