Skip to content

Commit 8b8dfd0

Browse files
committed
Remove 0xstring type, fix bigint <> number comparison
1 parent d561e3e commit 8b8dfd0

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

packages/delegation-toolkit/src/caveatBuilder/erc721BalanceChangeBuilder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export const erc721BalanceChangeBuilder = (
4848
throw new Error('Invalid recipient: must be a valid address');
4949
}
5050

51-
if (amount <= 0) {
51+
if (amount <= 0n) {
5252
throw new Error('Invalid balance: must be a positive number');
5353
}
5454

packages/delegation-toolkit/src/caveatBuilder/exactCalldataBuilder.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { createExactCalldataTerms } from '@metamask/delegation-core';
2+
import type { Hex } from 'viem';
23

34
import type { Caveat, DeleGatorEnvironment } from '../types';
45

@@ -8,7 +9,7 @@ export type ExactCalldataBuilderConfig = {
89
/**
910
* The exact calldata that must be matched as a hex string.
1011
*/
11-
calldata: `0x${string}`;
12+
calldata: Hex;
1213
};
1314

1415
/**

0 commit comments

Comments
 (0)