Skip to content

Commit 4d41291

Browse files
grypezclaude
andcommitted
fix(evm-wallet-experiment): getBalance queries delegator balance, not delegate
The delegator holds the tokens; the delegate only has permission to transfer them. encodeBalanceOf(delegation.delegate) returned the delegate's own balance, which is irrelevant to the delegation's spending capacity. Query delegation.delegator instead. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 693337a commit 4d41291

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/evm-wallet-experiment/src/lib/delegation-twin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ export function makeDelegationTwin(
217217
methods.getBalance = async (): Promise<bigint> => {
218218
const result = await readFn({
219219
to: token,
220-
data: encodeBalanceOf(delegation.delegate),
220+
data: encodeBalanceOf(delegation.delegator),
221221
});
222222
return decodeBalanceOfResult(result);
223223
};

0 commit comments

Comments
 (0)