From 0e6ba244176b9430b81ef2755b541315dde9bee6 Mon Sep 17 00:00:00 2001 From: who-biz <37732338+who-biz@users.noreply.github.com> Date: Fri, 17 Jul 2026 17:49:57 +0100 Subject: [PATCH 01/19] Use biz repo for flutter_libepiccash --- .gitmodules | 7 ++++--- crypto_plugins/flutter_libepiccash | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitmodules b/.gitmodules index d0c1810aa1..bc5d65314d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,10 @@ -[submodule "crypto_plugins/flutter_libepiccash"] - path = crypto_plugins/flutter_libepiccash - url = https://github.com/cypherstack/flutter_libepiccash.git [submodule "crypto_plugins/frostdart"] path = crypto_plugins/frostdart url = https://github.com/cypherstack/frostdart [submodule "crypto_plugins/flutter_libmwc"] path = crypto_plugins/flutter_libmwc url = https://github.com/cypherstack/flutter_libmwc +[submodule "crypto_plugins/flutter_libepiccash"] + path = crypto_plugins/flutter_libepiccash + url = https://github.com/who-biz/flutter_libepiccash.git + branch = ebox-cancel-tx diff --git a/crypto_plugins/flutter_libepiccash b/crypto_plugins/flutter_libepiccash index f4a55aa9e5..7ad387d96a 160000 --- a/crypto_plugins/flutter_libepiccash +++ b/crypto_plugins/flutter_libepiccash @@ -1 +1 @@ -Subproject commit f4a55aa9e5b6066428402291ed228aa0dd921534 +Subproject commit 7ad387d96ad2834919e3597249fb7a487739f183 From b2540681145641a43a366f3722766c88e9b16919 Mon Sep 17 00:00:00 2001 From: who-biz <37732338+who-biz@users.noreply.github.com> Date: Fri, 17 Jul 2026 18:14:50 +0100 Subject: [PATCH 02/19] Update flutter_libepiccash for new api commit --- crypto_plugins/flutter_libepiccash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto_plugins/flutter_libepiccash b/crypto_plugins/flutter_libepiccash index 7ad387d96a..d0030961b9 160000 --- a/crypto_plugins/flutter_libepiccash +++ b/crypto_plugins/flutter_libepiccash @@ -1 +1 @@ -Subproject commit 7ad387d96ad2834919e3597249fb7a487739f183 +Subproject commit d0030961b92cf3bb82f5fa9a41ffda1d2d0b706b From 62874c4b942cad1c646dde1d719007dc9e93350a Mon Sep 17 00:00:00 2001 From: who-biz <37732338+who-biz@users.noreply.github.com> Date: Fri, 17 Jul 2026 18:27:33 +0100 Subject: [PATCH 03/19] update flutter_libepiccash submod --- crypto_plugins/flutter_libepiccash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto_plugins/flutter_libepiccash b/crypto_plugins/flutter_libepiccash index d0030961b9..751ea27168 160000 --- a/crypto_plugins/flutter_libepiccash +++ b/crypto_plugins/flutter_libepiccash @@ -1 +1 @@ -Subproject commit d0030961b92cf3bb82f5fa9a41ffda1d2d0b706b +Subproject commit 751ea2716880561f62cd361894bedca540fefdc8 From da43da7ffadfb156c1602241a0a7061b9ef3540a Mon Sep 17 00:00:00 2001 From: who-biz <37732338+who-biz@users.noreply.github.com> Date: Tue, 21 Jul 2026 00:38:21 +0100 Subject: [PATCH 04/19] Update calling function signature in epiccash_wallet.dart --- lib/wallets/wallet/impl/epiccash_wallet.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/wallets/wallet/impl/epiccash_wallet.dart b/lib/wallets/wallet/impl/epiccash_wallet.dart index 3746a4836e..e15837f209 100644 --- a/lib/wallets/wallet/impl/epiccash_wallet.dart +++ b/lib/wallets/wallet/impl/epiccash_wallet.dart @@ -138,9 +138,12 @@ class EpiccashWallet extends Bip39Wallet { throw Exception('Wallet not initialized'); } - final result = await libEpic.cancelTransaction( + final epicboxConfig = await getEpicBoxConfig(); + final result = await libEpic.cancelEpicboxTransaction( wallet: _wallet!, - transactionId: txSlateId, + methodIsEpicbox: true, + epicboxConfig: epicboxConfig.toString(), + txSlateId: txSlateId, ); Logging.instance.d("cancel $txSlateId result: $result"); return result; From b23e9c4bd7174aa65e770c3cd9bd658c2391b4ec Mon Sep 17 00:00:00 2001 From: who-biz <37732338+who-biz@users.noreply.github.com> Date: Tue, 21 Jul 2026 00:40:34 +0100 Subject: [PATCH 05/19] update flutter_libepiccash --- crypto_plugins/flutter_libepiccash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto_plugins/flutter_libepiccash b/crypto_plugins/flutter_libepiccash index 751ea27168..85dd385481 160000 --- a/crypto_plugins/flutter_libepiccash +++ b/crypto_plugins/flutter_libepiccash @@ -1 +1 @@ -Subproject commit 751ea2716880561f62cd361894bedca540fefdc8 +Subproject commit 85dd385481feaa8dee46ae26fac3566280ba79a0 From d2f4b76c81f3ccb8e7a18349c866bd57b805cc13 Mon Sep 17 00:00:00 2001 From: who-biz <37732338+who-biz@users.noreply.github.com> Date: Tue, 21 Jul 2026 00:44:40 +0100 Subject: [PATCH 06/19] update supporting wl_gen interface --- lib/wl_gen/interfaces/libepiccash_interface.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/wl_gen/interfaces/libepiccash_interface.dart b/lib/wl_gen/interfaces/libepiccash_interface.dart index cdbbb19cee..3606d57c12 100644 --- a/lib/wl_gen/interfaces/libepiccash_interface.dart +++ b/lib/wl_gen/interfaces/libepiccash_interface.dart @@ -63,9 +63,13 @@ abstract class LibEpicCashInterface { required String slateJson, }); - Future cancelTransaction({ + Future cancelEpicboxTransaction({ required DynamicObject wallet, - required String transactionId, + required bool methodIsEpicbox, + String? epicboxConfig, + int? txId, + String? txSlateId, + String? epicboxMsgId, }); Future> getTransactions({ From 120497bee023848a97b91d290e160186ac466814 Mon Sep 17 00:00:00 2001 From: who-biz <37732338+who-biz@users.noreply.github.com> Date: Tue, 21 Jul 2026 01:24:17 +0100 Subject: [PATCH 07/19] Update CancelEpicboxTransaction funcs --- crypto_plugins/flutter_libepiccash | 2 +- ...C_libepiccash_interface_impl.template.dart | 23 +++++++++++++++---- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/crypto_plugins/flutter_libepiccash b/crypto_plugins/flutter_libepiccash index 85dd385481..471c649bc6 160000 --- a/crypto_plugins/flutter_libepiccash +++ b/crypto_plugins/flutter_libepiccash @@ -1 +1 @@ -Subproject commit 85dd385481feaa8dee46ae26fac3566280ba79a0 +Subproject commit 471c649bc614be8e0acb592d2a93136ee76fe8a8 diff --git a/tool/wl_templates/EPIC_libepiccash_interface_impl.template.dart b/tool/wl_templates/EPIC_libepiccash_interface_impl.template.dart index 4e78631bdc..86f4570dbb 100644 --- a/tool/wl_templates/EPIC_libepiccash_interface_impl.template.dart +++ b/tool/wl_templates/EPIC_libepiccash_interface_impl.template.dart @@ -21,12 +21,25 @@ final class _LibEpicCashInterfaceImpl extends LibEpicCashInterface { const _LibEpicCashInterfaceImpl(); @override - Future cancelTransaction({ + Future cancelEpicboxTransaction({ required DynamicObject wallet, - required String transactionId, - }) { - return wallet.get().cancelTransaction( - transactionId: transactionId, + required bool methodIsEpicbox, + String? epicboxConfig, + int? txId, + String? txSlateId, + String? epicboxMsgId, + }) async { + final epicWallet = wallet.get(); + + if (epicboxConfig != null) { + epicWallet.updateEpicboxConfig(epicboxConfig); + } + + return epicWallet.cancelEpicboxTransaction( + methodIsEpicbox: methodIsEpicbox, + txId: txId, + txSlateId: txSlateId, + epicboxMsgId: epicboxMsgId, ); } From a8a7776ef74aada1db403ca9012dac16b2a22cb9 Mon Sep 17 00:00:00 2001 From: who-biz <37732338+who-biz@users.noreply.github.com> Date: Tue, 21 Jul 2026 07:39:16 +0100 Subject: [PATCH 08/19] Update flutter_libepiccash module --- crypto_plugins/flutter_libepiccash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto_plugins/flutter_libepiccash b/crypto_plugins/flutter_libepiccash index 471c649bc6..1365965c51 160000 --- a/crypto_plugins/flutter_libepiccash +++ b/crypto_plugins/flutter_libepiccash @@ -1 +1 @@ -Subproject commit 471c649bc614be8e0acb592d2a93136ee76fe8a8 +Subproject commit 1365965c5109d9bbd9d705867709d1fc7ecb547d From fae8ad4c46b65a8bd49a32884779bd5bdde3200c Mon Sep 17 00:00:00 2001 From: who-biz <37732338+who-biz@users.noreply.github.com> Date: Tue, 21 Jul 2026 15:30:51 +0100 Subject: [PATCH 09/19] Fix uri parsing for epic --- lib/utilities/address_utils.dart | 180 ++++++++++++++++++------------- 1 file changed, 104 insertions(+), 76 deletions(-) diff --git a/lib/utilities/address_utils.dart b/lib/utilities/address_utils.dart index cb1f5f8ad6..21b1f40c41 100644 --- a/lib/utilities/address_utils.dart +++ b/lib/utilities/address_utils.dart @@ -41,51 +41,60 @@ class AddressUtils { } /// Parses a URI string and returns a map with parsed components. - static Map _parseUri(String uri) { - final Map result = {}; - try { - final u = Uri.parse(uri); - if (u.hasScheme) { - result["scheme"] = u.scheme.toLowerCase(); - - // Handle different URI formats. - if (result["scheme"] == "bitcoin" || - result["scheme"] == "bitcoincash") { - result["address"] = u.path; - } else if (result["scheme"] == "monero") { - // Monero addresses can contain '?' which Uri.parse interprets as query start. - final addressEnd = uri.indexOf( - '?', - 7, - ); // 7 is the length of "monero:". - if (addressEnd != -1) { - result["address"] = uri.substring(7, addressEnd); - } else { - result["address"] = uri.substring(7); - } - } else { - // Default case, treat path as address. - result["address"] = u.path; - } +static Map _parseUri(String uri) { + final Map result = {}; + + try { + final Uri parsedUri = Uri.parse(uri); + + if (parsedUri.hasScheme) { + final String scheme = parsedUri.scheme.toLowerCase(); + result["scheme"] = scheme; + + if (scheme == "bitcoin" || scheme == "bitcoincash") { + result["address"] = parsedUri.path; + } else if (scheme == "monero") { + // Monero addresses can contain '?' which Uri.parse interprets + // as the start of the query. + final int addressEnd = uri.indexOf( + "?", + 7, // Length of "monero:". + ); + + result["address"] = addressEnd != -1 + ? uri.substring(7, addressEnd) + : uri.substring(7); + } else { + result["address"] = parsedUri.path; + } + } else { + // Plain address, including an Epicbox address containing '@'. + result["address"] = parsedUri.path; + } - // Parse query parameters. - result.addAll(_parseQueryParameters(u.queryParameters)); + result.addAll( + _parseQueryParameters(parsedUri.queryParameters), + ); - // Handle Monero-specific fragment (tx_description). - if (u.fragment.isNotEmpty && result["scheme"] == "monero") { - result["tx_description"] = Uri.decodeComponent(u.fragment); - } - } - } catch (e, s) { - Logging.instance.d( - "Exception caught in parseUri($uri): $e", - error: e, - stackTrace: s, + if ( + parsedUri.fragment.isNotEmpty && + result["scheme"] == "monero" + ) { + result["tx_description"] = Uri.decodeComponent( + parsedUri.fragment, ); } - return result; + } catch (e, s) { + Logging.instance.d( + "Exception caught in _parseUri($uri): $e", + error: e, + stackTrace: s, + ); } + return result; +} + /// Helper method to parse and normalize query parameters. static Map _parseQueryParameters(Map params) { final Map result = {}; @@ -134,47 +143,66 @@ class AddressUtils { /// Centralized method to handle various cryptocurrency URIs and return a common object. /// /// Returns null on failure to parse - static PaymentUriData? parsePaymentUri(String uri, {Logging? logging}) { - // hacky check its not just a bcash, ecash, or xel address - final parts = uri.split(":"); - if (parts.length == 2) { - if ([ - "xel", - "bitcoincash", - "bchtest", - "ecash", - "ectest", - ].contains(parts.first.toLowerCase())) { - return null; - } - } - - try { - final Map parsedData = _parseUri(uri); - - // Normalize the URI scheme. - final String scheme = parsedData['scheme'] ?? ''; - parsedData.remove('scheme'); - - // Filter out unrecognized parameters. - final filteredParams = _filterParams(parsedData); - - return PaymentUriData( - scheme: scheme, - address: parsedData['address']!.trim(), - amount: filteredParams['amount'] ?? filteredParams['tx_amount'], - label: filteredParams['label'] ?? filteredParams['recipient_name'], - message: filteredParams['message'] ?? filteredParams['tx_description'], - paymentId: filteredParams['tx_payment_id'], - // Specific to Monero - additionalParams: filteredParams, - ); - } catch (e, s) { - logging?.i("Invalid payment URI: $uri", error: e, stackTrace: s); +static PaymentUriData? parsePaymentUri( + String uri, { + Logging? logging, +}) { + // Hacky check that it is not just a bcash, ecash, or xel address. + final parts = uri.split(":"); + + if (parts.length == 2) { + if ([ + "xel", + "bitcoincash", + "bchtest", + "ecash", + "ectest", + ].contains(parts.first.toLowerCase())) { return null; } } + try { +final Map parsedData = _parseUri(uri); + +final String scheme = parsedData["scheme"] ?? ""; +parsedData.remove("scheme"); + +final String? address = parsedData["address"]; + +if (address == null || address.trim().isEmpty) { + return null; +} + +final Map filteredParams = + _filterParams(parsedData); + +return PaymentUriData( + scheme: scheme, + address: address.trim(), + amount: + filteredParams["amount"] ?? + filteredParams["tx_amount"], + label: + filteredParams["label"] ?? + filteredParams["recipient_name"], + message: + filteredParams["message"] ?? + filteredParams["tx_description"], + paymentId: filteredParams["tx_payment_id"], + additionalParams: filteredParams, +); + } catch (e, s) { + logging?.i( + "Invalid payment URI: $uri", + error: e, + stackTrace: s, + ); + + return null; + } +} + /// Builds a uri string with the given address and query parameters (if any) static String buildUriString( String scheme, From 0fdb218d0ef95f5b43ea1ebbb73614891b2a5c21 Mon Sep 17 00:00:00 2001 From: who-biz <37732338+who-biz@users.noreply.github.com> Date: Tue, 21 Jul 2026 15:31:59 +0100 Subject: [PATCH 10/19] Update flutter_libepiccash commit --- crypto_plugins/flutter_libepiccash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto_plugins/flutter_libepiccash b/crypto_plugins/flutter_libepiccash index 1365965c51..e0aad40ddf 160000 --- a/crypto_plugins/flutter_libepiccash +++ b/crypto_plugins/flutter_libepiccash @@ -1 +1 @@ -Subproject commit 1365965c5109d9bbd9d705867709d1fc7ecb547d +Subproject commit e0aad40ddf5e771d8a366684d5b1e6e1fbe39224 From 583cd192af08dce19e9c3fdf4a1eb6989138a925 Mon Sep 17 00:00:00 2001 From: who-biz <37732338+who-biz@users.noreply.github.com> Date: Wed, 5 Aug 2026 18:36:01 -0400 Subject: [PATCH 11/19] Updatee flutter_libepiccash submodule --- crypto_plugins/flutter_libepiccash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto_plugins/flutter_libepiccash b/crypto_plugins/flutter_libepiccash index e0aad40ddf..c4b2647298 160000 --- a/crypto_plugins/flutter_libepiccash +++ b/crypto_plugins/flutter_libepiccash @@ -1 +1 @@ -Subproject commit e0aad40ddf5e771d8a366684d5b1e6e1fbe39224 +Subproject commit c4b26472989a1e99d8e35c44c2039727033fd3a7 From eacd7e2090d46971efd0a7d2eea035c9f899b7f0 Mon Sep 17 00:00:00 2001 From: who-biz <37732338+who-biz@users.noreply.github.com> Date: Thu, 6 Aug 2026 20:11:14 -0400 Subject: [PATCH 12/19] Pull in latest commits for flutter_libepiccash --- crypto_plugins/flutter_libepiccash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto_plugins/flutter_libepiccash b/crypto_plugins/flutter_libepiccash index c4b2647298..d97c1ad441 160000 --- a/crypto_plugins/flutter_libepiccash +++ b/crypto_plugins/flutter_libepiccash @@ -1 +1 @@ -Subproject commit c4b26472989a1e99d8e35c44c2039727033fd3a7 +Subproject commit d97c1ad44143a45b4882a42c467b3b9433e31063 From b5ab399576362484a1e870b3ad080b998bf8071d Mon Sep 17 00:00:00 2001 From: who-biz <37732338+who-biz@users.noreply.github.com> Date: Mon, 10 Aug 2026 17:47:49 -0400 Subject: [PATCH 13/19] Update flutter_libepiccash with new FFI mechanics --- crypto_plugins/flutter_libepiccash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto_plugins/flutter_libepiccash b/crypto_plugins/flutter_libepiccash index d97c1ad441..7f037659c7 160000 --- a/crypto_plugins/flutter_libepiccash +++ b/crypto_plugins/flutter_libepiccash @@ -1 +1 @@ -Subproject commit d97c1ad44143a45b4882a42c467b3b9433e31063 +Subproject commit 7f037659c7f5dd63252235c31bdf3d27e0dd3f81 From 37d8f28c01b8bd6c6c87692be8c06cb8fc5ec544 Mon Sep 17 00:00:00 2001 From: who-biz <37732338+who-biz@users.noreply.github.com> Date: Mon, 10 Aug 2026 18:28:50 -0400 Subject: [PATCH 14/19] Cleanup for address_utils file --- lib/utilities/address_utils.dart | 171 ++++++++++++++----------------- 1 file changed, 75 insertions(+), 96 deletions(-) diff --git a/lib/utilities/address_utils.dart b/lib/utilities/address_utils.dart index 21b1f40c41..04c53205af 100644 --- a/lib/utilities/address_utils.dart +++ b/lib/utilities/address_utils.dart @@ -41,59 +41,51 @@ class AddressUtils { } /// Parses a URI string and returns a map with parsed components. -static Map _parseUri(String uri) { - final Map result = {}; - - try { - final Uri parsedUri = Uri.parse(uri); - - if (parsedUri.hasScheme) { - final String scheme = parsedUri.scheme.toLowerCase(); - result["scheme"] = scheme; - - if (scheme == "bitcoin" || scheme == "bitcoincash") { - result["address"] = parsedUri.path; - } else if (scheme == "monero") { - // Monero addresses can contain '?' which Uri.parse interprets - // as the start of the query. - final int addressEnd = uri.indexOf( - "?", - 7, // Length of "monero:". - ); - - result["address"] = addressEnd != -1 - ? uri.substring(7, addressEnd) - : uri.substring(7); + static Map _parseUri(String uri) { + final Map result = {}; + try { + final Uri parsedUri = Uri.parse(uri); + + if (parsedUri.hasScheme) { + final String scheme = parsedUri.scheme.toLowerCase(); + result["scheme"] = scheme; + + // Handle different URI formats. + if (result["scheme"] == "bitcoin" || + result["scheme"] == "bitcoincash") { + result["address"] = parsedUri.path; + } else if (result["scheme"] == "monero") { + // Monero addresses can contain '?' which Uri.parse interprets as query start. + final int addressEnd = uri.indexOf( + "?", + 7, // 7 is the length of "monero:". + ); + } else { + // Default case, treat path as address. + result["address"] = parsedUri.path; + } } else { + // Plain address, including an Epicbox/Grinbox address containing '@'. result["address"] = parsedUri.path; } - } else { - // Plain address, including an Epicbox address containing '@'. - result["address"] = parsedUri.path; - } - result.addAll( - _parseQueryParameters(parsedUri.queryParameters), - ); + // Parse query parameters. + result.addAll(_parseQueryParameters(parsedUri.queryParameters)); - if ( - parsedUri.fragment.isNotEmpty && - result["scheme"] == "monero" - ) { - result["tx_description"] = Uri.decodeComponent( - parsedUri.fragment, + // Handle Monero-specific fragment (tx_description). + if (parsedUri.fragment.isNotEmpty && result["scheme"] == "monero") { + result["tx_description"] = Uri.decodeComponent(parsedUri.fragment); + } + } catch (e, s) { + Logging.instance.d( + "Exception caught in _parseUri($uri): $e", + error: e, + stackTrace: s, ); } - } catch (e, s) { - Logging.instance.d( - "Exception caught in _parseUri($uri): $e", - error: e, - stackTrace: s, - ); - } - return result; -} + return result; + } /// Helper method to parse and normalize query parameters. static Map _parseQueryParameters(Map params) { @@ -143,65 +135,52 @@ static Map _parseUri(String uri) { /// Centralized method to handle various cryptocurrency URIs and return a common object. /// /// Returns null on failure to parse -static PaymentUriData? parsePaymentUri( - String uri, { - Logging? logging, -}) { - // Hacky check that it is not just a bcash, ecash, or xel address. - final parts = uri.split(":"); - - if (parts.length == 2) { - if ([ - "xel", - "bitcoincash", - "bchtest", - "ecash", - "ectest", - ].contains(parts.first.toLowerCase())) { - return null; + static PaymentUriData? parsePaymentUri(String uri, {Logging? logging}) { + // hacky check its not just a bcash, ecash, or xel address + final parts = uri.split(":"); + + if (parts.length == 2) { + if ([ + "xel", + "bitcoincash", + "bchtest", + "ecash", + "ectest", + ].contains(parts.first.toLowerCase())) { + return null; + } } - } - try { -final Map parsedData = _parseUri(uri); + try { + final Map parsedData = _parseUri(uri); -final String scheme = parsedData["scheme"] ?? ""; -parsedData.remove("scheme"); + // Normalize the URI scheme. + final String scheme = parsedData["scheme"] ?? ""; + parsedData.remove("scheme"); -final String? address = parsedData["address"]; + // Filter out unrecognized parameters. + final String? address = parsedData["address"]; -if (address == null || address.trim().isEmpty) { - return null; -} + if (address == null || address.trim().isEmpty) { + return null; + } -final Map filteredParams = - _filterParams(parsedData); - -return PaymentUriData( - scheme: scheme, - address: address.trim(), - amount: - filteredParams["amount"] ?? - filteredParams["tx_amount"], - label: - filteredParams["label"] ?? - filteredParams["recipient_name"], - message: - filteredParams["message"] ?? - filteredParams["tx_description"], - paymentId: filteredParams["tx_payment_id"], - additionalParams: filteredParams, -); - } catch (e, s) { - logging?.i( - "Invalid payment URI: $uri", - error: e, - stackTrace: s, - ); + final Map filteredParams = _filterParams(parsedData); - return null; + return PaymentUriData( + scheme: scheme, + address: address.trim(), + amount: filteredParams["amount"] ?? filteredParams["tx_amount"], + label: filteredParams["label"] ?? filteredParams["recipient_name"], + message: filteredParams["message"] ?? filteredParams["tx_description"], + paymentId: filteredParams["tx_payment_id"], + additionalParams: filteredParams, + ); + } catch (e, s) { + logging?.i("Invalid payment URI: $uri", error: e, stackTrace: s); + return null; + } } -} /// Builds a uri string with the given address and query parameters (if any) static String buildUriString( From caa9e55f7a72a79ef6e1ca6ff412b8f9269e5e16 Mon Sep 17 00:00:00 2001 From: who-biz <37732338+who-biz@users.noreply.github.com> Date: Wed, 12 Aug 2026 14:46:27 -0400 Subject: [PATCH 15/19] epicboxMsgId -> txEpicboxId --- crypto_plugins/flutter_libepiccash | 2 +- lib/wallets/wallet/impl/epiccash_wallet.dart | 11 +++++++++++ .../EPIC_libepiccash_interface_impl.template.dart | 4 ++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/crypto_plugins/flutter_libepiccash b/crypto_plugins/flutter_libepiccash index 7f037659c7..e3e39431df 160000 --- a/crypto_plugins/flutter_libepiccash +++ b/crypto_plugins/flutter_libepiccash @@ -1 +1 @@ -Subproject commit 7f037659c7f5dd63252235c31bdf3d27e0dd3f81 +Subproject commit e3e39431dff4baad8eaf799c9ffd0d9ae67e658c diff --git a/lib/wallets/wallet/impl/epiccash_wallet.dart b/lib/wallets/wallet/impl/epiccash_wallet.dart index e15837f209..e70be6f6a0 100644 --- a/lib/wallets/wallet/impl/epiccash_wallet.dart +++ b/lib/wallets/wallet/impl/epiccash_wallet.dart @@ -1389,6 +1389,17 @@ class EpiccashWallet extends Bip39Wallet { final slatesToCommits = info.epicData?.slatesToCommits ?? {}; for (final tx in transactions) { + + Logging.instance.w( + "EPIC TX " + "id=${tx.id} " + "slate=${tx.txSlateId} " + "epicbox_tx_id=${tx.txEpicboxId} " + "type=${tx.txType} " + "sentCancelled=${libEpic.txTypeIsSentCancelled(tx.txType)} " + "receiveCancelled=${libEpic.txTypeIsReceiveCancelled(tx.txType)}", + ); + final isIncoming = libEpic.txTypeIsReceived(tx.txType) || libEpic.txTypeIsReceiveCancelled(tx.txType); diff --git a/tool/wl_templates/EPIC_libepiccash_interface_impl.template.dart b/tool/wl_templates/EPIC_libepiccash_interface_impl.template.dart index 86f4570dbb..2e412acdfb 100644 --- a/tool/wl_templates/EPIC_libepiccash_interface_impl.template.dart +++ b/tool/wl_templates/EPIC_libepiccash_interface_impl.template.dart @@ -27,7 +27,7 @@ final class _LibEpicCashInterfaceImpl extends LibEpicCashInterface { String? epicboxConfig, int? txId, String? txSlateId, - String? epicboxMsgId, + String? txEpicboxId, }) async { final epicWallet = wallet.get(); @@ -39,7 +39,7 @@ final class _LibEpicCashInterfaceImpl extends LibEpicCashInterface { methodIsEpicbox: methodIsEpicbox, txId: txId, txSlateId: txSlateId, - epicboxMsgId: epicboxMsgId, + txEpicboxId: txEpicboxId, ); } From 96b3ec352c9802b6afa570f6290cc9353c22c6b8 Mon Sep 17 00:00:00 2001 From: who-biz <37732338+who-biz@users.noreply.github.com> Date: Wed, 12 Aug 2026 15:01:22 -0400 Subject: [PATCH 16/19] add omitted txEpicboxId copy --- crypto_plugins/flutter_libepiccash | 2 +- tool/wl_templates/EPIC_libepiccash_interface_impl.template.dart | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/crypto_plugins/flutter_libepiccash b/crypto_plugins/flutter_libepiccash index e3e39431df..3cd76e2643 160000 --- a/crypto_plugins/flutter_libepiccash +++ b/crypto_plugins/flutter_libepiccash @@ -1 +1 @@ -Subproject commit e3e39431dff4baad8eaf799c9ffd0d9ae67e658c +Subproject commit 3cd76e2643d0b4773d7bfcaf2f26056702dfef06 diff --git a/tool/wl_templates/EPIC_libepiccash_interface_impl.template.dart b/tool/wl_templates/EPIC_libepiccash_interface_impl.template.dart index 2e412acdfb..2419833763 100644 --- a/tool/wl_templates/EPIC_libepiccash_interface_impl.template.dart +++ b/tool/wl_templates/EPIC_libepiccash_interface_impl.template.dart @@ -151,6 +151,7 @@ final class _LibEpicCashInterfaceImpl extends LibEpicCashInterface { amountCredited: e.amountCredited, amountDebited: e.amountDebited, txSlateId: e.txSlateId, + txEpicboxId: e.txEpicboxId, fee: e.fee, ttlCutoffHeight: e.ttlCutoffHeight, messages: e.messages?.messages From df6c9e6d627faec830213dc9de193e231d849d37 Mon Sep 17 00:00:00 2001 From: who-biz <37732338+who-biz@users.noreply.github.com> Date: Wed, 12 Aug 2026 15:30:54 -0400 Subject: [PATCH 17/19] Add more epicboxIds to transaction fetching --- .../models/blockchain_data/v2/transaction_v2.dart | 1 + lib/wallets/wallet/impl/epiccash_wallet.dart | 2 ++ lib/wl_gen/interfaces/libepiccash_interface.dart | 2 +- .../EPIC_libepiccash_interface_impl.template.dart | 11 +++++++++++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/models/isar/models/blockchain_data/v2/transaction_v2.dart b/lib/models/isar/models/blockchain_data/v2/transaction_v2.dart index 721d9a11c9..0bd0e8628a 100644 --- a/lib/models/isar/models/blockchain_data/v2/transaction_v2.dart +++ b/lib/models/isar/models/blockchain_data/v2/transaction_v2.dart @@ -106,6 +106,7 @@ class TransactionV2 { int? get numberOfMessages => _getFromOtherData(key: TxV2OdKeys.numberOfMessages) as int?; String? get slateId => _getFromOtherData(key: TxV2OdKeys.slateId) as String?; + String? get epicboxId => _getFromOtherData(key: TxV2OdKeys.epicboxId) as String?; String? get onChainNote => _getFromOtherData(key: TxV2OdKeys.onChainNote) as String?; bool get isCancelled => diff --git a/lib/wallets/wallet/impl/epiccash_wallet.dart b/lib/wallets/wallet/impl/epiccash_wallet.dart index e70be6f6a0..e2e7f434e7 100644 --- a/lib/wallets/wallet/impl/epiccash_wallet.dart +++ b/lib/wallets/wallet/impl/epiccash_wallet.dart @@ -1404,6 +1404,7 @@ class EpiccashWallet extends Bip39Wallet { libEpic.txTypeIsReceived(tx.txType) || libEpic.txTypeIsReceiveCancelled(tx.txType); final slateId = tx.txSlateId; + final epicboxId = tx.txEpicboxId; final commitId = slatesToCommits[slateId]?['commitId'] as String?; final numberOfMessages = tx.messages?.length; final onChainNote = tx.messages?.first.message; @@ -1465,6 +1466,7 @@ class EpiccashWallet extends Bip39Wallet { "isEpiccashTransaction": true, "numberOfMessages": numberOfMessages, "slateId": slateId, + "epicboxId": epicboxId, "onChainNote": onChainNote, "isCancelled": libEpic.txTypeIsSentCancelled(tx.txType) || diff --git a/lib/wl_gen/interfaces/libepiccash_interface.dart b/lib/wl_gen/interfaces/libepiccash_interface.dart index 3606d57c12..3f1116d7f8 100644 --- a/lib/wl_gen/interfaces/libepiccash_interface.dart +++ b/lib/wl_gen/interfaces/libepiccash_interface.dart @@ -69,7 +69,7 @@ abstract class LibEpicCashInterface { String? epicboxConfig, int? txId, String? txSlateId, - String? epicboxMsgId, + String? txEpicboxId, }); Future> getTransactions({ diff --git a/tool/wl_templates/EPIC_libepiccash_interface_impl.template.dart b/tool/wl_templates/EPIC_libepiccash_interface_impl.template.dart index 2419833763..eb6d4127a8 100644 --- a/tool/wl_templates/EPIC_libepiccash_interface_impl.template.dart +++ b/tool/wl_templates/EPIC_libepiccash_interface_impl.template.dart @@ -137,6 +137,17 @@ final class _LibEpicCashInterfaceImpl extends LibEpicCashInterface { refreshFromNode: refreshFromNode, ); + // Log the flutter_libepiccash Transaction BEFORE converting it. + for (final e in transactions) { + Logging.instance.w( + "EPIC INTERFACE TX " + "id=${e.id} " + "txSlateId=${e.txSlateId} " + "txEpicboxId=${e.txEpicboxId} " + "type=${e.txType}", + ); + } + return transactions .map( (e) => EpicTransaction( From 75c5b76ad7add61e82ed4d833f34527de073ad84 Mon Sep 17 00:00:00 2001 From: who-biz <37732338+who-biz@users.noreply.github.com> Date: Wed, 12 Aug 2026 15:41:11 -0400 Subject: [PATCH 18/19] Fix compilation errors in prior commit - Probably will run into more --- lib/wl_gen/interfaces/libepiccash_interface.dart | 3 +++ .../wl_templates/EPIC_libepiccash_interface_impl.template.dart | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/wl_gen/interfaces/libepiccash_interface.dart b/lib/wl_gen/interfaces/libepiccash_interface.dart index 3f1116d7f8..dbc25054c8 100644 --- a/lib/wl_gen/interfaces/libepiccash_interface.dart +++ b/lib/wl_gen/interfaces/libepiccash_interface.dart @@ -139,6 +139,7 @@ class EpicTransaction { final String parentKeyId; final int id; final String? txSlateId; + final String? txEpicboxId; final Enum txType; final String creationTs; final String confirmationTs; @@ -159,6 +160,7 @@ class EpicTransaction { required this.parentKeyId, required this.id, this.txSlateId, + this.txEpicboxId, required this.txType, required this.creationTs, required this.confirmationTs, @@ -181,6 +183,7 @@ class EpicTransaction { return 'EpicTransaction(' 'id: $id, ' 'txSlateId: $txSlateId, ' + 'txEpicboxId: $txEpicboxId, ' 'type: $txType, ' 'confirmed: $confirmed, ' 'inputs: $numInputs, ' diff --git a/tool/wl_templates/EPIC_libepiccash_interface_impl.template.dart b/tool/wl_templates/EPIC_libepiccash_interface_impl.template.dart index eb6d4127a8..95108704d4 100644 --- a/tool/wl_templates/EPIC_libepiccash_interface_impl.template.dart +++ b/tool/wl_templates/EPIC_libepiccash_interface_impl.template.dart @@ -139,7 +139,7 @@ final class _LibEpicCashInterfaceImpl extends LibEpicCashInterface { // Log the flutter_libepiccash Transaction BEFORE converting it. for (final e in transactions) { - Logging.instance.w( + print( "EPIC INTERFACE TX " "id=${e.id} " "txSlateId=${e.txSlateId} " From e0036c25754815aa9d5e51d7119e6160983cfca4 Mon Sep 17 00:00:00 2001 From: who-biz <37732338+who-biz@users.noreply.github.com> Date: Wed, 12 Aug 2026 15:45:38 -0400 Subject: [PATCH 19/19] Add epicboxId to V2OData --- lib/models/isar/models/blockchain_data/v2/transaction_v2.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/models/isar/models/blockchain_data/v2/transaction_v2.dart b/lib/models/isar/models/blockchain_data/v2/transaction_v2.dart index 0bd0e8628a..cff16acbb5 100644 --- a/lib/models/isar/models/blockchain_data/v2/transaction_v2.dart +++ b/lib/models/isar/models/blockchain_data/v2/transaction_v2.dart @@ -410,6 +410,7 @@ abstract final class TxV2OdKeys { static const isMimblewimblecoinTransaction = "isMimblewimblecoinTransaction"; static const numberOfMessages = "numberOfMessages"; static const slateId = "slateId"; + static const epicboxId = "epicboxId"; static const onChainNote = "onChainNote"; static const isCancelled = "isCancelled"; static const contractAddress = "contractAddress";