Skip to content

[Bug]: Error: [Dinero.js] Amount is invalid. #734

@joelmsanto

Description

@joelmsanto

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

The following implementation is triggering an error. Is it possible to multiply by a decimal number?

const distanceRateInCents = 56;
const distanceInMiles = 2.0659309759999998;

multiply(dinero({amount: distanceRateInCents, currency: USD}), distanceInMiles)

Expected behavior

it should not throw an error

Steps to reproduce

node environment

Version

2.0.0-alpha

Environment

node js

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions