Skip to content

Commit fbf1be1

Browse files
authored
fix(entrykit): make required gas balance non-zero (#3691)
1 parent b94aca6 commit fbf1be1

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

.changeset/seven-pets-sell.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@latticexyz/entrykit": patch
3+
---
4+
5+
Increased required balance/allowance to greater than zero.

packages/entrykit/src/onboarding/usePrerequisites.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ export function getPrequisitesQueryOptions({
4747
queryClient.fetchQuery(getDelegationQueryOptions({ client, worldAddress, userAddress, sessionAddress })),
4848
]);
4949
// TODO: figure out better approach than null for allowance/spender when no quarry paymaster
50-
const hasAllowance = allowance == null || allowance >= 0n;
50+
const hasAllowance = allowance == null || allowance > 0n;
5151
const isSpender = spender == null ? true : spender;
52-
const hasGasBalance = sessionBalance == null || sessionBalance.value >= 0n;
52+
const hasGasBalance = sessionBalance == null || sessionBalance.value > 0n;
5353
return {
5454
sessionAddress,
5555
hasAllowance,

0 commit comments

Comments
 (0)