kee

Offline IOU signer with QR as transport
git clone https://holbrook.no/src/kee
Info | Log | Files | Refs | README | LICENSE

commit 0cfbd3964e6333111eb1bf74d1bf6d468102c42f
parent 7fced55d1634c15843877f28a208db09857435f0
Author: lash <dev@holbrook.no>
Date:   Fri, 17 May 2024 07:37:08 +0100

Add db commit on sign response

Diffstat:
Msrc/db.c | 8++++----
Msrc/gtk/kee-entry.c | 6++++++
2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/db.c b/src/db.c @@ -66,10 +66,10 @@ int db_add(struct db_ctx *ctx, char *key, size_t key_len, char *data, size_t dat return ERR_FAIL; } - sprintf(s, "wrote key "); - c = 1000; - bin_to_hex(key, key_len, s+10, &c); - debug_log(DEBUG_DEBUG, s); + //sprintf(s, "wrote key "); + //c = 1000; + //bin_to_hex((unsigned char*)key, key_len, (unsigned char*)(s+10), &c); + //debug_log(DEBUG_DEBUG, s); return ERR_OK; } diff --git a/src/gtk/kee-entry.c b/src/gtk/kee-entry.c @@ -108,6 +108,12 @@ static void kee_entry_handle_confirm(GtkButton *butt, KeeEntry *o) { return; } + r = kee_ledger_put(&o->ledger, o->db); + if (r) { + g_log(G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, "fail entry db commit"); + return; + } + r = kee_ledger_serialize_open(&o->ledger, out, &out_len); if (r) { g_log(G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, "qr transport renderer failed");