Skip to content

Commit 145b761

Browse files
committed
chore: update TwitterUser to make unrelease fields not required
Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
1 parent 1abe2c2 commit 145b761

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

api/src/main/java/com/getcode/model/TwitterUser.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package com.getcode.model
22

33
import android.webkit.MimeTypeMap
44
import com.codeinc.gen.user.v1.IdentityService
5+
import com.codeinc.gen.user.v1.friendshipCostOrNull
56
import com.getcode.solana.keys.PublicKey
67
import com.getcode.solana.keys.base58
78
import com.getcode.utils.serializer.PublicKeyAsStringSerializer
@@ -55,8 +56,9 @@ data class TwitterUser(
5556
followerCount = proto.followerCount,
5657
tipAddress = tipAddress,
5758
verificationStatus = VerificationStatus.entries.getOrNull(proto.verifiedTypeValue) ?: VerificationStatus.unknown,
59+
// costOfFriendship = kotlin.runCatching { proto.friendshipCostOrNull }.getOrNull()
5860
costOfFriendship = Fiat(currency = CurrencyCode.USD, amount = 1.00),
59-
isFriend = proto.isFriend
61+
isFriend = runCatching { proto.isFriend }.getOrNull() ?: false
6062
)
6163
}
6264
}

0 commit comments

Comments
 (0)