Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ret classification update #1463

Merged
merged 3 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions RadixWallet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1213,7 +1213,6 @@
E62449D52AFBA61100272C67 /* Home+AccountRow+Reducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = E62449D32AFBA61100272C67 /* Home+AccountRow+Reducer.swift */; };
E62449D62AFBA61100272C67 /* Home+AccountRow+View.swift in Sources */ = {isa = PBXBuildFile; fileRef = E62449D42AFBA61100272C67 /* Home+AccountRow+View.swift */; };
E62BB7632AEA856300D46DAC /* ImportMnemonicGridTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E62BB7622AEA856300D46DAC /* ImportMnemonicGridTests.swift */; };
E63257652BB314F600952051 /* ExecutionSummary+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E63257642BB314F600952051 /* ExecutionSummary+Extensions.swift */; };
E634CA2F2AFD25B100C43DB7 /* DebugKeychainContents+View.swift in Sources */ = {isa = PBXBuildFile; fileRef = E634CA2D2AFD25B100C43DB7 /* DebugKeychainContents+View.swift */; };
E634CA302AFD25B100C43DB7 /* DebugKeychainContents.swift in Sources */ = {isa = PBXBuildFile; fileRef = E634CA2E2AFD25B100C43DB7 /* DebugKeychainContents.swift */; };
E63D123D2ADD1FC00001CBB1 /* SwiftUIIntrospect in Frameworks */ = {isa = PBXBuildFile; productRef = E63D123C2ADD1FC00001CBB1 /* SwiftUIIntrospect */; };
Expand Down Expand Up @@ -2526,7 +2525,6 @@
E62449D32AFBA61100272C67 /* Home+AccountRow+Reducer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Home+AccountRow+Reducer.swift"; sourceTree = "<group>"; };
E62449D42AFBA61100272C67 /* Home+AccountRow+View.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Home+AccountRow+View.swift"; sourceTree = "<group>"; };
E62BB7622AEA856300D46DAC /* ImportMnemonicGridTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImportMnemonicGridTests.swift; sourceTree = "<group>"; };
E63257642BB314F600952051 /* ExecutionSummary+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ExecutionSummary+Extensions.swift"; sourceTree = "<group>"; };
E634CA2D2AFD25B100C43DB7 /* DebugKeychainContents+View.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "DebugKeychainContents+View.swift"; sourceTree = "<group>"; };
E634CA2E2AFD25B100C43DB7 /* DebugKeychainContents.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DebugKeychainContents.swift; sourceTree = "<group>"; };
E64463FD2B75304C0006CAF8 /* Dictionary+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Dictionary+Extensions.swift"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2729,7 +2727,6 @@
482752142BDB8F5A007854E0 /* SargonExtensions */ = {
isa = PBXGroup;
children = (
E63257642BB314F600952051 /* ExecutionSummary+Extensions.swift */,
48AF19CD2BB71C1600796130 /* IntoSargon+Bridge.swift */,
482752172BDB9032007854E0 /* DisplayName+NonEmptyString.swift */,
482752192BDB90D4007854E0 /* FactorSourceCommon+New+Dependencies.swift */,
Expand Down Expand Up @@ -8128,7 +8125,6 @@
48CFC37C2ADC10D900E77A5C /* PoolUnitDetails+View.swift in Sources */,
48CFC5C52ADC10DA00E77A5C /* LoadingView.swift in Sources */,
48CFC59C2ADC10DA00E77A5C /* Button+Extra.swift in Sources */,
E63257652BB314F600952051 /* ExecutionSummary+Extensions.swift in Sources */,
5BBC7D9E2C3D390E00B04BD6 /* BootstrapClient+Interface.swift in Sources */,
A408159E2C7E0D08005E65B9 /* MetadataPublicKeyHashValue.swift in Sources */,
48CFC4322ADC10DA00E77A5C /* Async+Extra.swift in Sources */,
Expand Down Expand Up @@ -9600,7 +9596,7 @@
repositoryURL = "https://github.com/radixdlt/sargon/";
requirement = {
kind = exactVersion;
version = 1.1.137;
version = 1.1.140;
};
};
5B634A922C91D2A0004B2FBC /* XCRemoteSwiftPackageReference "ScreenshotPreventing-iOS" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/radixdlt/sargon",
"state" : {
"revision" : "0cf5b6fc5e7cce6d0847500eb7571724f21b1920",
"version" : "1.1.137"
"revision" : "89f7a2305f034723cf4fdb231ae5af40ac8cae97",
"version" : "1.1.140"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ struct FeePayerSelectionResult: Equatable, Sendable {

extension ExecutionSummary {
func guranteesCost() throws -> Decimal192 {
switch detailedManifestClass {
switch detailedClassification {
case .general, .transfer:
deposits.flatMap(\.value).reduce(.zero) { result, resource in
switch resource {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ extension OnLedgerEntity.OwnedFungibleResource {

extension OnLedgerEntity.NonFungibleToken {
fileprivate var resourceQuantifier: NonFungibleResourceIndicator {
.byIds(ids: [id.nonFungibleLocalId])
.guaranteed(ids: [id.nonFungibleLocalId])
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,15 @@ extension InteractionReview.Sections {
return newlyCreatedMetadata
}

switch summary.detailedManifestClass {
switch summary.detailedClassification {
case nil:
return nil

case .securifyEntity:
return nil
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be supported


case .general, .transfer:
if summary.detailedManifestClass == .general {
if summary.detailedClassification == .general {
guard !summary.deposits.isEmpty || !summary.withdrawals.isEmpty else { return nil }
}

Expand Down Expand Up @@ -742,7 +745,7 @@ extension [AccountAddress: [ResourceIndicator]] {
extension ResourceIndicator {
var isGuaranteedAmount: Bool {
switch self {
case .fungible(_, .guaranteed), .nonFungible(_, .byIds):
case .fungible(_, .guaranteed), .nonFungible(_, .guaranteed):
return true
default:
assertionFailure("Cannot sum up the predicted amounts")
Expand Down Expand Up @@ -788,8 +791,8 @@ extension FungibleResourceIndicator {
extension NonFungibleResourceIndicator {
func adding(_ other: Self) -> Self {
switch (self, other) {
case let (.byIds(ids), .byIds(otherIds)):
return .byIds(ids: ids + otherIds)
case let (.guaranteed(ids), .guaranteed(otherIds)):
return .guaranteed(ids: ids + otherIds)
default:
assertionFailure("Cannot sum up the predicted amounts")
return self
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ struct TransactionReview: Sendable, FeatureReducer {
signingFactors: preview.signingFactors,
accountWithdraws: preview.analyzedManifestToReview.withdrawals,
accountDeposits: preview.analyzedManifestToReview.deposits,
isNonConforming: preview.analyzedManifestToReview.detailedManifestClass == nil
isNonConforming: preview.analyzedManifestToReview.detailedClassification == nil
)

state.reviewedTransaction = reviewedTransaction
Expand Down
Loading