javascript-solid-server 0.0.126 → 0.0.127

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "javascript-solid-server",
3
- "version": "0.0.126",
3
+ "version": "0.0.127",
4
4
  "description": "A minimal, fast Solid server",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -181,9 +181,9 @@ async function checkAuthorizations(authorizations, targetUrl, agentWebId, requir
181
181
  }
182
182
 
183
183
  // Paid access: check balance and deduct
184
- const balance = getBalance(ledger, agentWebId);
184
+ const balance = getBalance(ledger, agentWebId, currency);
185
185
  if (cost > 0 && balance >= cost) {
186
- debit(ledger, agentWebId, cost, currency === 'sats' ? 'sat' : currency);
186
+ debit(ledger, agentWebId, cost, currency);
187
187
  const { writeLedger } = await import('../webledger.js');
188
188
  await writeLedger(ledger);
189
189
  return { allowed: true, paid: cost };