diff --git a/DashSync/shared/Models/Wallet/DSSpecialTransactionsWalletHolder.m b/DashSync/shared/Models/Wallet/DSSpecialTransactionsWalletHolder.m index ba087139..eed32017 100644 --- a/DashSync/shared/Models/Wallet/DSSpecialTransactionsWalletHolder.m +++ b/DashSync/shared/Models/Wallet/DSSpecialTransactionsWalletHolder.m @@ -39,8 +39,22 @@ @interface DSSpecialTransactionsWalletHolder () @property (nonatomic, strong) NSMutableDictionary *providerUpdateRegistrarTransactions; @property (nonatomic, strong) NSMutableDictionary *providerUpdateRevocationTransactions; @property (nonatomic, strong) NSMutableDictionary *creditFundingTransactions; -@property (nonatomic, strong) NSMutableDictionary *assetLockTransactions; -@property (nonatomic, strong) NSMutableDictionary *assetUnlockTransactions; + - (instancetype)initWithWallet:(DSWallet *)wallet inContext:(NSManagedObjectContext *)managedObjectContext { + if (!(self = [super init])) return nil; + + self.providerRegistrationTransactions = [NSMutableDictionary dictionary]; + self.providerUpdateServiceTransactions = [NSMutableDictionary dictionary]; + self.providerUpdateRegistrarTransactions = [NSMutableDictionary dictionary]; + self.providerUpdateRevocationTransactions = [NSMutableDictionary dictionary]; + self.creditFundingTransactions = [NSMutableDictionary dictionary]; + self.assetLockTransactions = [NSMutableDictionary dictionary]; + self.assetUnlockTransactions = [NSMutableDictionary dictionary]; + self.managedObjectContext = [NSManagedObjectContext chainContext]; + self.wallet = wallet; + self.transactionsToSave = [NSMutableArray array]; + self.transactionsToSaveInBlockSave = [NSMutableDictionary dictionary]; + return self; + } @property (nonatomic, strong) NSMutableArray *transactionsToSave; @property (nonatomic, strong) NSMutableDictionary *> *transactionsToSaveInBlockSave;