If that's the case, could be fixable using a custom esbuild loader for SVGs to properly handle the encoding, or possibly by modifying the dataurl loader config.
krakenWallet is not the only wallet connector affected, walletConnectWallet is as well and possibly others.
Is there an existing issue for this?
RainbowKit Version
2.1.7
wagmi Version
2.12.17
Current Behavior
Description
The SVG data URLs in the distributed wallet connector icons are not properly URL-encoded, causing issues with
coolMode
.Current Behavior
In the distributed package (straight from npm), SVG data URLs are not encoded:
Expected Behavior
Expected Behavior
The SVGs should either be URL-encoded:
Or preferably base64 encoded:
Steps To Reproduce
Reproduction
@rainbow-me/rainbowkit
.Environment
@rainbow-me/rainbowkit
version:2.1.7
Let me know if you need any additional information or would like me to test potential solutions.
Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)
No response
Anything else?
It seems likely that
esbuild
's dataurl loader is converting the SVGs to data URLs but not properly handling the encoding. https://github.com/rainbow-me/rainbowkit/blob/main/packages/rainbowkit/build.js#L35If that's the case, could be fixable using a custom
esbuild
loader for SVGs to properly handle the encoding, or possibly by modifying the dataurl loader config.krakenWallet
is not the only wallet connector affected,walletConnectWallet
is as well and possibly others.