Skip to content

Commit

Permalink
fix: properly resolve the promise when balance is ready
Browse files Browse the repository at this point in the history
  • Loading branch information
aramalipoor committed Dec 18, 2022
1 parent 2b279a4 commit b9c36ca
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,8 @@ export class BalanceRampClient {
currentBalance = await signer.getBalance();
} catch (e) {}
}

return;
} else if (requiredBalance.outputTokenAddress) {
/**
* For ERC20 balance
Expand All @@ -615,6 +617,8 @@ export class BalanceRampClient {
);
} catch (e) {}
}

return;
}

throw new Error(`Missing outputTokenAddress for regularlyCheckForBalance`);
Expand Down

0 comments on commit b9c36ca

Please sign in to comment.