Skip to content

Commit

Permalink
Merge pull request #35 from distributed-lab/fix/eq-to-decimals
Browse files Browse the repository at this point in the history
fix bn to decimals method when decimals value equals to this decimals
  • Loading branch information
napalmpapalam authored Jul 17, 2023
2 parents 5faf865 + c3b202d commit f35db08
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 6 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## [1.0.0-rc.1] - 2023-07-17
### Fixed
- `@distributedlab/tools` - `BN` `toDecimals` method when decimals value equals to this decimals value

## [1.0.0-rc.0] - 2023-07-12
### Added
- `@distributedlab/w3p` Test coverage
Expand Down Expand Up @@ -296,7 +300,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

[old repo]: https://github.com/distributed-lab/web-kit-old

[Unreleased]: https://github.com/distributed-lab/web-kit/compare/1.0.0-rc.0...HEAD
[Unreleased]: https://github.com/distributed-lab/web-kit/compare/1.0.0-rc.1...HEAD
[1.0.0-rc.1]: https://github.com/distributed-lab/web-kit/compare/1.0.0-rc.0...1.0.0-rc.1
[1.0.0-rc.0]: https://github.com/distributed-lab/web-kit/compare/0.2.0...1.0.0-rc.0
[0.2.0]: https://github.com/distributed-lab/web-kit/compare/0.2.0-rc.25...0.2.0
[0.2.0-rc.25]: https://github.com/distributed-lab/web-kit/compare/0.2.0-rc.24...0.2.0-rc.25
Expand Down
2 changes: 1 addition & 1 deletion packages/fetcher/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@distributedlab/fetcher",
"version": "1.0.0-rc.0",
"version": "1.0.0-rc.1",
"description": "Fetch API wrapper with the extended functionality and simple interface",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/jac/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@distributedlab/jac",
"version": "1.0.0-rc.0",
"version": "1.0.0-rc.1",
"description": "A library for constructing JSON-API compliant requests and responses",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/reactivity/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@distributedlab/reactivity",
"version": "1.0.0-rc.0",
"version": "1.0.0-rc.1",
"description": "Implementation of the reactivity connections to propagate changes between objects",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/tools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@distributedlab/tools",
"version": "1.0.0-rc.0",
"version": "1.0.0-rc.1",
"description": "Collection of common utility functions and classes",
"repository": {
"type": "git",
Expand Down
2 changes: 2 additions & 0 deletions packages/tools/src/bn/bn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,8 @@ export class BN {
* @returns A new {@link BN} with the provided decimals.
*/
public toDecimals(decimals: number): BN {
if (decimals === this.#cfg.decimals) return this

return decimals > this.#cfg.decimals
? this.toGreaterDecimals(decimals)
: this.toLessDecimals(decimals)
Expand Down
2 changes: 1 addition & 1 deletion packages/w3p/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@distributedlab/w3p",
"version": "1.0.0-rc.0",
"version": "1.0.0-rc.1",
"description": "Wrapper for Web3 Providers",
"repository": {
"type": "git",
Expand Down

0 comments on commit f35db08

Please sign in to comment.