Skip to content

Commit

Permalink
fix: match service endpoint
Browse files Browse the repository at this point in the history
Closes #1762
  • Loading branch information
lidel committed Apr 14, 2021
1 parent 4a4b16e commit dadaf04
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/bundles/pinning.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { pinningServiceTemplates } from '../constants/pinning'
import memoize from 'p-memoize'

const parseService = async (service, remoteServiceTemplates, ipfs) => {
const template = remoteServiceTemplates.find(x => service.service.toLowerCase().includes(x.name.toLowerCase()))
const template = remoteServiceTemplates.find(t => service.endpoint.toString() === t.apiEndpoint.toString())
const icon = template?.icon
const visitServiceUrl = template?.visitServiceUrl
const autoUpload = await mfsPolicyEnableFlag(service.service, ipfs)
Expand Down
2 changes: 1 addition & 1 deletion src/constants/pinning.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
const pinningServiceTemplates = [
{
name: 'Pinata',
icon: 'https://ipfs.io/ipfs/QmVYXV4urQNDzZpddW4zZ9PGvcAbF38BnKWSgch3aNeViW?filename=pinata.svg',
icon: 'https://dweb.link/ipfs/QmVYXV4urQNDzZpddW4zZ9PGvcAbF38BnKWSgch3aNeViW?filename=pinata.svg',
apiEndpoint: 'https://api.pinata.cloud/psa',
visitServiceUrl: 'https://pinata.cloud/documentation#PinningServicesAPI'
}
Expand Down

0 comments on commit dadaf04

Please sign in to comment.