Skip to content

Commit

Permalink
fix: trim trailing slash from custom rpc url (#58)
Browse files Browse the repository at this point in the history
* fix: trim trailing slash from custom rpc url

* fix: merge frontend url correctly
  • Loading branch information
vacekj authored Jul 2, 2024
1 parent 60bfa8c commit d28a16d
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ const getFrontendsFromRegistry = (selectedRpc?: string): DisplayedFrontend[] =>
}));

if (selectedRpc) {
registeredFrontends.push({ title: 'Embedded RPC frontend', url: `${selectedRpc}/app/` });
registeredFrontends.push({
title: 'Embedded RPC frontend',
/*NB: we merge using the variadic URL constructor here to avoid double-slashes*/
url: new URL('/app/', selectedRpc).href,
});
}

return registeredFrontends;
Expand Down

0 comments on commit d28a16d

Please sign in to comment.