From 08c01f73c03bf34aba9e96d0383278300d469937 Mon Sep 17 00:00:00 2001 From: yanguoyu <841185308@qq.com> Date: Mon, 4 Mar 2024 21:44:17 +0800 Subject: [PATCH] fix: Fix sending sudt to a new acp cell with extra 142 CKB by offline sign --- packages/neuron-ui/src/components/HardwareSign/hooks.ts | 2 ++ packages/neuron-ui/src/components/PasswordRequest/hooks.ts | 3 ++- packages/neuron-ui/src/services/remote/offline.ts | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/neuron-ui/src/components/HardwareSign/hooks.ts b/packages/neuron-ui/src/components/HardwareSign/hooks.ts index cec9567a50..2ccc38400b 100644 --- a/packages/neuron-ui/src/components/HardwareSign/hooks.ts +++ b/packages/neuron-ui/src/components/HardwareSign/hooks.ts @@ -85,6 +85,8 @@ export default ({ switch (offlineSignJSON?.type) { case OfflineSignType.CreateSUDTAccount: return 'create-sudt-account' + case OfflineSignType.SendAcpSUDTToNewCell: + return 'send-acp-sudt-to-new-cell' case OfflineSignType.SendSUDT: return 'send-sudt' case OfflineSignType.UnlockDAO: diff --git a/packages/neuron-ui/src/components/PasswordRequest/hooks.ts b/packages/neuron-ui/src/components/PasswordRequest/hooks.ts index 6f8991b5d6..1b1e6ad9d9 100644 --- a/packages/neuron-ui/src/components/PasswordRequest/hooks.ts +++ b/packages/neuron-ui/src/components/PasswordRequest/hooks.ts @@ -56,9 +56,10 @@ export default ({ switch (actionType) { case 'create-sudt-account': return OfflineSignType.CreateSUDTAccount + case 'send-acp-sudt-to-new-cell': + return OfflineSignType.SendAcpSUDTToNewCell case 'send-ckb-asset': case 'send-acp-ckb-to-new-cell': - case 'send-acp-sudt-to-new-cell': case 'transfer-to-sudt': case 'send-sudt': return OfflineSignType.SendSUDT diff --git a/packages/neuron-ui/src/services/remote/offline.ts b/packages/neuron-ui/src/services/remote/offline.ts index 1743cd2a46..0d2a4d917f 100644 --- a/packages/neuron-ui/src/services/remote/offline.ts +++ b/packages/neuron-ui/src/services/remote/offline.ts @@ -13,6 +13,7 @@ export enum OfflineSignType { UnlockDAO = 'UnlockDAO', CreateSUDTAccount = 'CreateSUDTAccount', SendSUDT = 'SendSUDT', + SendAcpSUDTToNewCell = 'SendAcpSUDTToNewCell', SendFromMultisigOnlySig = 'SendFromMultisigOnlySig', Invalid = 'Invalid', }