Skip to content

Commit

Permalink
fix: fix the issue where TextInput can't scroll & prioritize hd/hw/qr…
Browse files Browse the repository at this point in the history
…/imported accounts when sending. (#6582)
  • Loading branch information
huhuanming authored Jan 22, 2025
1 parent bea6674 commit 1a20796
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
14 changes: 9 additions & 5 deletions packages/kit-bg/src/services/ServiceAccountProfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,10 +398,15 @@ class ServiceAccountProfile extends ServiceBase {
);
if (accountItem) {
item = accountItem;
} else {
// Fix the issue where an address can be both an HD/HW account and a watch-only account
// When an address exists in both HD/HW wallet and watch-only wallet,
// prioritize showing the HD/HW wallet name since it has higher security level.
}

// Fix the issue where an address can be both an HD/HW account and a watch-only account
// When an address exists in both HD/HW wallet and watch-only wallet,
// prioritize showing the HD/HW wallet name since it has higher security level.
if (
accountUtils.isWatchingAccount({ accountId: item.accountId }) ||
accountUtils.isOthersAccount({ accountId: item.accountId })
) {
const ownAccountItem = walletAccountItems.find((a) => {
const accountParams = { accountId: a.accountId };
return (
Expand All @@ -420,7 +425,6 @@ class ServiceAccountProfile extends ServiceBase {
console.error(e);
// pass
}

result.walletAccountName = `${item.walletName} / ${item.accountName}`;
result.walletAccountId = item.accountId;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { TextAreaInput } from '@onekeyhq/components';
import platformEnv from '@onekeyhq/shared/src/platformEnv';

function DataViewer({ data }: { data: string }) {
return (
Expand All @@ -12,7 +13,8 @@ function DataViewer({ data }: { data: string }) {
lineHeight={16}
bg="$bg"
h="$60"
editable={false}
editable={platformEnv.isNativeAndroid}
showSoftInputOnFocus={false}
value={data}
/>
);
Expand Down

0 comments on commit 1a20796

Please sign in to comment.