Skip to content

Commit

Permalink
buildfix
Browse files Browse the repository at this point in the history
  • Loading branch information
lynx56 committed Mar 14, 2024
1 parent 8c57fb0 commit ff7a54f
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import Foundation

extension ReferendumStateUpdatePayload.Status {
func description(for locale: Locale?) -> String {
switch self {
case .created:
return R.string.localizable.pushNotificationReferendumCreated(preferredLanguages: locale?.rLanguages)
case .deciding:
return R.string.localizable.pushNotificationReferendumDeciding(preferredLanguages: locale?.rLanguages)
case .confirming:
return R.string.localizable.pushNotificationReferendumConfirming(preferredLanguages: locale?.rLanguages)
case .approved:
return R.string.localizable.pushNotificationReferendumApproved(preferredLanguages: locale?.rLanguages)
case .rejected:
return R.string.localizable.pushNotificationReferendumRejected(preferredLanguages: locale?.rLanguages)
case .cancelled:
return R.string.localizable.pushNotificationReferendumCancelled(preferredLanguages: locale?.rLanguages)
case .timedOut:
return R.string.localizable.pushNotificationReferendumTimedOut(preferredLanguages: locale?.rLanguages)
case .killed:
return R.string.localizable.pushNotificationReferendumKilled(preferredLanguages: locale?.rLanguages)
}
}
}
10 changes: 5 additions & 5 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ DEPENDENCIES:
- Kingfisher
- R.swift
- ReachabilitySwift
- RobinHood (from `https://github.com/ERussel/robinhood-ios.git`, commit `81b569e4c8b6b4b0fdf0696b4294b5e149eadaca`)
- RobinHood (from `https://github.com/ERussel/robinhood-ios.git`, tag `2.6.1`)
- SnapKit (~> 5.0.0)
- SoraFoundation (from `https://github.com/ERussel/Foundation-iOS.git`, tag `1.1.0`)
- SoraKeystore (~> 1.0.0)
Expand Down Expand Up @@ -1014,8 +1014,8 @@ EXTERNAL SOURCES:
:git: https://github.com/novasamatech/hydra-math-swift.git
:tag: '0.1'
RobinHood:
:commit: 81b569e4c8b6b4b0fdf0696b4294b5e149eadaca
:git: https://github.com/ERussel/robinhood-ios.git
:tag: 2.6.1
SoraFoundation:
:git: https://github.com/ERussel/Foundation-iOS.git
:tag: 1.1.0
Expand Down Expand Up @@ -1051,8 +1051,8 @@ CHECKOUT OPTIONS:
:git: https://github.com/novasamatech/hydra-math-swift.git
:tag: '0.1'
RobinHood:
:commit: 81b569e4c8b6b4b0fdf0696b4294b5e149eadaca
:git: https://github.com/ERussel/robinhood-ios.git
:tag: 2.6.1
SoraFoundation:
:git: https://github.com/ERussel/Foundation-iOS.git
:tag: 1.1.0
Expand Down Expand Up @@ -1138,6 +1138,6 @@ SPEC CHECKSUMS:
ZMarkupParser: a92d31ba40695b790f1da5fec98c3d4505341aff
ZNSTextAttachment: 1ddd53660a8d3c42dbb716bf6866ffce22c44181

PODFILE CHECKSUM: 9c7ed411d8120369ce00dedc448ec27a4311a211
PODFILE CHECKSUM: 3b521ee14d42ee2c4cb0b94d39d63cc62941a174

COCOAPODS: 1.15.2
COCOAPODS: 1.15.0
17 changes: 15 additions & 2 deletions novawallet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1154,6 +1154,7 @@
77A6F5CF2A31C4D4004AFD1A /* Web3TransferRecipientRepositoryFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77A6F5CE2A31C4D4004AFD1A /* Web3TransferRecipientRepositoryFactory.swift */; };
77A6F5D22A31DB8C004AFD1A /* JsonCanonicalizer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77A6F5D12A31DB8C004AFD1A /* JsonCanonicalizer.swift */; };
77A6F5D52A31E046004AFD1A /* JsonCanonicalizerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77A6F5D42A31E046004AFD1A /* JsonCanonicalizerTests.swift */; };
77A90E2B2BA2BFBD00A08A3E /* Referenda.swift in Sources */ = {isa = PBXBuildFile; fileRef = 847A25C528D84BE2006AC9F5 /* Referenda.swift */; };
77AAC3E52B70DB0300B8B89E /* firestore-settings.json in Resources */ = {isa = PBXBuildFile; fileRef = 77AAC3E42B70DB0300B8B89E /* firestore-settings.json */; };
77AAD2992B1731D1007AD86F /* ReferendumsInitState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77AAD2982B1731D1007AD86F /* ReferendumsInitState.swift */; };
77AAE2202AFB00CB006872CC /* OperationSwapModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77AAE21F2AFB00CB006872CC /* OperationSwapModel.swift */; };
Expand Down Expand Up @@ -1189,6 +1190,7 @@
77AE4FAE2B90611000426519 /* DispatchQueueHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84F43C0E25DF016600AEDA56 /* DispatchQueueHelper.swift */; };
77AE4FAF2B90611800426519 /* BaseOperation+Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 843910C6253F56EA00E3C217 /* BaseOperation+Result.swift */; };
77AE4FB02B90646100426519 /* BaseOperation+Cancellable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 849C0670276516F900394C82 /* BaseOperation+Cancellable.swift */; };
77AF376B2BA2C1A800FD1A8E /* ReferendumStatusExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77AF376A2BA2C1A800FD1A8E /* ReferendumStatusExtensions.swift */; };
77C35CE52B568ED100308F16 /* YourWalletsPresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77C35CE42B568ED100308F16 /* YourWalletsPresentable.swift */; };
77C35CE72B56D07300308F16 /* ScanAddressPresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77C35CE62B56D07300308F16 /* ScanAddressPresentable.swift */; };
77C35CE92B5A890500308F16 /* Web3NameServiceFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77C35CE82B5A890500308F16 /* Web3NameServiceFactory.swift */; };
Expand Down Expand Up @@ -5692,6 +5694,7 @@
77AE4FB32B906B1B00426519 /* novawalletDev.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = novawalletDev.entitlements; sourceTree = "<group>"; };
77AE4FB42B906B2600426519 /* NovaPushNotificationServiceExtensionDev.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = NovaPushNotificationServiceExtensionDev.entitlements; sourceTree = "<group>"; };
77AE4FB52B906B2E00426519 /* NovaPushNotificationServiceExtensionDebug.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = NovaPushNotificationServiceExtensionDebug.entitlements; sourceTree = "<group>"; };
77AF376A2BA2C1A800FD1A8E /* ReferendumStatusExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReferendumStatusExtensions.swift; sourceTree = "<group>"; };
77C35CE42B568ED100308F16 /* YourWalletsPresentable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YourWalletsPresentable.swift; sourceTree = "<group>"; };
77C35CE62B56D07300308F16 /* ScanAddressPresentable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScanAddressPresentable.swift; sourceTree = "<group>"; };
77C35CE82B5A890500308F16 /* Web3NameServiceFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Web3NameServiceFactory.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -11400,7 +11403,6 @@
isa = PBXGroup;
children = (
778215C32B914DF8006C7D13 /* TransferHandler.swift */,
77FC822E2BA1B99E00E7ED3C /* TransferTypeExtensions.swift */,
);
path = Transfers;
sourceTree = "<group>";
Expand All @@ -11417,6 +11419,7 @@
778215DA2B95A8F7006C7D13 /* Handlers */ = {
isa = PBXGroup;
children = (
77AF37692BA2C19500FD1A8E /* Extensions */,
778215C72B914E62006C7D13 /* Transfers */,
778215DB2B95AD67006C7D13 /* Governance */,
778215E52B95C42B006C7D13 /* Staking */,
Expand Down Expand Up @@ -11539,6 +11542,15 @@
path = canonicalization;
sourceTree = "<group>";
};
77AF37692BA2C19500FD1A8E /* Extensions */ = {
isa = PBXGroup;
children = (
77FC822E2BA1B99E00E7ED3C /* TransferTypeExtensions.swift */,
77AF376A2BA2C1A800FD1A8E /* ReferendumStatusExtensions.swift */,
);
path = Extensions;
sourceTree = "<group>";
};
77B011712B6CCCBB003A5868 /* Web3AlertService */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -21618,6 +21630,7 @@
77AE4FAC2B905EDB00426519 /* UInt64+TimeInterval.swift in Sources */,
77AE4F942B90595800426519 /* UserDataStorageFacade.swift in Sources */,
7778FE4C2B9107D20023E801 /* CompoundOperationWrapper+Dependency.swift in Sources */,
77A90E2B2BA2BFBD00A08A3E /* Referenda.swift in Sources */,
7778FE612B910BD40023E801 /* GovernanceType.swift in Sources */,
7778FE542B9109430023E801 /* Observable.swift in Sources */,
7778FE432B90F8060023E801 /* CurrencyManager.swift in Sources */,
Expand Down Expand Up @@ -21666,7 +21679,6 @@
7778FE4D2B9107EC0023E801 /* CompoundOperationWrapper+Add.swift in Sources */,
77AE4FAD2B90604000426519 /* CancellableCallHelper.swift in Sources */,
77FC822F2BA1B99E00E7ED3C /* TransferTypeExtensions.swift in Sources */,
7778FE772B910E040023E801 /* NovaTintImageProcessor.swift in Sources */,
77EDF9272B96DD8E003266B1 /* MetaAccountMapper.swift in Sources */,
77AE4F9A2B905B7500426519 /* LocalChainExternalApi.swift in Sources */,
7778FE452B90FA1C0023E801 /* OperationCombiningService.swift in Sources */,
Expand All @@ -21679,6 +21691,7 @@
7778FE582B910A760023E801 /* MoneyPresentable.swift in Sources */,
77AE4F982B905B5C00426519 /* AssetModel.swift in Sources */,
7778FE492B9104EE0023E801 /* PriceAssetInfoFactory.swift in Sources */,
77AF376B2BA2C1A800FD1A8E /* ReferendumStatusExtensions.swift in Sources */,
0CCD18D42BA1F4550068D73A /* PrimitiveBalanceViewModelFactory.swift in Sources */,
77AE4FAB2B905E9B00426519 /* TimeInterval+Time.swift in Sources */,
77EDF9222B96D654003266B1 /* Web3Alert.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ struct NewReleasePayload: Codable {
}

struct NewReferendumPayload: Codable {
let referendumId: UInt
let referendumId: Referenda.ReferendumIndex

var referendumNumber: String {
"#\(referendumId)"
Expand All @@ -25,7 +25,7 @@ struct ReferendumStateUpdatePayload: Codable {
case toStatus = "to"
}

let referendumId: UInt
let referendumId: Referenda.ReferendumIndex
let fromStatus: Status?
let toStatus: Status

Expand All @@ -38,27 +38,6 @@ struct ReferendumStateUpdatePayload: Codable {
case cancelled
case timedOut
case killed

func description(for locale: Locale?) -> String {
switch self {
case .created:
return R.string.localizable.pushNotificationReferendumCreated(preferredLanguages: locale?.rLanguages)
case .deciding:
return R.string.localizable.pushNotificationReferendumDeciding(preferredLanguages: locale?.rLanguages)
case .confirming:
return R.string.localizable.pushNotificationReferendumConfirming(preferredLanguages: locale?.rLanguages)
case .approved:
return R.string.localizable.pushNotificationReferendumApproved(preferredLanguages: locale?.rLanguages)
case .rejected:
return R.string.localizable.pushNotificationReferendumRejected(preferredLanguages: locale?.rLanguages)
case .cancelled:
return R.string.localizable.pushNotificationReferendumCancelled(preferredLanguages: locale?.rLanguages)
case .timedOut:
return R.string.localizable.pushNotificationReferendumTimedOut(preferredLanguages: locale?.rLanguages)
case .killed:
return R.string.localizable.pushNotificationReferendumKilled(preferredLanguages: locale?.rLanguages)
}
}
}

var referendumNumber: String {
Expand Down

0 comments on commit ff7a54f

Please sign in to comment.