From 18edbd461832aeb809bf819dc5a191fdd0f856a4 Mon Sep 17 00:00:00 2001 From: Hodor Date: Fri, 8 Nov 2024 17:58:16 +0800 Subject: [PATCH 1/3] fix: swap stats (#2606) --- src/ui/utils/sendTransaction.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ui/utils/sendTransaction.ts b/src/ui/utils/sendTransaction.ts index 9fb9afdab74..426fac1e2fb 100644 --- a/src/ui/utils/sendTransaction.ts +++ b/src/ui/utils/sendTransaction.ts @@ -445,6 +445,16 @@ export const sendTransaction = async ({ } }; + wallet.reportStats('signTransaction', { + type: currentAccount.brandName, + category: KEYRING_CATEGORY_MAP[currentAccount.type], + chainId: chain.serverId, + createdBy: ga ? 'rabby' : 'dapp', + source: ga?.source || '', + trigger: ga?.trigger || '', + networkType: chain?.isTestnet ? 'Custom Network' : 'Integrated Network', + }); + // submit tx let hash = ''; try { From d435e8b7ab24c5a0b5df7131232a5fa715c6cf49 Mon Sep 17 00:00:00 2001 From: vvvvvv1vvvvvv <86296331+vvvvvv1vvvvvv@users.noreply.github.com> Date: Fri, 8 Nov 2024 17:58:49 +0800 Subject: [PATCH 2/3] fix: balance change display (#2605) --- .../Approval/components/TxComponents/BalanceChangeWrapper.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/views/Approval/components/TxComponents/BalanceChangeWrapper.tsx b/src/ui/views/Approval/components/TxComponents/BalanceChangeWrapper.tsx index 56b4391d8ad..d3907cf95b7 100644 --- a/src/ui/views/Approval/components/TxComponents/BalanceChangeWrapper.tsx +++ b/src/ui/views/Approval/components/TxComponents/BalanceChangeWrapper.tsx @@ -44,7 +44,7 @@ export const BalanceChangeWrapper: React.FC = ({ balanceChange.receive_nft_list.length + balanceChange.receive_token_list.length + balanceChange.send_nft_list.length + - balanceChange.send_nft_list.length <= + balanceChange.send_token_list.length <= 0 ) { return true; From 754c7b7350bcb16477f6dd82e4564a4c97da041c Mon Sep 17 00:00:00 2001 From: heisenberg Date: Mon, 11 Nov 2024 14:16:25 +0800 Subject: [PATCH 3/3] fix: keystone exception when saving advanced settings --- src/ui/views/HDManager/QRCodeManager.tsx | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/ui/views/HDManager/QRCodeManager.tsx b/src/ui/views/HDManager/QRCodeManager.tsx index ee97e0bd59b..e81351c8467 100644 --- a/src/ui/views/HDManager/QRCodeManager.tsx +++ b/src/ui/views/HDManager/QRCodeManager.tsx @@ -104,19 +104,25 @@ export const QRCodeManager: React.FC = ({ brand }) => { try { setLoading(true); - if (type !== setting.type) { + if (setting.type && type !== setting.type) { /** * This code is written to be consistent with the behavior of importing wallets via QR Code. */ await removeAddressAndForgetDevice(false); } - await wallet.requestKeyring( - KEYSTONE_TYPE, - 'getAddressesViaUSB', - keyringId, - type - ); + try { + await wallet.requestKeyring( + KEYSTONE_TYPE, + 'getAddressesViaUSB', + keyringId, + type + ); + } catch (e) { + // ignore + console.error(e); + } + await getCurrentAccounts(); setLoading(false); } catch (error) {