Skip to content

Commit ff610e6

Browse files
authored
fix: correct Filfox explorer URL format for mainnet and use dynamic network in PDP URLs (#239)
fix: correct Filfox explorer URL format for mainnet and use dynamic network in PDP URLs
1 parent 65f13b0 commit ff610e6

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/common/upload-flow.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -298,16 +298,17 @@ export async function performUpload(
298298
if (event.data.txHash) {
299299
transactionHash = event.data.txHash
300300
}
301+
const network = synapseService.synapse.getNetwork()
302+
const explorerUrls = [pc.gray(`Piece: https://pdp.vxb.ai/${network}/piece/${pieceCid}`)]
303+
if (transactionHash) {
304+
const filfoxBase = network === 'mainnet' ? 'https://filfox.info' : `https://${network}.filfox.info`
305+
explorerUrls.push(pc.gray(`Transaction: ${filfoxBase}/en/message/${transactionHash}`))
306+
}
301307
flow.completeOperation('add-to-dataset', 'Piece added to DataSet (unconfirmed on-chain)', {
302308
type: 'success',
303309
details: {
304310
title: 'Explorer URLs',
305-
content: [
306-
pc.gray(`Piece: https://pdp.vxb.ai/calibration/piece/${pieceCid}`),
307-
pc.gray(
308-
`Transaction: https://${synapseService.synapse.getNetwork()}.filfox.info/en/message/${transactionHash}`
309-
),
310-
],
311+
content: explorerUrls,
311312
},
312313
})
313314
// Start chain confirmation operation

0 commit comments

Comments
 (0)