Skip to content
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.

Commit

Permalink
refactoring - use isEqual: instead of compare:
Browse files Browse the repository at this point in the history
  • Loading branch information
mackuba committed Oct 24, 2013
1 parent a8827ca commit 187010e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Hive/Backend/BCClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -164,18 +164,18 @@ - (void)observeValueForKeyPath:(NSString *)keyPath
{
if (object == [HIBitcoinManager defaultManager])
{
if ([keyPath compare:@"balance"] == NSOrderedSame)
if ([keyPath isEqual:@"balance"])
{
dispatch_async(dispatch_get_main_queue(), ^{
self.balance = [HIBitcoinManager defaultManager].balance;

[[NSUserDefaults standardUserDefaults] setObject:@(self.balance) forKey:@"LastBalance"];
});
}
else if ([keyPath compare:@"syncProgress"] == NSOrderedSame)
else if ([keyPath isEqual:@"syncProgress"])
{
}
else if([keyPath compare:@"connections"] == NSOrderedSame)
else if([keyPath isEqual:@"connections"])
{
}
}
Expand Down Expand Up @@ -285,7 +285,7 @@ - (BOOL)parseTransaction:(NSDictionary *)t notify:(BOOL)notify
trans.id = t[@"txid"];
trans.date = [t[@"time"] timeIntervalSince1970];
trans.amount = [t[@"amount"] longLongValue];
trans.request = ([(NSString *)t[@"details"][0][@"category"] compare:@"send"] != NSOrderedSame);
trans.request = (![t[@"details"][0][@"category"] isEqual:@"send"]);
trans.confirmations = [t[@"confirmations"] intValue];

if (!notify)
Expand Down

0 comments on commit 187010e

Please sign in to comment.