Skip to content

Commit

Permalink
fix(server): test promise not resolving
Browse files Browse the repository at this point in the history
  • Loading branch information
Kalovelo committed Jun 27, 2022
1 parent 06ff6a9 commit dfa99e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nodejs/src/services/sdk/sdk.service.development.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const BaseAe = async (
return sdk;
};

export const spendPromise = (async () => {
export const spendPromise = () => (async () => {
const ae = await BaseAe({ networkId, withoutGenesisAccount: false });
await ae.awaitHeight(2);
await ae.spend(1e26, account.publicKey);
Expand All @@ -55,7 +55,7 @@ export const spendPromise = (async () => {
export async function getSdk({
withoutAccount,
}: { withoutAccount?: boolean } = {}): Promise<AeSdk> {
await spendPromise;
await spendPromise();

return BaseAe({
...(withoutAccount === true
Expand Down

0 comments on commit dfa99e8

Please sign in to comment.