Skip to content

Commit 3e7cca7

Browse files
Custodian mismatch message
1 parent 56779d9 commit 3e7cca7

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

android/java/org/chromium/chrome/browser/rewards/tipping/RewardsTippingPanelFragment.java

+12-8
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ public class RewardsTippingPanelFragment
104104
private TextView mUsdSymbol1;
105105
private TextView mUsdSymbol2;
106106
private boolean mEnoughFundWarningShown;
107+
private TextView mCustodianText;
107108

108109
public static RewardsTippingPanelFragment newInstance(int tabId, String web3Url) {
109110
RewardsTippingPanelFragment fragment = new RewardsTippingPanelFragment();
@@ -158,6 +159,7 @@ public Dialog onCreateDialog(Bundle savedInstance) {
158159
mSendButton = view.findViewById(R.id.send_tip_button);
159160
mWeb3WalletButton = view.findViewById(R.id.use_web3_wallet_button);
160161
mTipProgressBar = view.findViewById(R.id.send_tip_progress_bar);
162+
mCustodianText = view.findViewById(R.id.custodian_text);
161163

162164
init(view);
163165
setBalanceText(view);
@@ -243,12 +245,15 @@ public void OnGetExternalWallet(String externalWallet) {
243245
try {
244246
mExternalWallet = new BraveRewardsExternalWallet(externalWallet);
245247
walletStatus = mExternalWallet.getStatus();
246-
247-
if (walletStatus == WalletStatus.LOGGED_OUT) {
248-
setLogoutStateMessage();
248+
if (walletStatus != WalletStatus.NOT_CONNECTED) {
249+
if (walletStatus == WalletStatus.LOGGED_OUT) {
250+
setLogoutStateMessage();
251+
} else {
252+
int pubStatus = mBraveRewardsNativeWorker.GetPublisherStatus(mCurrentTabId);
253+
setPublisherNoteText(pubStatus, walletStatus);
254+
}
249255
} else {
250-
int pubStatus = mBraveRewardsNativeWorker.GetPublisherStatus(mCurrentTabId);
251-
setPublisherNoteText(pubStatus, walletStatus);
256+
mCustodianText.setVisibility(View.GONE);
252257
}
253258
} catch (JSONException e) {
254259
mExternalWallet = null;
@@ -562,9 +567,8 @@ private void setCustodianIconAndName(View view) {
562567
custodianName = R.string.gemini;
563568
}
564569

565-
TextView custodian = view.findViewById(R.id.custodian_text);
566-
custodian.setText(custodianName);
567-
custodian.setCompoundDrawablesWithIntrinsicBounds(custodianIcon, 0, 0, 0);
570+
mCustodianText.setText(custodianName);
571+
mCustodianText.setCompoundDrawablesWithIntrinsicBounds(custodianIcon, 0, 0, 0);
568572
}
569573

570574
private void initTipChoice(boolean isBat) {

android/java/res/layout/tipping_banner_tipping_panel_inside_layout.xml

-2
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,9 @@
3838
android:drawablePadding="8dp"
3939
android:fontFamily="sans-serif-medium"
4040
android:padding="4dp"
41-
android:text="@string/uphold"
4241
android:textAllCaps="true"
4342
android:textColor="@color/custodian_name_color"
4443
android:textSize="11sp"
45-
app:drawableLeftCompat="@drawable/upload_icon"
4644
app:layout_constraintBottom_toBottomOf="@id/brave_rewards_balance_text"
4745
app:layout_constraintStart_toEndOf="@id/brave_rewards_balance_text"
4846
app:layout_constraintTop_toTopOf="@id/brave_rewards_balance_text" />

0 commit comments

Comments
 (0)