Skip to content

Commit

Permalink
[SDK] Fix: Remove co.lobstr (not EVM compatible) (#5869)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregfromstl authored Jan 4, 2025
1 parent fc66060 commit 273a320
Show file tree
Hide file tree
Showing 112 changed files with 1,249 additions and 228 deletions.
5 changes: 5 additions & 0 deletions .changeset/pink-gorillas-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"thirdweb": patch
---

SDK: Removed co.lobstr from the available wallets (an unsupported non-EVM wallet)
40 changes: 23 additions & 17 deletions packages/thirdweb/scripts/wallets/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import { join } from "node:path";
import { format } from "prettier";
import sharp from "sharp";

const EXCLUDED_WALLETS = [
"co.lobstr", // Not EVM compatible
];

const walletConnectWallets = await fetch(
"https://explorer-api.walletconnect.com/w3m/v1/getAllListings?projectId=145769e410f16970a79ff77b2d89a1e0",
).then(async (res) => {
Expand Down Expand Up @@ -96,24 +100,26 @@ function rdns(wallet: Wallet) {
.join(".");
}

const allWalletsWithIds = allWalletsArray.map((wallet) => {
// biome-ignore lint/performance/noDelete: aware it's bad but it's OK in generate script
// biome-ignore lint/suspicious/noExplicitAny: aware it's bad but it's OK in generate script
delete (wallet as any).order;
// biome-ignore lint/performance/noDelete: aware it's bad but it's OK in generate script
// biome-ignore lint/suspicious/noExplicitAny: aware it's bad but it's OK in generate script
delete (wallet as any).injected;

const id = rdns(wallet);

if (id && id in deepLinkSupportedWalletsRecord) {
wallet.deepLink = {
mobile: deepLinkSupportedWalletsRecord[id].mobile,
};
}
const allWalletsWithIds = allWalletsArray
.map((wallet) => {
// biome-ignore lint/performance/noDelete: aware it's bad but it's OK in generate script
// biome-ignore lint/suspicious/noExplicitAny: aware it's bad but it's OK in generate script
delete (wallet as any).order;
// biome-ignore lint/performance/noDelete: aware it's bad but it's OK in generate script
// biome-ignore lint/suspicious/noExplicitAny: aware it's bad but it's OK in generate script
delete (wallet as any).injected;

const id = rdns(wallet);

if (id && id in deepLinkSupportedWalletsRecord) {
wallet.deepLink = {
mobile: deepLinkSupportedWalletsRecord[id].mobile,
};
}

return { ...wallet, id: id };
});
return { ...wallet, id: id };
})
.filter((w) => !EXCLUDED_WALLETS.includes(w.id));

// filter duplicate ids, we'll keep the first ones

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { WalletProvider } from "./provider.js";

describe("WalletIcon", () => {
it("should fetch wallet image", async () => {
expect(await fetchWalletImage({ id: "io.metamask" })).toBe(
"data:image/webp;base64,UklGRsgFAABXRUJQVlA4ILwFAAAwHgCdASqAAIAAPm0ylEWkIyIXTGzMQAbEoAzQSPDffG8qhx7LpfeDUfnDee/tP6gP2u9Yf0a/7L0/+pc3nivc0JlTXBvMVYW1Wt7JbdRJ1a5UhpH9+sdhAvGug20WzG+wRD+P/7/raQ1NqZ5EfcOwosQsP7NRVflPNArBLCbFJWE3EvTLNOmMfR2f+r+E2y6y1lWanc3n9RtF4lYbcW38t3UG/W2jXng4loXFOy3Vjm/r/1KHwXlpAuhAIzK/XF+ChayRFhBD+lbRrgQ3CSVjdmXw6agYPoMQ+tpjPUN/3qdGcvnN1sKWt57OGozQVSjMu0aA58MPKVWiAP77l9VfptKhZ7in3+r1DqZZQEYqO1p+MENah/WS/QQDvPuew8P0OXfahcjbCg7h4QEEEjDyfoFUbQHdw+meAsydryxVs/Ij+eB619Uj/sMgtwIifIyTieCT/hdsDmpLqGD+vOIArZfzSkordRkngojxVgvWRht84IaCHCs5Dn208UHFmyQE4KCxHef1iLYeAEPxnIAovGHIl7rCjiYE12obAM3ZCnt+RFqcT3q2rorCswc4/8f8TOhCSo63/dszpMkNQonGwtyhAFnm1EKqLPDcy99ggKQL95VYePoHcv8sHOG5zJ7lircX7VPpxkloNVWnlp/drJjQrp0h5BsOnqYn756+wcFw5qapAOnYCKUHujsoSz2BlLs1702rFpvi1iVczo2aO9GN1TaM3zBqMX0NN0YEU8pz/3+xwkK5M5q+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