Skip to content

Commit

Permalink
KEEP-1193: fix order signing with ledger account
Browse files Browse the repository at this point in the history
  • Loading branch information
domnikov-timofei committed Mar 9, 2023
1 parent 544f3cc commit 77b75ef
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/wallets/getTxVersions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ type TxVersions = {
[T in MessageTx['type']]: Array<
NonNullable<Extract<MessageTx, { type: T }>['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],
Expand Down Expand Up @@ -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']) {
Expand Down

0 comments on commit 77b75ef

Please sign in to comment.