From 073b85ad010044fa62ed7a21bd52febef522c35a Mon Sep 17 00:00:00 2001 From: cyan Date: Fri, 3 Jan 2025 15:46:03 +0100 Subject: [PATCH] wrap 14WordSeedHeight (#97) * wrap 14WordSeedHeight * update checksums --- impls/monero.dart/lib/src/checksum_wownero.dart | 2 +- impls/monero.ts/checksum_wownero.ts | 2 +- wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp | 8 ++++++-- wownero_libwallet2_api_c/src/main/cpp/wownero_checksum.h | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/impls/monero.dart/lib/src/checksum_wownero.dart b/impls/monero.dart/lib/src/checksum_wownero.dart index 7d501c61..dee3b0ee 100644 --- a/impls/monero.dart/lib/src/checksum_wownero.dart +++ b/impls/monero.dart/lib/src/checksum_wownero.dart @@ -1,4 +1,4 @@ // ignore_for_file: constant_identifier_names const String wallet2_api_c_h_sha256 = "8a8d386dd5d996c89a0586c55b295ef95ca584bf1ffa26255152b291910a0a77"; -const String wallet2_api_c_cpp_sha256 = "07d67f34a07869aaa4af6ca04e142dbad2fb1fba0e2ebdefd22bc333fd982e25-e25963cbc11ca0a0fe5eb34b9bd7c72e4f51b795"; +const String wallet2_api_c_cpp_sha256 = "64a0ea40b62cce04987c7efb8a6e6deceac8d91d4bc564a1356711c000155ffd-e25963cbc11ca0a0fe5eb34b9bd7c72e4f51b795"; const String wallet2_api_c_exp_sha256 = "3673e40e1a7115552276d1d541f6e4d5a0fef47c40fff7b988f49923af84c8a4"; diff --git a/impls/monero.ts/checksum_wownero.ts b/impls/monero.ts/checksum_wownero.ts index 8b2899c6..b7df828b 100644 --- a/impls/monero.ts/checksum_wownero.ts +++ b/impls/monero.ts/checksum_wownero.ts @@ -1,5 +1,5 @@ export const wowneroChecksum = { wallet2_api_c_h_sha256: "8a8d386dd5d996c89a0586c55b295ef95ca584bf1ffa26255152b291910a0a77", - wallet2_api_c_cpp_sha256: "07d67f34a07869aaa4af6ca04e142dbad2fb1fba0e2ebdefd22bc333fd982e25-e25963cbc11ca0a0fe5eb34b9bd7c72e4f51b795", + wallet2_api_c_cpp_sha256: "64a0ea40b62cce04987c7efb8a6e6deceac8d91d4bc564a1356711c000155ffd-e25963cbc11ca0a0fe5eb34b9bd7c72e4f51b795", wallet2_api_c_exp_sha256: "3673e40e1a7115552276d1d541f6e4d5a0fef47c40fff7b988f49923af84c8a4", } diff --git a/wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp b/wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp index 19a14ba5..af062b63 100644 --- a/wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp +++ b/wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp @@ -1923,8 +1923,12 @@ void* WOWNERO_deprecated_restore14WordSeed(char *path, char *password, char *see } uint64_t WOWNERO_deprecated_14WordSeedHeight(char *seed) { - wownero_seed wow_seed(seed, "wownero"); - return wow_seed.blockheight(); + try { + wownero_seed wow_seed(seed, "wownero"); + return wow_seed.blockheight(); + } catch (...) { + return 2; + } } void* WOWNERO_deprecated_create14WordSeed(char *path, char *password, char *language, int32_t networkType) { diff --git a/wownero_libwallet2_api_c/src/main/cpp/wownero_checksum.h b/wownero_libwallet2_api_c/src/main/cpp/wownero_checksum.h index 40723cc8..376f377f 100644 --- a/wownero_libwallet2_api_c/src/main/cpp/wownero_checksum.h +++ b/wownero_libwallet2_api_c/src/main/cpp/wownero_checksum.h @@ -1,6 +1,6 @@ #ifndef MONEROC_CHECKSUMS #define MONEROC_CHECKSUMS const char * WOWNERO_wallet2_api_c_h_sha256 = "8a8d386dd5d996c89a0586c55b295ef95ca584bf1ffa26255152b291910a0a77"; -const char * WOWNERO_wallet2_api_c_cpp_sha256 = "07d67f34a07869aaa4af6ca04e142dbad2fb1fba0e2ebdefd22bc333fd982e25-e25963cbc11ca0a0fe5eb34b9bd7c72e4f51b795"; +const char * WOWNERO_wallet2_api_c_cpp_sha256 = "64a0ea40b62cce04987c7efb8a6e6deceac8d91d4bc564a1356711c000155ffd-e25963cbc11ca0a0fe5eb34b9bd7c72e4f51b795"; const char * WOWNERO_wallet2_api_c_exp_sha256 = "3673e40e1a7115552276d1d541f6e4d5a0fef47c40fff7b988f49923af84c8a4"; #endif