- Optional<File> avatarFile = removeAvatar
- ? Optional.absent()
- : avatarPath == null ? null : Optional.of(new File(avatarPath));
- m.setProfile(name, about, aboutEmoji, avatarFile);
+ m.updateProfile(UpdateProfile.newBuilder()
+ .withGivenName(givenName)
+ .withFamilyName(familyName)
+ .withAbout(about)
+ .withAboutEmoji(aboutEmoji)
+ .withMobileCoinAddress(mobileCoinAddress)
+ .withAvatar(avatarFile)
+ .withDeleteAvatar(removeAvatar)
+ .build());