Skip to content

Commit 9b97ae7

Browse files
committed
fix(react-native): restore EVM account check for add token button
EVM accounts should open AddCustomTokenActivity (manual ERC-20 address import), while Flow accounts use the RN Add Tokens catalog screen. The check was accidentally removed when the RN redirect was added. Closes #1275
1 parent 652cb46 commit 9b97ae7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/src/main/java/com/flowfoundation/wallet/page/wallet/presenter/WalletHeaderPresenter.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,11 @@ class WalletHeaderPresenter(
9191
flAddToken.gone()
9292
} else {
9393
flAddToken.setOnClickListener {
94-
ReactNativeActivity.launch(view.context, RNBridge.ScreenType.ADD_TOKENS)
94+
if (WalletManager.isEVMAccountSelected()) {
95+
com.flowfoundation.wallet.page.token.custom.AddCustomTokenActivity.launch(view.context)
96+
} else {
97+
ReactNativeActivity.launch(view.context, RNBridge.ScreenType.ADD_TOKENS)
98+
}
9599
}
96100
cvSwap.setOnClickListener {
97101
activity?.let {

0 commit comments

Comments
 (0)