Skip to content

Commit 2a05a46

Browse files
committed
chore: newer breaking changes to descriptor
1 parent eee6659 commit 2a05a46

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

BDKSwiftExampleWallet/Service/BDK Service/BDKService.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,30 +230,30 @@ private class BDKService {
230230
publicKey: DescriptorPublicKey,
231231
fingerprint: String,
232232
network: Network
233-
) -> (descriptor: Descriptor, changeDescriptor: Descriptor) {
233+
) throws -> (descriptor: Descriptor, changeDescriptor: Descriptor) {
234234
switch addressType {
235235
case .bip86:
236-
let descriptor = Descriptor.newBip86Public(
236+
let descriptor = try Descriptor.newBip86Public(
237237
publicKey: publicKey,
238238
fingerprint: fingerprint,
239239
keychainKind: .external,
240240
network: network
241241
)
242-
let changeDescriptor = Descriptor.newBip86Public(
242+
let changeDescriptor = try Descriptor.newBip86Public(
243243
publicKey: publicKey,
244244
fingerprint: fingerprint,
245245
keychainKind: .internal,
246246
network: network
247247
)
248248
return (descriptor, changeDescriptor)
249249
case .bip84:
250-
let descriptor = Descriptor.newBip84Public(
250+
let descriptor = try Descriptor.newBip84Public(
251251
publicKey: publicKey,
252252
fingerprint: fingerprint,
253253
keychainKind: .external,
254254
network: network
255255
)
256-
let changeDescriptor = Descriptor.newBip84Public(
256+
let changeDescriptor = try Descriptor.newBip84Public(
257257
publicKey: publicKey,
258258
fingerprint: fingerprint,
259259
keychainKind: .internal,
@@ -434,7 +434,7 @@ private class BDKService {
434434
let descriptorPublicKey = try DescriptorPublicKey.fromString(publicKey: xpubString)
435435
let fingerprint = descriptorPublicKey.masterFingerprint()
436436
let currentAddressType = getCurrentAddressType()
437-
let descriptors = createPublicDescriptors(
437+
let descriptors = try createPublicDescriptors(
438438
for: currentAddressType,
439439
publicKey: descriptorPublicKey,
440440
fingerprint: fingerprint,

0 commit comments

Comments
 (0)