From dadaf04219f2cc38118ddcde48f4b42fb1de2643 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Wed, 14 Apr 2021 18:34:21 +0200 Subject: [PATCH] fix: match service endpoint Closes #1762 --- src/bundles/pinning.js | 2 +- src/constants/pinning.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bundles/pinning.js b/src/bundles/pinning.js index 494796dfa..29f55ec84 100644 --- a/src/bundles/pinning.js +++ b/src/bundles/pinning.js @@ -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) diff --git a/src/constants/pinning.js b/src/constants/pinning.js index e2b1a7644..43923b738 100644 --- a/src/constants/pinning.js +++ b/src/constants/pinning.js @@ -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' }