1
0
mirror of https://github.com/oceanprotocol-archive/squid-js.git synced 2024-02-02 15:31:51 +01:00

Merge pull request #390 from oceanprotocol/bug/Compute_algorithmMeta

add encodeURIComponent if AlgoMetadata is used
This commit is contained in:
Alex Coseru 2020-03-19 08:19:34 +02:00 committed by GitHub
commit 30fe06ba0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,7 +138,10 @@ export class Brizo extends Instantiable {
url += `&consumerAddress=${address}`
url += `&serviceAgreementId=${noZeroX(serviceAgreementId)}`
url += (algorithmDid && `&algorithmDid=${algorithmDid}`) || ''
url += (algorithmMeta && `&algorithmMeta=${JSON.stringify(algorithmMeta)}`) || ''
url +=
(algorithmMeta &&
`&algorithmMeta=${encodeURIComponent(JSON.stringify(algorithmMeta))}`) ||
''
url += (output && `&output=${JSON.stringify(output)}`) || ''
url += (jobId && `&jobId=${jobId}`) || ''