1- // addr_test1qrujg5s2ws0ntmrgykm8ecfwx5n3xgt4zc0hzpg5ek5l78u8558mf5hyh6j38p9zmdmrdphndlls6p3jq3f702ms2awsj5gd95
2-
1+ import { map } from 'lodash' ;
32import blakejs from 'blakejs' ;
43import { encode } from 'borc' ;
54import { utils } from '@cardano-foundation/ledgerjs-hw-app-cardano' ;
@@ -10,6 +9,7 @@ import {
109 groupTokensByPolicyId ,
1110} from './hardwareWalletUtils' ;
1211
12+ import type { AddressStyle } from '../api/addresses/types' ;
1313import type {
1414 CoinSelectionInput ,
1515 CoinSelectionWithdrawal ,
@@ -167,7 +167,7 @@ export const toTxOutputAssets = (assets: CoinSelectionAssetsType) => {
167167 const assetMap = new Map < Buffer , number > ( ) ;
168168
169169 // @ts -ignore ts-migrate(2769) FIXME: No overload matches this call.
170- _ . map ( tokens , ( token ) => {
170+ map ( tokens , ( token ) => {
171171 // @ts -ignore ts-migrate(2339) FIXME: Property 'assetName' does not exist on type 'unkno... Remove this comment to see the full error message
172172 assetMap . set ( Buffer . from ( token . assetName , 'hex' ) , token . quantity ) ;
173173 } ) ;
@@ -217,7 +217,7 @@ export const toTxWithdrawal = (withdrawals: Array<CoinSelectionWithdrawal>) => {
217217 function encodeCBOR ( encoder : any ) {
218218 const withdrawalMap = new Map ( ) ;
219219
220- _ . map ( withdrawals , ( withdrawal ) => {
220+ map ( withdrawals , ( withdrawal ) => {
221221 const rewardAccount = utils . bech32_decodeAddress ( withdrawal . stakeAddress ) ;
222222 const coin = withdrawal . amount . quantity ;
223223 withdrawalMap . set ( rewardAccount , coin ) ;
@@ -340,7 +340,16 @@ export const toTxBody = ({
340340 withdrawals,
341341 txAuxiliaryData,
342342 txAuxiliaryDataHash,
343- } : TxBodyType ) => {
343+ } : {
344+ txInputs : Array < TxInputType > ;
345+ txOutputs : Array < TxOutputType > ;
346+ txAuxiliaryData ?: TxAuxiliaryData ;
347+ txAuxiliaryDataHash ?: string ;
348+ fee : number ;
349+ ttl : number ;
350+ certificates : Array < Certificate | null | undefined > ;
351+ withdrawals : TxWithdrawalsType | null | undefined ;
352+ } ) => {
344353 const txFee = toTxFee ( fee ) ;
345354 const txTtl = toTxTtl ( ttl ) ;
346355 const txCerts = certificates ;
0 commit comments