Skip to content

Commit

Permalink
chore: Sync main branch with v5.5.2 (#6483)
Browse files Browse the repository at this point in the history
* Update .env.version

* fix: fix the issue where the account selector does not work in the market module. (#6414)

* style: modify the background color and hover color of TradingView's indicator. (#6415)

* fix: several sentry issues (#6426)

* fix: sqlite limit (#6425)

* chore: add requestId on sentry xhr breadcrumb (#6427)

* fix: qr psbt compare (#6428)

(cherry picked from commit d89b918)

* feat: Add DTC network (#6431)

* Feat: sol sign message OK-34533 (#6420)

* feat: sol sign message on headware

* feat: update hardware sdk version

* chore: fix lint

* optimize: sol sign message format

* chore: update js sdk 1.0.17 (#6432)

* fix: fix the crash when copying in iCloud sync on iOS. (#6433)

* Update react-native+0.73.7.patch

* Update react-native+0.73.7.patch

* Optimize/kaspa transfer OK-34592 (#6423)

* feat: optimize kaspa transfer

* optimize: hardware transafer kas

* Revert "Feat: sol sign message OK-34533 (#6420)"

This reverts commit 498a5df.

* fix: fix the issue of using a mismatched derviceType when creating an address.

* fix: fix deriveType type

* chore: update 5.5.2

* fix: fix the issue where pressing Enter would trigger paste in some forms. (#6471)

* fix: fix the issue where the screen module in Electron is loaded prematurely with a low probability. (#6473)

* Update .env.version

* fix: fix the issue where the screen module in Electron is loaded prematurely with a low probability.

---------

Co-authored-by: Leon <[email protected]>

* fix: Correct Lighting withdrawal invoice amount (#6476)

* Revert "fix: fix the issue where the screen module in Electron is loaded prematurely with a low probability. (#6473)"

This reverts commit f99ade3.

* chore: prohibit the use of the screen module in Electron Sentry.

---------

Co-authored-by: huhuanming <[email protected]>
Co-authored-by: weatherstar <[email protected]>
Co-authored-by: ByteZhang <[email protected]>
Co-authored-by: morizon <[email protected]>
  • Loading branch information
5 people authored Jan 10, 2025
1 parent 64a8053 commit 33e0760
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 5 deletions.
24 changes: 24 additions & 0 deletions apps/desktop/src-electron/sentry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,30 @@ export const initSentry = () => {
'integrity-failure',
],
}),
Sentry.electronBreadcrumbsIntegration({
app: (name) => !name.startsWith('remote-'),
autoUpdater: true,
webContents: (name) =>
['dom-ready', 'context-menu', 'load-url', 'destroyed'].includes(name),
browserWindow: (name) =>
[
'closed',
'close',
'unresponsive',
'responsive',
'show',
'blur',
'focus',
'hide',
'maximize',
'minimize',
'restore',
'enter-full-screen',
'leave-full-screen',
].includes(name),
screen: false,
powerMonitor: true,
}),
],
});
};
5 changes: 4 additions & 1 deletion packages/components/src/primitives/Button/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { ButtonHTMLAttributes } from 'react';
import { useMemo } from 'react';

import {
Expand All @@ -18,6 +19,7 @@ import type { IIconProps, IKeyOfIcons } from '../Icon';
import type { ColorTokens, FontSizeTokens, ThemeableStackProps } from 'tamagui';

export interface IButtonProps extends ThemeableStackProps {
type?: ButtonHTMLAttributes<HTMLButtonElement>['type'];
size?: 'small' | 'medium' | 'large';
variant?: 'secondary' | 'tertiary' | 'primary' | 'destructive';
icon?: IKeyOfIcons;
Expand Down Expand Up @@ -145,10 +147,11 @@ const useSizeStyles = (size: IButtonProps['size']) =>
export const ButtonFrame = styled(ThemeableStack, {
tag: 'button',
role: 'button',
type: 'button',
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
});
} as IButtonProps);

function ButtonIcon({
variant,
Expand Down
12 changes: 10 additions & 2 deletions packages/kit/src/components/AddressInput/plugins/clipboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { type FC, useCallback } from 'react';

import { useIntl } from 'react-intl';

import { IconButton, useClipboard } from '@onekeyhq/components';
import { IconButton, Toast, useClipboard } from '@onekeyhq/components';
import { ETranslations } from '@onekeyhq/shared/src/locale';
import platformEnv from '@onekeyhq/shared/src/platformEnv';
import { EInputAddressChangeType } from '@onekeyhq/shared/types/address';
Expand All @@ -20,7 +20,15 @@ export const ClipboardPlugin: FC<IAddressPluginProps> = ({
const text = await getClipboard();
onChange?.(text);
onInputTypeChange?.(EInputAddressChangeType.Paste);
}, [getClipboard, onChange, onInputTypeChange]);

if (text?.length) {
Toast.success({
title: intl.formatMessage({
id: ETranslations.feedback_address_pasted_text,
}),
});
}
}, [getClipboard, intl, onChange, onInputTypeChange]);
return platformEnv.isExtensionUiPopup ||
platformEnv.isExtensionUiSidePanel ? null : (
<IconButton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export type IActionItemsProps = {
showButtonStyle?: boolean;
hiddenIfDisabled?: boolean;
verticalContainerProps?: IStackProps;
} & Partial<IButtonProps & IIconButtonProps>;
} & Partial<Omit<IButtonProps, 'type'> & Omit<IIconButtonProps, 'type'>>;

function ActionItem({
icon = 'PlaceholderOutline',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function LnurlWithdrawModal() {
const { serviceLightning } = backgroundApiProxy;
const formValue = useFormReturn.getValues();

const amount = new BigNumber(formValue.amount).times(1000).toNumber(); // convert to millisatoshis
const amount = new BigNumber(formValue.amount).toNumber();
try {
const invoice = await serviceLightning.createInvoice({
networkId,
Expand Down

0 comments on commit 33e0760

Please sign in to comment.