Skip to content

Commit

Permalink
Open web Wallet instead of native version
Browse files Browse the repository at this point in the history
  • Loading branch information
simoarpe committed Nov 24, 2023
1 parent f9c62a2 commit 538091a
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@

package org.chromium.chrome.browser.crypto_wallet.activities;

import static org.chromium.chrome.browser.crypto_wallet.adapters.CryptoFragmentPageAdapter.ACCOUNTS_FRAGMENT_POSITION;
import static org.chromium.chrome.browser.crypto_wallet.adapters.CryptoFragmentPageAdapter.MARKET_FRAGMENT_POSITION;
import static org.chromium.chrome.browser.crypto_wallet.adapters.CryptoFragmentPageAdapter.PORTFOLIO_FRAGMENT_POSITION;
import static org.chromium.chrome.browser.crypto_wallet.adapters.CryptoFragmentPageAdapter.TRANSACTIONS_ACTIVITY_FRAGMENT_POSITION;
import static org.chromium.chrome.browser.crypto_wallet.util.Utils.ONBOARDING_ACTION;
import static org.chromium.chrome.browser.crypto_wallet.util.Utils.ONBOARDING_FIRST_PAGE_ACTION;
import static org.chromium.chrome.browser.crypto_wallet.util.Utils.RESTORE_WALLET_ACTION;
Expand Down Expand Up @@ -111,8 +107,6 @@ public boolean onOptionsItemSelected(MenuItem item) {
}
} else if (item.getItemId() == R.id.help_center) {
WalletUtils.openWalletHelpCenter(this);
} else if (item.getItemId() == R.id.open_web_wallet) {
WalletUtils.openWebWallet();
}
return super.onOptionsItemSelected(item);
}
Expand Down Expand Up @@ -351,31 +345,7 @@ private void showMainLayout() {
addRemoveSecureFlag(false);

mCryptoOnboardingLayout.setVisibility(View.GONE);
mCryptoLayout.setVisibility(View.VISIBLE);

mBottomNavigationView.setOnItemSelectedListener(menuItem -> {
final int menuItemId = menuItem.getItemId();
if (menuItemId == R.id.action_wallet_portfolio) {
mViewPager.setCurrentItem(PORTFOLIO_FRAGMENT_POSITION, true);
} else if (menuItemId == R.id.action_wallet_activity) {
mViewPager.setCurrentItem(TRANSACTIONS_ACTIVITY_FRAGMENT_POSITION, true);
} else if (menuItemId == R.id.action_wallet_accounts) {
mViewPager.setCurrentItem(ACCOUNTS_FRAGMENT_POSITION, true);
} else if (menuItemId == R.id.action_wallet_explore) {
mViewPager.setCurrentItem(MARKET_FRAGMENT_POSITION, true);
}
return true;
});

if (mKeyringService != null) {
mKeyringService.isWalletBackedUp(backed_up -> {
if (!backed_up) {
showWalletBackupBanner();
} else {
findViewById(R.id.wallet_backup_banner).setVisibility(View.GONE);
}
});
}
WalletUtils.openWebWallet();
}

private void addBackupWalletSequence(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class WalletUtils {
private static final String ACCOUNT_INFO = "accountInfo";
private static final String BLOCKCHAIN_TOKEN = "blockchainToken";
private static final String NETWORK_INFO = "networkInfo";
private static String TAG = "WalletUtils";
private static final String TAG = "WalletUtils";

private static String getNewAccountPrefixForCoin(@CoinType.EnumType int coinType) {
switch (coinType) {
Expand Down
5 changes: 0 additions & 5 deletions android/java/res/menu/wallet_search.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,4 @@
android:title="@string/brave_wallet_help_center"
app:iconTint="@color/wallet_text_color"
app:showAsAction="never" />
<item android:id="@+id/open_web_wallet"
android:icon="@drawable/ic_crypto_wallets"
android:title="@string/open_web_wallet"
app:iconTint="@color/wallet_text_color"
app:showAsAction="never" />
</menu>
3 changes: 0 additions & 3 deletions browser/ui/android/strings/android_brave_strings.grd
Original file line number Diff line number Diff line change
Expand Up @@ -4082,9 +4082,6 @@ If you don't accept this request, VPN will not reconnect and your internet conne
<message name="IDS_BRAVE_LEO_CONFIRM_TEXT" desc="Text for Leo confirm button text.">
Confirm
</message>
<message name="IDS_OPEN_WEB_WALLET" desc="Label for open in browser web wallet action">
Open web wallet
</message>
<message name="IDS_ELLIPSIS_TEXT" desc="Generic ellipsis text" translateable="false">
...
</message>
Expand Down

0 comments on commit 538091a

Please sign in to comment.