Skip to content

Commit bb7b7ba

Browse files
fix: use default balance for payment condition check
Simplifies balance lookup to use default currency (satoshi). Multi-currency support to follow in a separate PR.
1 parent edc57ea commit bb7b7ba

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/wac/checker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ async function checkAuthorizations(authorizations, targetUrl, agentWebId, requir
169169
if (agentWebId && cost > 0) {
170170
try {
171171
const ledger = await readLedger();
172-
const balance = getBalance(ledger, agentWebId, currency === 'sats' ? 'sat' : currency);
172+
const balance = getBalance(ledger, agentWebId);
173173
if (balance >= cost) {
174174
// Deduct and grant access
175175
debit(ledger, agentWebId, cost, currency === 'sats' ? 'sat' : currency);

0 commit comments

Comments
 (0)