Skip to content

Commit f47c5e7

Browse files
committed
fix input accounts param
1 parent 7364333 commit f47c5e7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

libs/ledger-live-common/src/__tests__/migration/account-migration.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ const testSyncAccount = async (account: Account) => {
212212

213213
(async () => {
214214
// list of accounts from input file
215-
const inputAccounts: AccountRaw[] = [];
215+
let inputAccounts: AccountRaw[] = [];
216216

217217
if (inputFile) {
218218
if (!existsSync(inputFile)) {
@@ -222,7 +222,9 @@ const testSyncAccount = async (account: Account) => {
222222
);
223223
} else {
224224
// if there's a input file we parse it
225-
inputAccounts.push(JSON.parse(readFileSync(inputFile, "utf8")));
225+
inputAccounts = JSON.parse(readFileSync(inputFile, "utf8"));
226+
// console.log({fileRead})
227+
// inputAccounts.push(JSON.parse(readFileSync(inputFile, "utf8")));
226228
}
227229
}
228230

@@ -247,11 +249,13 @@ const testSyncAccount = async (account: Account) => {
247249
return true;
248250
},
249251
);
252+
console.log({inputAccounts, defaultAddresses, migrationAddresses, filteredAddresses})
250253

251254
let syncedAccounts: PromiseSettledResult<AccountRaw>[] = [];
252255

253256
// if --inputFile we use the addresses from the input file otherwise from addresses.ts
254257
if (inputAccounts.length) {
258+
console.log({inputAccounts})
255259
syncedAccounts = await Promise.allSettled(
256260
(filteredAddresses as AccountRaw[]).map(rawAccount => {
257261
const account = fromAccountRaw(rawAccount);

0 commit comments

Comments
 (0)