Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganized wallet pop-up to show uninstalled wallets last #908

Open
wants to merge 3 commits into
base: testnet
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"suppressImplicitAnyIndexErrors": true,
"ignoreDeprecations": "5.0",
"baseUrl": ".",
"paths": {
Expand Down
11 changes: 11 additions & 0 deletions utils/connectorWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { WebWalletConnector } from "starknetkit/webwallet";
import { getBrowser } from "./browserService";
import { constants } from "starknet";


export const getConnectors = () => {
const connectors = [
new InjectedConnector({ options: { id: "argentX" } }),
Expand All @@ -28,6 +29,7 @@ export const getConnectors = () => {
return connectors;
};


export const sortConnectors = (connectors: Connector[]) => {
const available: Connector[] = [];
const notAvailable: Connector[] = [];
Expand Down Expand Up @@ -103,6 +105,7 @@ export const isInArgentMobileAppBrowser = (): boolean => {
return starknetMobile?.isInAppBrowser;
};


const wallets = [
{
id: "argentX",
Expand All @@ -115,18 +118,22 @@ const wallets = [
edge: "https://microsoftedge.microsoft.com/addons/detail/argent-x/ajcicjlkibolbeaaagejfhnofogocgcj",
},
website: "https://www.argent.xyz/argent-x/",
available: true,

},
{
id: "argentMobile",
name: "Argent (mobile)",
icon: "data:image/svg+xml;base64,PHN2ZwogICAgd2lkdGg9IjMyIgogICAgaGVpZ2h0PSIzMiIKICAgIHZpZXdCb3g9IjAgMCAzMiAzMiIKICAgIGZpbGw9Im5vbmUiCiAgICB4bWx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wMDAvc3ZnIgo+CjxwYXRoCiAgZmlsbC1ydWxlPSJldmVub2RkIgogIGNsaXAtcnVsZT0iZXZlbm9kZCIKICBkPSJNMS41IDAuNDM3NUMwLjk4MjIzMyAwLjQzNzUgMC41NjI1IDAuODU3MjMzIDAuNTYyNSAxLjM3NVYxMkMwLjU2MjUgMTIuNDE0NCAwLjcyNzEyIDEyLjgxMTggMS4wMjAxNSAxMy4xMDQ5QzEuMzEzMTcgMTMuMzk3OSAxLjcxMDYgMTMuNTYyNSAyLjEyNSAxMy41NjI1SDE1Ljg3NUMxNi4yODk0IDEzLjU2MjUgMTYuNjg2OCAxMy4zOTc5IDE2Ljk3OTkgMTMuMTA0OUMxNy4yNzI5IDEyLjgxMTggMTcuNDM3NSAxMi40MTQ0IDE3LjQzNzUgMTJWMS4zNzVDMTcuNDM3NSAwLjg1NzIzMyAxNy4wMTc4IDAuNDM3NSAxNi41IDAuNDM3NUgxLjVaTTIuNDM3NSAzLjUwNjE2VjExLjY4NzVIMTUuNTYyNVYzLjUwNjE2TDkuNjMzNDkgOC45NDEwOEM5LjI3NTA3IDkuMjY5NjQgOC43MjQ5MyA5LjI2OTY0IDguMzY2NTEgOC45NDEwOEwyLjQzNzUgMy41MDYxNlpNMTQuMDg5OSAyLjMxMjVIMy45MTAxM0w5IDYuOTc4MjJMMTQuMDg5OSAyLjMxMjVaIgogIGZpbGw9ImN1cnJlbnRDb2xvciIKLz4KPC9zdmc+",
website: "https://www.argent.xyz/argent-x/",
available: true,
},
{
id: "braavos",
Expand All @@ -139,6 +146,7 @@ const wallets = [
edge: "https://microsoftedge.microsoft.com/addons/detail/braavos-wallet/hkkpjehhcnhgefhbdcgfkeegglpjchdc",
},
website: "https://braavos.app/",
available: true,
},
{
id: "bitkeep",
Expand All @@ -149,6 +157,7 @@ const wallets = [
"https://chromewebstore.google.com/detail/bitget-wallet-formerly-bi/jiidiaalihmmhddjgbnbgdfflelocpak",
},
website: "https://web3.bitget.com/",
available: false,
},
{
id: "okxwallet",
Expand All @@ -162,6 +171,7 @@ const wallets = [
safari: "https://apps.apple.com/us/app/okx-wallet/id6463797825",
},
website: "https://www.okx.com/",
available: false,
},
{
id: "keplr",
Expand All @@ -174,5 +184,6 @@ const wallets = [
edge: "https://microsoftedge.microsoft.com/addons/detail/keplr/ocodgmmffbkkeecmadcijjhkmeohinei",
},
website: "https://www.keplr.app/",
available: true,
},
];