Skip to content

Commit 58305a7

Browse files
committed
Fix incorrect caveat config
1 parent 0163318 commit 58305a7

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

packages/delegator-e2e/test/experimental/erc7710sendTransactionWithDelegation.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,15 +238,15 @@ test('Bob attempts to call the increment function directly', async () => {
238238
test('Bob sends a native value transaction with delegation', async () => {
239239
await deploySmartAccount(aliceSmartAccount);
240240

241-
const allowance = 100n;
241+
const maxAmount = 100n;
242242
const recipient = randomAddress();
243243

244244
const { DelegationManager: delegationManager } =
245245
aliceSmartAccount.environment;
246246

247247
const caveats = createCaveatBuilder(aliceSmartAccount.environment).addCaveat(
248248
'nativeTokenTransferAmount',
249-
allowance,
249+
{ maxAmount },
250250
);
251251

252252
const delegation = createDelegation({
@@ -268,13 +268,13 @@ test('Bob sends a native value transaction with delegation', async () => {
268268
chain,
269269
}).extend(erc7710WalletActions());
270270

271-
await fundAddress(aliceSmartAccount.address, allowance);
271+
await fundAddress(aliceSmartAccount.address, maxAmount);
272272

273273
const transactionHash = await bobWalletClient.sendTransactionWithDelegation({
274274
account: bob,
275275
chain,
276276
to: recipient,
277-
value: allowance,
277+
value: maxAmount,
278278
permissionsContext,
279279
delegationManager,
280280
});
@@ -283,5 +283,5 @@ test('Bob sends a native value transaction with delegation', async () => {
283283

284284
const balance = await publicClient.getBalance({ address: recipient });
285285

286-
expect(balance).toEqual(allowance);
286+
expect(balance).toEqual(maxAmount);
287287
});

0 commit comments

Comments
 (0)