Skip to content

Commit

Permalink
πŸ› Fix url escape for arweave key
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong committed Jan 27, 2025
1 parent 834ac5a commit d3c315f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion utils/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ export function formatIpfs(ipfsHash) {

export function formatArweave(arweaveId, key) {
if (key) {
return `ar://${arweaveId}?key=${key}`
const url = new URL(`ar://${arweaveId}`);
url.searchParams.append('key', key);
return url.toString();
}
return `ar://${arweaveId}`
}

0 comments on commit d3c315f

Please sign in to comment.