File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
Extensions/BDK+Extensions Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -10,26 +10,26 @@ import Foundation
1010enum AddressType : String , CaseIterable {
1111 case bip86 = " bip86 "
1212 case bip84 = " bip84 "
13-
13+
1414 var description : String {
1515 switch self {
1616 case . bip86: return " bip86 "
1717 case . bip84: return " bip84 "
1818 }
1919 }
20-
20+
2121 var displayName : String {
2222 switch self {
2323 case . bip86: return " BIP86 (Taproot) "
2424 case . bip84: return " BIP84 (SegWit) "
2525 }
2626 }
27-
27+
2828 init ? ( stringValue: String ) {
2929 switch stringValue {
3030 case " bip86 " : self = . bip86
3131 case " bip84 " : self = . bip84
3232 default : return nil
3333 }
3434 }
35- }
35+ }
Original file line number Diff line number Diff line change @@ -57,7 +57,8 @@ private class BDKService {
5757 }
5858
5959 private func getCurrentAddressType( ) -> AddressType {
60- let storedAddressTypeString = try ? keyClient. getAddressType ( ) ?? AddressType . bip86. description
60+ let storedAddressTypeString =
61+ try ? keyClient. getAddressType ( ) ?? AddressType . bip86. description
6162 return AddressType ( stringValue: storedAddressTypeString ?? " " ) ?? . bip86
6263 }
6364
Original file line number Diff line number Diff line change @@ -124,7 +124,8 @@ extension KeyClient {
124124 saveBackupInfo: { backupInfo in try KeyService ( ) . saveBackupInfo ( backupInfo: backupInfo) } ,
125125 saveEsploraURL: { url in try KeyService ( ) . saveEsploraURL ( url: url) } ,
126126 saveNetwork: { network in try KeyService ( ) . saveNetwork ( network: network) } ,
127- saveAddressType: { addressType in try KeyService ( ) . saveAddressType ( addressType: addressType) }
127+ saveAddressType: { addressType in try KeyService ( ) . saveAddressType ( addressType: addressType)
128+ }
128129 )
129130}
130131
You can’t perform that action at this time.
0 commit comments