Skip to content

Commit

Permalink
feat: update wallets check
Browse files Browse the repository at this point in the history
  • Loading branch information
icfor committed Mar 26, 2024
1 parent dedec05 commit 343f1ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
11 changes: 2 additions & 9 deletions src/screens/staking/lib/staking_sdk/core/cosmos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,15 @@ export const keplrNonNativeChains = new Set([
StakingNetworkId.StargazeTestnet,
]);

const leapExcludedNetworks = new Set([
StakingNetworkId.Celestia,
StakingNetworkId.ComposableFinance,
StakingNetworkId.DyDx,
StakingNetworkId.KavaTestnet,
]);

export const leapNetworks = new Set(
Array.from(keplrNetworks).filter(
(network) => !leapExcludedNetworks.has(network),
(network) => !keplrNonNativeChains.has(network),
),
);

export const cosmosWallets = new Set([
WalletId.Keplr,
// WalletId.Leap // @TODO: Enable when ready
// WalletId.Leap // @TODO: Enable Leap wallet when ready
]);

export const cosmosStakingNetworks = new Set([
Expand Down
5 changes: 3 additions & 2 deletions src/screens/staking/lib/staking_sdk/utils/storage.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { WalletId } from "../core/base";
import { walletsSupported } from "../core";
import type { WalletId } from "../core/base";

const localStorageKey = "connectedWallets";

Expand All @@ -12,7 +13,7 @@ export const getConnectedWallets = (): WalletId[] => {
try {
const parsedWallets: WalletId[] = JSON.parse(connectedWallets);

return parsedWallets.filter((walletId) => walletId !== WalletId.Leap); // TODO remove this line when staking with Leap Wallet is reliable
return parsedWallets.filter((w) => walletsSupported.has(w));
} catch (e) {
return [];
}
Expand Down

0 comments on commit 343f1ac

Please sign in to comment.