From 77b75ef2bc5649aeb10c5edefdc6aa639b68b405 Mon Sep 17 00:00:00 2001 From: Timofei Domnikov Date: Thu, 9 Mar 2023 11:23:44 +0300 Subject: [PATCH] KEEP-1193: fix order signing with ledger account --- src/wallets/getTxVersions.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/wallets/getTxVersions.ts b/src/wallets/getTxVersions.ts index e1ada0d98..636c537d0 100644 --- a/src/wallets/getTxVersions.ts +++ b/src/wallets/getTxVersions.ts @@ -6,10 +6,9 @@ type TxVersions = { [T in MessageTx['type']]: Array< NonNullable['version']> >; -}; +} & Record<'1000' | '1001' | '1002' | '1003', number[]>; -const DEFAULT_TX_VERSIONS: TxVersions & - Record<'1000' | '1001' | '1002' | '1003', number[]> = { +const DEFAULT_TX_VERSIONS: TxVersions = { [TRANSACTION_TYPE.ISSUE]: [3, 2], [TRANSACTION_TYPE.TRANSFER]: [3, 2], [TRANSACTION_TYPE.REISSUE]: [3, 2], @@ -45,6 +44,10 @@ const LEDGER_TX_VERSIONS: TxVersions = { [TRANSACTION_TYPE.SET_ASSET_SCRIPT]: [2, 1], [TRANSACTION_TYPE.INVOKE_SCRIPT]: [2, 1], [TRANSACTION_TYPE.UPDATE_ASSET_INFO]: [1], + '1000': [1], + '1001': [1], + '1002': [4, 3, 2, 1], + '1003': [1, 0], }; export function getTxVersions(accountType: PreferencesAccount['type']) {