From a9b0b30fdb399da12cf8581319ac1c2279322b19 Mon Sep 17 00:00:00 2001
From: "Dmitriy A. Gerasimov" <dmitriy.gerasimov@demlabs.net>
Date: Wed, 16 Oct 2019 16:33:36 +0700
Subject: [PATCH] [*] Ledger balance store now at 128 bit [+] DATOSHI macro

---
 dap_chain_common.h | 2 ++
 dap_chain_ledger.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/dap_chain_common.h b/dap_chain_common.h
index 1fa8f2a..c9d0119 100755
--- a/dap_chain_common.h
+++ b/dap_chain_common.h
@@ -41,6 +41,8 @@
 #define DAP_CHAIN_TIMESTAMP_SIZE    8
 #define DAP_CHAIN_TICKER_SIZE_MAX   10
 
+#define DATOSHI_LD 1000000000.0L
+
 // Chain ID of the whole system
 typedef union dap_chain_id {
     uint8_t raw[DAP_CHAIN_ID_SIZE];
diff --git a/dap_chain_ledger.c b/dap_chain_ledger.c
index f420259..b33e5e0 100755
--- a/dap_chain_ledger.c
+++ b/dap_chain_ledger.c
@@ -115,7 +115,7 @@ typedef struct dap_ledger_wallet_balance {
     //dap_ledger_wallet_balance_key_t key;
     char *key;
     char token_ticker[10];
-    uint64_t balance;
+    uint128_t balance;
     UT_hash_handle hh;
 } dap_ledger_wallet_balance_t;
 
-- 
GitLab