@@ -456,7 +456,7 @@ export function exportMigrationLog(): void {
456456 *
457457 * @returns {Promise<void> }
458458 */
459- export const getLedgerMigrationData = (
459+ export const getLedgerMigrationData = async (
460460 getAddressFn : ( index : number ) => Promise < string > ,
461461 callback : ( ) => void ,
462462 initialAddressIndex : number = 0
@@ -697,9 +697,11 @@ export const createMinedLedgerMigrationBundle = (
697697 * @method createLedgerMigrationBundle
698698 *
699699 * @param {number } bundleIndex
700+ * @param {MigrationAddress } migrationAddress
700701 * @param {function } prepareTransfersFn
702+ * @param {function } callback
701703 *
702- * @returns {Promise }
704+ * @returns {Promise<MigrationBundle> }
703705 */
704706export const createLedgerMigrationBundle = (
705707 bundleIndex : number ,
@@ -788,6 +790,7 @@ export const sendLedgerMigrationBundle = (bundleHash: string, trytes: string[]):
788790 * @method sendOffLedgerMigrationRequest
789791 *
790792 * @param {string[] } trytes
793+ * @param {number } bundleIndex
791794 *
792795 * @returns {Promise<Receipt> }
793796 */
@@ -823,10 +826,10 @@ export const sendOffLedgerMigrationRequest = async (trytes: string[], bundleInde
823826 *
824827 * @method createMigrationBundle
825828 *
826- * @param {number } bundleIndex
829+ * @param {Bundle } bundle
827830 * @param {MigrationAddress } migrationAddress
828831 *
829- * @returns {Promise }
832+ * @returns {Promise<string[]> }
830833 */
831834export const createMigrationBundle = async ( bundle : Bundle , migrationAddress : MigrationAddress ) : Promise < string [ ] > => {
832835 const { seed } = get ( migration )
@@ -864,11 +867,9 @@ export const createMigrationBundle = async (bundle: Bundle, migrationAddress: Mi
864867 } ) )
865868
866869 try {
867- const bundleTrytes : string [ ] = await prepareTransfers ( get ( seed ) , transfers , {
870+ return await prepareTransfers ( get ( seed ) , transfers , {
868871 inputs : inputsForTransfer ,
869872 } )
870-
871- return bundleTrytes
872873 } catch ( err ) {
873874 throw new Error ( err . message || 'Failed to prepare transfers' )
874875 }
@@ -941,9 +942,7 @@ export async function fetchReceiptForRequest(requestId: string): Promise<any> {
941942 throw new Error ( `Message: ${ err . Message } , Error: ${ err . Error } ` )
942943 } )
943944 }
944- const receipt = await response . json ( )
945-
946- return receipt
945+ return await response . json ( )
947946 } catch ( error ) {
948947 console . error ( error )
949948 throw new Error ( error . message )
@@ -1014,8 +1013,9 @@ const _sendMigrationBundle = (hash: string, data: SendMigrationBundleResponse):
10141013 *
10151014 * @method assignBundleHash
10161015 *
1017- * @param inputAddressIndexes
1018- * @param migrationBundle
1016+ * @param {number[] } inputAddressIndexes
1017+ * @param {MigrationBundle } migrationBundle
1018+ * @param {boolean } didMine
10191019 *
10201020 * @returns {void }
10211021 */
@@ -1066,7 +1066,7 @@ export const assignBundleHash = (
10661066 * @param {number } bundleIndex
10671067 * @param {string[] } trytes
10681068 * @param {boolean } didMine
1069- * @param [ number] migrationBundleCrackability
1069+ * @param { number } migrationBundleCrackability
10701070 *
10711071 * @returns {void }
10721072 */
0 commit comments