Skip to content

Commit 061d5b1

Browse files
authored
chore: biome 2.4.4 (#626)
1 parent 356a1d2 commit 061d5b1

10 files changed

Lines changed: 58 additions & 54 deletions

File tree

docs/src/components/contract-addresses.astro

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,15 @@ const contractOrder = [
3333
'endorsements',
3434
] as const
3535
36+
// biome-ignore lint/correctness/noUnusedVariables: astro...
3637
const rows = contractOrder
3738
.filter((key) => {
39+
// @ts-expect-error - chain.contracts is a record of ChainContract
3840
const contract = chain.contracts[key]
3941
return contract?.address && contract.address !== '0x0000000000000000000000000000000000000000'
4042
})
4143
.map((key) => {
44+
// @ts-expect-error - chain.contracts is a record of ChainContract
4245
const contract = chain.contracts[key]
4346
const address = contract.address
4447
return {

packages/synapse-core/src/sp/sp.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
AddPiecesError,
66
CreateDataSetError,
77
DeletePieceError,
8-
DownloadPieceError,
8+
type DownloadPieceError,
99
FindPieceError,
1010
InvalidUploadSizeError,
1111
LocationHeaderError,
@@ -16,7 +16,6 @@ import type { PieceCID } from '../piece/piece.ts'
1616
import * as Piece from '../piece/piece.ts'
1717
import type * as TypedData from '../typed-data/index.ts'
1818
import { RETRY_CONSTANTS, SIZE_CONSTANTS } from '../utils/constants.ts'
19-
import { createPieceUrlPDP } from '../utils/piece-url.ts'
2019
import { isUint8Array } from '../utils/streams.ts'
2120

2221
export namespace createDataSet {

packages/synapse-core/test/download-piece.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { HttpResponse, http } from 'msw'
44
import { DownloadPieceError } from '../src/errors/pdp.ts'
55
import { downloadAndValidate } from '../src/piece/download.ts'
66
import * as Piece from '../src/piece/piece.ts'
7-
import {} from '../src/sp/sp.ts'
87

98
describe('Piece download and validation', () => {
109
const server = setup()

pnpm-workspace.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ allowBuilds:
1414
blockExoticSubdeps: true
1515

1616
catalog:
17-
'@biomejs/biome': 2.3.14
17+
'@biomejs/biome': 2.4.4
1818
'@types/mocha': ^10.0.10
1919
'@types/node': ^25.1.0
2020
'@types/react': ^19.2.7

utils/data-sets-viewer.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ <h1>Data Sets Viewer</h1>
271271
</div>
272272
<div class="section">
273273
<h2>Connection</h2>
274-
<button id="connectBtn">Connect MetaMask</button>
274+
<button type="button" id="connectBtn">Connect MetaMask</button>
275275
<div id="connectionResult"></div>
276276
</div>
277277
<div class="section">
@@ -285,9 +285,9 @@ <h2>View Data Sets</h2>
285285
<label>Client Address:</label>
286286
<input type="text" id="clientAddressInput" placeholder="0x... (leave empty for connected wallet)">
287287
</div>
288-
<button id="reconnectBtn" disabled>Reconnect with Selected Warm Storage</button>
289-
<button id="getDataSetsBtn" disabled>Get Data Sets</button>
290-
<button id="getMyDataSetsBtn" disabled>Get My Data Sets</button>
288+
<button type="button" id="reconnectBtn" disabled>Reconnect with Selected Warm Storage</button>
289+
<button type="button" id="getDataSetsBtn" disabled>Get Data Sets</button>
290+
<button type="button" id="getMyDataSetsBtn" disabled>Get My Data Sets</button>
291291
<div id="dataSetsSummary" style="margin-top: 20px;"></div>
292292
<div id="dataSetsResult" class="data-sets-container"></div>
293293
</div>

utils/payment-apis-demo.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,24 +121,24 @@ <h1>Synapse SDK - Enhanced Payment APIs Demo</h1>
121121
</div>
122122
<div class="section">
123123
<h2>Connection</h2>
124-
<button id="connectBtn">Connect MetaMask</button>
124+
<button type="button" id="connectBtn">Connect MetaMask</button>
125125
<div id="connectionResult"></div>
126126
</div>
127127
<div class="section">
128128
<h2>Warm Storage Contract Configuration</h2>
129129
<div class="input-group">
130130
<label>Warm Storage Address:</label>
131131
<input type="text" id="warmStorageAddressInput" placeholder="0x..." value="">
132-
<button id="updateWarm StorageBtn" disabled>Update Warm Storage Address</button>
132+
<button type="button" id="updateWarm StorageBtn" disabled>Update Warm Storage Address</button>
133133
</div>
134134
<div id="warmStorageStatus" class="warning">Storage cost functions require Warm Storage contract to be
135135
configured</div>
136136
</div>
137137
<div class="section">
138138
<h2>Account Information</h2>
139-
<button id="accountInfoBtn" disabled>Get Account Info</button>
140-
<button id="walletBalanceBtn" disabled>Get Wallet Balances</button>
141-
<button id="getCurrentEpochBtn" disabled>Get Current Epoch</button>
139+
<button type="button" id="accountInfoBtn" disabled>Get Account Info</button>
140+
<button type="button" id="walletBalanceBtn" disabled>Get Wallet Balances</button>
141+
<button type="button" id="getCurrentEpochBtn" disabled>Get Current Epoch</button>
142142
<div id="accountResult" class="result"></div>
143143
</div>
144144
<div class="section">
@@ -158,7 +158,7 @@ <h2>Storage Cost Calculator</h2>
158158
<label>With CDN:</label>
159159
<input type="checkbox" id="costWithCDNCheckbox">
160160
</div>
161-
<button id="calculateCostBtn" disabled>Calculate Storage Costs</button>
161+
<button type="button" id="calculateCostBtn" disabled>Calculate Storage Costs</button>
162162
<div id="costResult" class="result"></div>
163163
<div id="fundingAnalysis" style="margin-top: 20px; display: none;">
164164
<h3>Funding Analysis</h3>
@@ -183,8 +183,8 @@ <h2>Storage Allowance Checker</h2>
183183
<label>With CDN:</label>
184184
<input type="checkbox" id="withCDNCheckbox">
185185
</div>
186-
<button id="checkAllowanceBtn" disabled>Check Allowance</button>
187-
<button id="prepareUploadBtn" disabled>Prepare Storage Upload</button>
186+
<button type="button" id="checkAllowanceBtn" disabled>Check Allowance</button>
187+
<button type="button" id="prepareUploadBtn" disabled>Prepare Storage Upload</button>
188188
<div id="allowanceResult" class="result"></div>
189189
</div>
190190
<!-- Load ethers.js first -->

utils/payments-demo.html

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ <h1>Synapse Payments Demo</h1>
232232
<h3>Connection Status</h3>
233233
<div id="connectionInfo">
234234
<p><span class="status-indicator disconnected"></span> Not connected to MetaMask</p>
235-
<button onclick="_connectWallet()">Connect MetaMask</button>
235+
<button type="button" onclick="_connectWallet()">Connect MetaMask</button>
236236
</div>
237237
</div>
238238
<div class="section" id="balancesSection" style="display: none;">
@@ -253,15 +253,15 @@ <h2>Account Balances</h2>
253253
<span class="balance-label">USDFC Balance (Payments Contract):</span>
254254
<span class="balance-value" id="usdfcPaymentsBalance">-</span>
255255
</div>
256-
<button onclick="refreshBalances()">Refresh Balances</button>
256+
<button type="button" onclick="refreshBalances()" disabled>Refresh Balances</button>
257257
</div>
258258
<div class="section" id="operationsSection" style="display: none;">
259259
<h2>Payment Operations</h2>
260260
<div class="tab-container">
261261
<div class="tabs">
262-
<button class="tab active" onclick="switchTab('deposit')">Deposit/Withdraw</button>
263-
<button class="tab" onclick="switchTab('token')">Token Approvals</button>
264-
<button class="tab" onclick="switchTab('service')">Service Approvals</button>
262+
<button class="tab active" type="button" onclick="switchTab('deposit')">Deposit/Withdraw</button>
263+
<button class="tab" type="button" onclick="switchTab('token')">Token Approvals</button>
264+
<button class="tab" type="button" onclick="switchTab('service')">Service Approvals</button>
265265
</div>
266266
<!-- Deposit/Withdraw Tab -->
267267
<div class="tab-content active" id="depositTab">
@@ -274,7 +274,7 @@ <h3>Deposit USDFC</h3>
274274
<label>Amount (USDFC):</label>
275275
<input type="number" id="depositAmount" placeholder="10.0" step="0.1" min="0">
276276
</div>
277-
<button onclick="deposit()">Deposit</button>
277+
<button type="button" onclick="deposit()">Deposit</button>
278278
<div id="depositResult"></div>
279279
</div>
280280
<div>
@@ -284,7 +284,7 @@ <h3>Withdraw USDFC</h3>
284284
<label>Amount (USDFC):</label>
285285
<input type="number" id="withdrawAmount" placeholder="10.0" step="0.1" min="0">
286286
</div>
287-
<button onclick="withdraw()">Withdraw</button>
287+
<button type="button" onclick="withdraw()">Withdraw</button>
288288
<div id="withdrawResult"></div>
289289
</div>
290290
</div>
@@ -300,7 +300,7 @@ <h3>Check Allowance</h3>
300300
<input type="text" id="allowanceSpender" placeholder="0x...">
301301
<small style="color: #666;">Default: Payments Contract</small>
302302
</div>
303-
<button onclick="checkAllowance()">Check Allowance</button>
303+
<button type="button" onclick="checkAllowance()">Check Allowance</button>
304304
<div id="allowanceResult"></div>
305305
</div>
306306
<div>
@@ -316,7 +316,7 @@ <h3>Approve Token Spending</h3>
316316
<label>Amount (USDFC):</label>
317317
<input type="number" id="approveAmount" placeholder="100.0" step="0.1" min="0">
318318
</div>
319-
<button onclick="approveToken()">Approve</button>
319+
<button type="button" onclick="approveToken()">Approve</button>
320320
<div id="approveResult"></div>
321321
</div>
322322
</div>
@@ -339,7 +339,7 @@ <h4>Check Service Approval</h4>
339339
<input type="text" id="checkServiceAddress" placeholder="0x...">
340340
<small style="color: #666;">Warm Storage address</small>
341341
</div>
342-
<button onclick="checkServiceApproval()">Check Approval</button>
342+
<button type="button" onclick="checkServiceApproval()">Check Approval</button>
343343
<div id="checkServiceResult"></div>
344344
</div>
345345
<div>
@@ -363,7 +363,7 @@ <h4>Approve Service</h4>
363363
<input type="number" id="maxLockupPeriod" placeholder="86400" step="1" min="0">
364364
<small style="color: #666;">Default: 86400 epochs (30 days)</small>
365365
</div>
366-
<button onclick="approveService()">Approve Service</button>
366+
<button type="button" onclick="approveService()">Approve Service</button>
367367
<div id="approveServiceResult"></div>
368368
</div>
369369
<div>
@@ -372,7 +372,7 @@ <h4>Revoke Service</h4>
372372
<label>Service Contract Address:</label>
373373
<input type="text" id="revokeServiceAddress" placeholder="0x...">
374374
</div>
375-
<button onclick="revokeService()">Revoke Service</button>
375+
<button type="button" onclick="revokeService()">Revoke Service</button>
376376
<div id="revokeServiceResult"></div>
377377
</div>
378378
</div>

utils/pdp-auth-demo.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
<h1>PDP Auth Signature Demo</h1>
146146
<div class="container">
147147
<div id="status" class="status disconnected"> Not connected to MetaMask </div>
148-
<button id="connectWallet" class="connect-button">Connect MetaMask</button>
148+
<button type="button" id="connectWallet" class="connect-button">Connect MetaMask</button>
149149
<div id="accountInfo"></div>
150150
</div>
151151
<div class="container">
@@ -178,7 +178,7 @@ <h2>1. Create Data Set</h2>
178178
<label>
179179
<input type="checkbox" id="createWithCDN"> With CDN </label>
180180
</div>
181-
<button id="signCreateDataSet">Sign Create Data Set</button>
181+
<button type="button" id="signCreateDataSet">Sign Create Data Set</button>
182182
<div id="createDataSetResult"></div>
183183
</div>
184184
<div class="container">
@@ -196,9 +196,9 @@ <h2>2. Add Pieces</h2>
196196
<div id="piecesContainer">
197197
<h3>Piece Data Entries</h3>
198198
<div id="pieceEntries"></div>
199-
<button id="addPieceEntry">Add Piece Entry</button>
199+
<button type="button" id="addPieceEntry">Add Piece Entry</button>
200200
</div>
201-
<button id="signAddPieces">Sign Add Pieces</button>
201+
<button type="button" id="signAddPieces">Sign Add Pieces</button>
202202
<div id="addPiecesResult"></div>
203203
</div>
204204
<div class="container">
@@ -213,7 +213,7 @@ <h2>3. Schedule Removals</h2>
213213
<label for="removePieceIds">Piece IDs (comma-separated):</label>
214214
<input type="text" id="removePieceIds" placeholder="1,3,5" value="1,3,5">
215215
</div>
216-
<button id="signScheduleRemovals">Sign Schedule Removals</button>
216+
<button type="button" id="signScheduleRemovals">Sign Schedule Removals</button>
217217
<div id="scheduleRemovalsResult"></div>
218218
</div>
219219
<div class="container">
@@ -223,7 +223,7 @@ <h2>4. Delete Data Set</h2>
223223
<label for="deleteClientDataSetId">Client Data Set ID:</label>
224224
<input type="text" id="deleteClientDataSetId" placeholder="12345" value="12345">
225225
</div>
226-
<button id="signDeleteDataSet">Sign Delete Data Set</button>
226+
<button type="button" id="signDeleteDataSet">Sign Delete Data Set</button>
227227
<div id="deleteDataSetResult"></div>
228228
</div>
229229
<!-- Load ethers and SDK -->

utils/pdp-tool-test.html

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ <h1>Synapse PDP Testing Tool</h1>
197197
</div>
198198
<div class="form-group">
199199
<label>Wallet Connection:</label>
200-
<button id="connectWalletBtn">Connect MetaMask</button>
200+
<button type="button" id="connectWalletBtn">Connect MetaMask</button>
201201
<div id="walletStatus" class="help-text">Click to connect your MetaMask wallet for signing</div>
202202
</div>
203203
<div class="form-group">
@@ -214,7 +214,7 @@ <h1>Synapse PDP Testing Tool</h1>
214214
<div class="section">
215215
<h2>Service Providers</h2>
216216
<div class="form-group">
217-
<button id="listProvidersBtn">List Approved Providers</button>
217+
<button type="button" id="listProvidersBtn">List Approved Providers</button>
218218
<div class="help-text">View all service providers approved to use this Warm Storage service</div>
219219
</div>
220220
<div id="providersStatus" class="status info" style="display: none; margin-top: 10px;"></div>
@@ -246,9 +246,10 @@ <h2>Create Data Set</h2>
246246
<div class="help-text">Whether to enable CDN services for faster retrieval</div>
247247
</div>
248248
<div class="form-group">
249-
<button id="createDataSetBtn" disabled>Create Data Set</button>
250-
<button id="checkStatusBtn" disabled>Check Status</button>
251-
<button id="autoMonitorBtn" disabled style="background-color: #28a745;">Auto-Monitor</button>
249+
<button type="button" id="createDataSetBtn" disabled>Create Data Set</button>
250+
<button type="button" id="checkStatusBtn" disabled>Check Status</button>
251+
<button type="button" id="autoMonitorBtn" disabled
252+
style="background-color: #28a745;">Auto-Monitor</button>
252253
</div>
253254
</div>
254255
<!-- ADD PIECES SECTION -->
@@ -294,10 +295,11 @@ <h4>Piece Entry 1</h4>
294295
<button type="button" class="remove-piece-btn" onclick="removePieceEntry(this)">Remove</button>
295296
</div>
296297
</div>
297-
<button type="button" class="add-piece-btn" onclick="addPieceEntry()">Add Another Piece</button>
298+
<button type="button" class="add-piece-btn" onclick="addPieceEntry()" disabled>Add Another
299+
Piece</button>
298300
</div>
299301
<div class="form-group">
300-
<button id="addPiecesBtn" disabled>Add Pieces</button>
302+
<button type="button" id="addPiecesBtn" disabled>Add Pieces</button>
301303
</div>
302304
</div>
303305
<!-- MONITOR DATA SET SECTION -->
@@ -309,7 +311,7 @@ <h2>Monitor Data Set</h2>
309311
<div class="help-text">Enter a data set creation transaction hash to monitor its status</div>
310312
</div>
311313
<div class="form-group">
312-
<button id="monitorTxBtn">Check Transaction Status</button>
314+
<button type="button" id="monitorTxBtn">Check Transaction Status</button>
313315
</div>
314316
</div>
315317
<div id="status" class="status info" style="display: none;"></div>

0 commit comments

Comments
 (0)