Remove payments list from Account

This commit is contained in:
Ehren Kret
2021-02-19 11:44:59 -06:00
parent aa8525385a
commit 93f845610d
10 changed files with 46 additions and 269 deletions

View File

@@ -6,10 +6,8 @@ package org.whispersystems.textsecuregcm.entities;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.annotations.VisibleForTesting;
import java.util.List;
import javax.validation.constraints.Size;
import org.whispersystems.textsecuregcm.storage.Device.DeviceCapabilities;
import org.whispersystems.textsecuregcm.storage.PaymentAddress;
public class AccountAttributes {
@@ -35,9 +33,6 @@ public class AccountAttributes {
@JsonProperty
private boolean unrestrictedUnidentifiedAccess;
@JsonProperty
private List<PaymentAddress> payments;
@JsonProperty
private DeviceCapabilities capabilities;
@@ -47,20 +42,14 @@ public class AccountAttributes {
public AccountAttributes() {}
@VisibleForTesting
public AccountAttributes(boolean fetchesMessages, int registrationId, String pin) {
this(fetchesMessages, registrationId, null, pin, null, null, true, null);
}
@VisibleForTesting
public AccountAttributes(boolean fetchesMessages, int registrationId, String name, String pin, String registrationLock, List<PaymentAddress> payments, boolean discoverableByPhoneNumber, final DeviceCapabilities capabilities) {
this.fetchesMessages = fetchesMessages;
this.registrationId = registrationId;
this.name = name;
this.pin = pin;
this.registrationLock = registrationLock;
this.payments = payments;
public AccountAttributes(boolean fetchesMessages, int registrationId, String name, String pin, String registrationLock, boolean discoverableByPhoneNumber, final DeviceCapabilities capabilities) {
this.fetchesMessages = fetchesMessages;
this.registrationId = registrationId;
this.name = name;
this.pin = pin;
this.registrationLock = registrationLock;
this.discoverableByPhoneNumber = discoverableByPhoneNumber;
this.capabilities = capabilities;
this.capabilities = capabilities;
}
public boolean getFetchesMessages() {
@@ -95,10 +84,6 @@ public class AccountAttributes {
return capabilities;
}
public List<PaymentAddress> getPayments() {
return payments;
}
public boolean isDiscoverableByPhoneNumber() {
return discoverableByPhoneNumber;
}

View File

@@ -9,10 +9,8 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.google.common.annotations.VisibleForTesting;
import java.util.List;
import java.util.UUID;
import org.signal.zkgroup.profiles.ProfileKeyCredentialResponse;
import org.whispersystems.textsecuregcm.storage.PaymentAddress;
public class Profile {
@@ -49,9 +47,6 @@ public class Profile {
@JsonProperty
private UUID uuid;
@JsonProperty
private List<PaymentAddress> payments;
@JsonProperty
@JsonSerialize(using = ProfileKeyCredentialResponseAdapter.Serializing.class)
@JsonDeserialize(using = ProfileKeyCredentialResponseAdapter.Deserializing.class)
@@ -62,7 +57,7 @@ public class Profile {
public Profile(
String name, String about, String aboutEmoji, String avatar, String paymentAddress, String identityKey,
String unidentifiedAccess, boolean unrestrictedUnidentifiedAccess, UserCapabilities capabilities, String username,
UUID uuid, ProfileKeyCredentialResponse credential, List<PaymentAddress> payments)
UUID uuid, ProfileKeyCredentialResponse credential)
{
this.name = name;
this.about = about;
@@ -75,7 +70,6 @@ public class Profile {
this.capabilities = capabilities;
this.username = username;
this.uuid = uuid;
this.payments = payments;
this.credential = credential;
}
@@ -130,9 +124,4 @@ public class Profile {
public UUID getUuid() {
return uuid;
}
@VisibleForTesting
public List<PaymentAddress> getPayments() {
return payments;
}
}