From 2dcfa041141ae69e868e1a8cfb467f18a4d0b1b6 Mon Sep 17 00:00:00 2001
From: Sjors Provoost <sjors@sprovoost.nl>
Date: Fri, 13 Jan 2023 10:52:48 +0100
Subject: [PATCH] Bump libwally-core to 0.8.7

---
 CLibWally/libwally-core | 2 +-
 LibWally/PSBT.swift     | 2 +-
 README.md               | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/CLibWally/libwally-core b/CLibWally/libwally-core
index 26f588f..38b85bf 160000
--- a/CLibWally/libwally-core
+++ b/CLibWally/libwally-core
@@ -1 +1 @@
-Subproject commit 26f588f175670fbcdf2e12771addf58819d39a40
+Subproject commit 38b85bf06194ebe0d1d841e11cd8e1b58aa2a9ca
diff --git a/LibWally/PSBT.swift b/LibWally/PSBT.swift
index 11721e3..bc5b6c3 100644
--- a/LibWally/PSBT.swift
+++ b/LibWally/PSBT.swift
@@ -369,7 +369,7 @@ public struct PSBT : Equatable {
                 wally_tx.deallocate()
             }
         }
-        guard wally_psbt_extract(psbt, &output) == WALLY_OK else {
+        guard wally_psbt_extract(psbt, UInt32(0), &output) == WALLY_OK else {
             return nil
         }
         precondition(output != nil)
diff --git a/README.md b/README.md
index a5ce4c6..dfc9665 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
 Opinionated Swift wrapper around [LibWally](https://github.com/ElementsProject/libwally-core),
 a collection of useful primitives for cryptocurrency wallets.
 
-Supports a minimal set of features based on v0.8.6. See also [original docs](https://wally.readthedocs.io/en/release_0.8.6).
+Supports a minimal set of features based on v0.8.7. See also [original docs](https://wally.readthedocs.io/en/release_0.8.7).
 
 - [ ] Core Functions
   - [x] base58 encode / decode