Skip to content

Commit

Permalink
Merge pull request #253 from dmariogatto/purchase-comparer
Browse files Browse the repository at this point in the history
InAppBillingPurchase comparer to consider TransactionDateUtc
  • Loading branch information
jamesmontemagno committed Jun 1, 2020
2 parents 7cf6b71 + ae37d85 commit 3badebc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Plugin.InAppBilling.Abstractions/InAppBillingPurchase.cs
Expand Up @@ -75,11 +75,11 @@ public InAppBillingPurchase()
(obj is InAppBillingPurchase purchase) && Equals(purchase);

public bool Equals(InAppBillingPurchase other) =>
(Id, ProductId, AutoRenewing, PurchaseToken, State, Payload) ==
(other.Id, other.ProductId, other.AutoRenewing, other.PurchaseToken, other.State, other.Payload);
(Id, TransactionDateUtc, ProductId, AutoRenewing, PurchaseToken, State, Payload) ==
(other.Id, other.TransactionDateUtc, other.ProductId, other.AutoRenewing, other.PurchaseToken, other.State, other.Payload);

public override int GetHashCode() =>
(Id, ProductId, AutoRenewing, PurchaseToken, State, Payload).GetHashCode();
(Id, TransactionDateUtc, ProductId, AutoRenewing, PurchaseToken, State, Payload).GetHashCode();

/// <summary>
/// Prints out product
Expand Down

0 comments on commit 3badebc

Please sign in to comment.