From 48b3fd24725a92bb96739153712c416662864344 Mon Sep 17 00:00:00 2001 From: Philemon Ukane Date: Mon, 12 Aug 2024 15:49:14 +0100 Subject: [PATCH] bug-fix: account for other send outputs that are part of the same tx Signed-off-by: Philemon Ukane --- cw_decred/lib/wallet.dart | 10 +++++++--- lib/view_model/transaction_details_view_model.dart | 2 +- scripts/android/build_decred.sh | 2 +- scripts/ios/build_decred.sh | 2 +- scripts/macos/build_decred.sh | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/cw_decred/lib/wallet.dart b/cw_decred/lib/wallet.dart index e151d5a2e..b1273b138 100644 --- a/cw_decred/lib/wallet.dart +++ b/cw_decred/lib/wallet.dart @@ -337,7 +337,7 @@ abstract class DecredWalletBase extends WalletBase> fetchFiveTransactions( int from) async { final res = @@ -396,7 +395,7 @@ abstract class DecredWalletBase extends WalletBase{}; for (final d in decoded) { - final txid = d["txid"] ?? ""; + final txid = uniqueTxID(d["txid"] ?? "", d["vout"] ?? 0); var direction = TransactionDirection.outgoing; if (d["category"] == "receive") { direction = TransactionDirection.incoming; @@ -423,6 +422,11 @@ abstract class DecredWalletBase extends WalletBase save() async {} diff --git a/lib/view_model/transaction_details_view_model.dart b/lib/view_model/transaction_details_view_model.dart index 4911cc7ed..f2a3c1cfd 100644 --- a/lib/view_model/transaction_details_view_model.dart +++ b/lib/view_model/transaction_details_view_model.dart @@ -182,7 +182,7 @@ abstract class TransactionDetailsViewModelBase with Store { case WalletType.wownero: return 'https://explore.wownero.com/tx/${txId}'; case WalletType.decred: - return 'https://dcrdata.decred.org/tx/${txId}'; + return 'https://dcrdata.decred.org/tx/${txId.split(':')[0]}'; case WalletType.none: return ''; } diff --git a/scripts/android/build_decred.sh b/scripts/android/build_decred.sh index fc4807deb..3d49e0ef3 100755 --- a/scripts/android/build_decred.sh +++ b/scripts/android/build_decred.sh @@ -4,7 +4,7 @@ CW_DECRED_DIR=${WORKDIR}/cake_wallet/cw_decred LIBWALLET_PATH="${WORKDIR}/decred/libwallet" LIBWALLET_URL="https://github.com/decred/libwallet.git" -LIBWALLET_VERSION="v1.0.4" +LIBWALLET_VERSION="v1.1.0" if [ -e $LIBWALLET_PATH ]; then rm -fr $LIBWALLET_PATH diff --git a/scripts/ios/build_decred.sh b/scripts/ios/build_decred.sh index c41d09a0f..799dc4ac5 100755 --- a/scripts/ios/build_decred.sh +++ b/scripts/ios/build_decred.sh @@ -3,7 +3,7 @@ . ./config.sh LIBWALLET_PATH="${EXTERNAL_IOS_SOURCE_DIR}/libwallet" LIBWALLET_URL="https://github.com/decred/libwallet.git" -LIBWALLET_VERSION="v1.0.4" +LIBWALLET_VERSION="v1.1.0" if [ -e $LIBWALLET_PATH ]; then rm -fr $LIBWALLET_PATH diff --git a/scripts/macos/build_decred.sh b/scripts/macos/build_decred.sh index f97de575c..2cd23cefd 100755 --- a/scripts/macos/build_decred.sh +++ b/scripts/macos/build_decred.sh @@ -4,7 +4,7 @@ LIBWALLET_PATH="${EXTERNAL_MACOS_SOURCE_DIR}/libwallet" LIBWALLET_URL="https://github.com/decred/libwallet.git" -LIBWALLET_VERSION="v1.0.4" +LIBWALLET_VERSION="v1.1.0" echo "======================= DECRED LIBWALLET ========================="