Skip to content

Commit

Permalink
Add Galaxy Station wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
echel0n-HX committed Jun 24, 2024
1 parent fc6f9d3 commit 3820feb
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/web/config/generate-cosmos-kit-wallet-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import path from "node:path";
import { cdcwalletExtensionInfo } from "@cosmos-kit/cdcwallet-extension";
import { Wallet as DefaultWallet } from "@cosmos-kit/core";
import { cosmostationExtensionInfo } from "@cosmos-kit/cosmostation-extension";
import { galaxyStationExtensionInfo } from "@cosmos-kit/galaxy-station-extension";
import { keplrExtensionInfo } from "@cosmos-kit/keplr-extension";
import { keplrMobileInfo } from "@cosmos-kit/keplr-mobile";
import { leapExtensionInfo } from "@cosmos-kit/leap-extension";
Expand Down Expand Up @@ -38,6 +39,7 @@ const CosmosKitWalletList: Wallet[] = [
cosmostationExtensionInfo,
stationExtensionInfo,
cdcwalletExtensionInfo,
galaxyStationExtensionInfo,
];

function isObject(value: any): value is Record<any, any> {
Expand Down
26 changes: 26 additions & 0 deletions packages/web/config/wallet-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,4 +334,30 @@ export const CosmosWalletRegistry: CosmosRegistryWallet[] = [
},
features: [],
},
{
...CosmosKitWalletList["galaxy-station-extension"],
mobileDisabled: true,
logo: "/wallets/galaxy-station.png",
lazyInstall: () =>
import("@cosmos-kit/galaxy-station-extension").then(
(m) => m.GalaxyStationExtensionWallet
),
windowPropertyName: "galaxyStation",
supportsChain: async (chainId) => {
if (typeof window === "undefined") return true;

const galaxyStationWallet = (window as any)?.galaxyStation?.keplr as {
getChainInfosWithoutEndpoints: () => Promise<{ chainId: string }[]>;
};

if (!galaxyStationWallet) return true;

const chainInfos = await galaxyStationWallet.getChainInfosWithoutEndpoints();
return chainInfos.some((info) => info.chainId === chainId);
},
signOptions: {
preferNoSetFee: true,
},
features: [],
},
];
1 change: 1 addition & 0 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@cosmos-kit/cdcwallet": "^2.12.0",
"@cosmos-kit/core": "2.7.2",
"@cosmos-kit/cosmostation": "2.4.4",
"@cosmos-kit/galaxy-station": "2.10.0",
"@cosmos-kit/keplr": "2.4.4",
"@cosmos-kit/leap": "2.4.3",
"@cosmos-kit/okxwallet": "2.3.3",
Expand Down
Binary file added packages/web/public/wallets/galaxy-station.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3820feb

Please sign in to comment.