class DefaultPurchaseWallet implements PurchaseWallet {

    @Override
    public synchronized void updateRemotePurchases(@NonNull Set<RemoteSubscription> remoteSubscriptions) {
        final Set<InAppPurchase> remotePurchases = new HashSet<>();
        for (final RemoteSubscription remoteSubscription : remoteSubscriptions) {
            remotePurchases.add(remoteSubscription.getInAppPurchase());
        }
        if (!getRemotelyOwnedPurchases().equals(remotePurchases)) {
            this.remotelyOwnedPurchases = remotePurchases;
            persistWallet();
        }
    }

    @Inject public  DefaultPurchaseWallet(@NonNull Lazy<SharedPreferences> preferences);

}