Skip to content

Commit f0f71ad

Browse files
chore: code improvements informational severity (#124)
* chore: mitigate 1 * chore: mitigate 2 * chore: mitigate 3 * chore: mitigate 4 * chore: mitigate 5 * chore: mitigate 6 * chore: mitigate 7 * chore: mitigate 8 * chore: mitigate 9 * chore: mitigate 10 * chore: mitigate 11 * chore: mitigate 12 * chore: mitigate 13 * chore: mitigate 14 * fix: Jsdoc --------- Co-authored-by: Branko Bosnic <[email protected]>
1 parent 414560e commit f0f71ad

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

packages/desktop/wallet.log

Whitespace-only changes.

packages/shared/lib/migration.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -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
*/
704706
export 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
*/
831834
export 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

Comments
 (0)