Skip to content

Commit

Permalink
Merge pull request #20 from mosaicnetworks/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
danuio committed Sep 16, 2019
2 parents df48a45 + e0fb274 commit 08c03bf
Show file tree
Hide file tree
Showing 12 changed files with 138 additions and 62 deletions.
46 changes: 0 additions & 46 deletions CHANGELOG.md

This file was deleted.

9 changes: 0 additions & 9 deletions jest.config.js

This file was deleted.

19 changes: 19 additions & 0 deletions packages/client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v1.3.1

### Changed

- Client has better error handling (no breaking changes)
- Made `getInfo()` a generic return type (consensuses render different info)

---

## First Release v1.0.0

A simple HTTP client for EVM-Lite (Web & Node.js Compatible)
24 changes: 24 additions & 0 deletions packages/consensus/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v1.3.1

### Added

- Added Babble `/blocks/{index}?count{x}/` to Babble client
- Added `validators/{round}` endpoint to babble client
- Added `history/` endpoint to babble client

### Changed

- Deprecated Babble `/block/` endpoint

---

## First Release v1.0.0

Our consensus clients as well as an `IAbstractConsensus` class (Web & Node.js Compatible)
23 changes: 23 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v1.3.1

### Added

- Added Monet export

### Changed

- Made consensus optional on `Node`
- `.getAccount` now returns `balance` attribute as `Currency` class

---

## First Release v1.0.0

Core module to interact with an EVM-Lite node (Web & Node.js Compatible)
18 changes: 18 additions & 0 deletions packages/datadir/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v1.3.2

### Added

- Decryped alias to class `DataDirectory.decrypt`

---

## First Release v1.0.0

Data directory management for applications (Not Web Compatible)
2 changes: 1 addition & 1 deletion packages/datadir/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "evm-lite-datadir",
"namespace": "mosaicnetworks",
"version": "1.3.1",
"version": "1.3.2",
"license": "MIT",
"main": "./dist/index.js",
"typings": "./dist/typings/index.d.ts",
Expand Down
2 changes: 2 additions & 0 deletions packages/datadir/src/DataDirectory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import {
import Configuration, { IConfiguration } from './Configuration';

export default class DataDirectory<K extends AbstractKeystore> {
public static decrypt = AbstractKeystore.decrypt;

private readonly configuration: Configuration;

constructor(
Expand Down
20 changes: 20 additions & 0 deletions packages/keystore/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v1.3.1

### Changed

- Made keystore optional in constructor for `DataDirectory` class
- Decrypt and encrypt now use `crypto.scryptSync`
- Maxmem for `scrypt` increased from 33MB to 300MB

---

## First Release v1.0.0

Keystore management for applications (Not Web Compatible)
24 changes: 24 additions & 0 deletions packages/utils/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v1.3.2

### Changed

- `Currency.format` now returns the correct conversion with all decimal places

## v1.3.1

### Added

- Created Currency class and methods to convert from and to different denominations

---

## First Release v1.0.0

An aggregate of utility functions used by EVM-Lite JS modules (Web & Node.js Compatible)
2 changes: 1 addition & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "evm-lite-utils",
"namespace": "mosaicnetworks",
"author": "Danu Kumanan",
"version": "1.3.1",
"version": "1.3.2",
"license": "MIT",
"main": "./dist/index.js",
"typings": "./dist/typings/index.d.ts",
Expand Down
11 changes: 6 additions & 5 deletions packages/utils/src/Currency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,8 @@ class Currency extends BN {
let multIdx = toUnitIdx * 3;

const l = s.split(delimiters.decimal);

if (l.length > 2) {
throw Error('Too many decimal points detected');
if (l.length > 1) {
throw Error('Starting Atto token cannot be fractional');
}

let res: string;
Expand All @@ -142,10 +141,12 @@ class Currency extends BN {

res = rev.reverse().join('');
} else {
l[0] = l[0].slice(0, l[0].length - multIdx);
const pre = l[0].slice(0, l[0].length - multIdx);
const post = l[0].slice(l[0].length - multIdx + 1, l[0].length);

multIdx = 0;

res = l.join('');
res = pre + '.' + post;
}

return removeTrailingZeros(res) + to;
Expand Down

0 comments on commit 08c03bf

Please sign in to comment.