Skip to content

Commit

Permalink
Updates for latest Sargon changes (#1425)
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasbzurovski authored Dec 17, 2024
1 parent 4b0738c commit c955e8a
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 31 deletions.
2 changes: 1 addition & 1 deletion RadixWallet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9357,7 +9357,7 @@
repositoryURL = "https://github.com/radixdlt/sargon/";
requirement = {
kind = exactVersion;
version = 1.1.85;
version = 1.1.88;
};
};
8318BB172BC8403800057BCB /* XCRemoteSwiftPackageReference "swift-custom-dump" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/radixdlt/sargon/",
"state" : {
"revision" : "d2b5e666088b0db6e1bbc0e5abc0bef1cd232b97",
"version" : "1.1.85"
"revision" : "9dced921809b0d6e9d417fb12025172eb69fc6d7",
"version" : "1.1.88"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,7 @@ extension DeviceFactorSourceClient {

switch signerEntity.securityState {
case let .unsecured(control):
let factorInstance = switch purpose {
case .signAuth:
control.authenticationSigning ?? control.transactionSigning
case .signTransaction, .signPreAuthorization:
control.transactionSigning
}
let factorInstance = control.transactionSigning

guard
let deviceFactorSource = try await factorSourcesClient.getDeviceFactorSource(of: factorInstance)
Expand Down Expand Up @@ -180,13 +175,7 @@ extension DeviceFactorSourceClient {
switch entity.securityState {
case let .unsecured(unsecuredControl):

let factorInstance = switch purpose {
case .signAuth:
unsecuredControl.authenticationSigning ?? unsecuredControl.transactionSigning
case .signTransaction, .signPreAuthorization:
unsecuredControl.transactionSigning
}

let factorInstance = unsecuredControl.transactionSigning
let derivationPath = factorInstance.derivationPath

if factorInstance.factorSourceID != factorSourceID {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,13 +370,7 @@ func signingFactors(
switch entity.securityState {
case let .unsecured(unsecuredEntityControl):

let factorInstance = switch signingPurpose {
case .signAuth:
unsecuredEntityControl.authenticationSigning ?? unsecuredEntityControl.transactionSigning
case .signTransaction, .signPreAuthorization:
unsecuredEntityControl.transactionSigning
}

let factorInstance = unsecuredEntityControl.transactionSigning
let id = factorInstance.factorSourceID
guard let factorSource = allFactorSources[id: id.asGeneral] else {
assertionFailure("Bad! factor source not found")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -657,13 +657,6 @@ extension UnsecuredEntityControlView {
factorInstance: unsecuredControl.transactionSigning,
indentation: inOneLevel
)
if let authenticationSigning = unsecuredControl.authenticationSigning {
HierarchicalDeterministicFactorInstanceView(
description: "Auth Signing",
factorInstance: authenticationSigning,
indentation: inOneLevel
)
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion RadixWalletTests/TestExtensions/TestUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ extension Profile {
factorSourceId: privateHDFactorSource.factorSource.id,
publicKey: .sample
),
authenticationSigning: nil
provisionalSecurifiedConfig: nil
)
)

Expand Down

0 comments on commit c955e8a

Please sign in to comment.