From 0527f219d15cbba0b236ab5eb7b3d377535a1045 Mon Sep 17 00:00:00 2001 From: redDwarf03 Date: Wed, 15 Nov 2023 14:13:29 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20error=20transaction=20sign?= =?UTF-8?q?ature=20when=20a=20value=20has=20the=208th=20decimal=20>=205?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 +++ lib/src/utils/utils.dart | 2 +- pubspec.yaml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 062cf3cb..79a891e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ Changelog ========= +#### Version 3.3.3 +* Fix error transaction signature when a value has the 8th decimal > 5 + #### Version 3.3.2 * Add Blockchain Version in newKeychainTransaction and newAccessKeychainTransaction methods diff --git a/lib/src/utils/utils.dart b/lib/src/utils/utils.dart index bc4ca64c..a00c9979 100644 --- a/lib/src/utils/utils.dart +++ b/lib/src/utils/utils.dart @@ -42,7 +42,7 @@ int toBigInt(num? number) { if (number == null) { return 0; } - return (number * 100000000).round(); + return (number * 100000000).floor(); } /// Convert big int of 10^8 decimals to any number diff --git a/pubspec.yaml b/pubspec.yaml index 7182d20b..2e7a4ba1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ name: archethic_lib_dart description: Archethic dart library for Flutter for Node and Browser. This library aims to provide a easy way to create Archethic transaction and to send them over the network homepage: https://github.com/archethic-foundation/libdart -version: 3.3.2 +version: 3.3.3 environment: sdk: ">=3.1.0 <4.0.0"