Skip to content

Commit

Permalink
fix: system setup
Browse files Browse the repository at this point in the history
  • Loading branch information
btspoony committed Jan 30, 2025
1 parent cbe8f20 commit 83f7faa
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ transaction() {
// --- Start --- Ensure Key is enough ---
let firstKey = acct.keys.get(keyIndex: 0) ?? panic("No Key 0")
let currentAmount = acct.keys.count
let amtToAdd: UInt64 = currentAmount < 1000 ? 1000 - currentAmount : 0
let amtToAdd: UInt64 = currentAmount < 100 ? 100 - currentAmount : 0

var i: UInt64 = 0
while i < amtToAdd {
Expand Down
7 changes: 3 additions & 4 deletions packages/common/src/services/acctPool.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,22 @@ export class AccountsPoolService extends Service {
onFinalized: async (txid, _status, errorMsg) => {
if (errorMsg) {
elizaLogger.error(
`Failed to initialize main account: ${errorMsg}`,
`Failed to initialize main account: ${errorMsg}`
);
reject(new Error(errorMsg));
} else {
elizaLogger.info(
"Main account initialized by txid:",
txid,
txid
);
resolve();
}
},
},
}
)
.catch(reject);
});
}
elizaLogger.info("AccountsPoolService initialized");
}

// ----- Customized methods -----
Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/di.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ globalContainer
let jsonObjcet: Record<string, unknown> | null = null;
for (const tryPath of pathsToTry) {
try {
jsonObjcet = await import(tryPath, { with: { type: "json" } });
jsonObjcet = (await import(tryPath, { with: { type: "json" } }))
.default;
if (jsonObjcet) {
elizaLogger.info(
`Successfully loaded 'flow.json' from: ${tryPath}`,
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/services/wallet.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ export class FlowWalletService extends Service {
this._maxKeyIndex = acctInfo.keys.length;

FlowWalletService.isInitialized = true;
elizaLogger.info("FlowWalletService initialized");
}

/**
Expand Down

0 comments on commit 83f7faa

Please sign in to comment.