Skip to content

Commit

Permalink
feat: always show coinbase wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
k0beLeenders authored and chambaz committed Jul 29, 2024
1 parent 1958fc8 commit 619c648
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions apps/marginfi-v2-ui/src/hooks/useAvailableWallets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ export function useAvailableWallets(preset?: WalletPreset): ExtendedWallet[] {
newWallets.push(backpackAdapter);
}

if (!walletNames.includes(CoinbaseWalletName)) {
newWallets.push(coinbaseAdapter);
}

return newWallets;
};

Expand Down Expand Up @@ -184,14 +188,14 @@ export const walletDeepLinkMap: WalletLinkMap = {
Solflare: `https://solflare.com/ul/v1/browse/${encodeURIComponent(
"https://app.marginfi.com"
)}?ref=https://app.marginfi.com`,
Coinbase: `https://go.cb-w.com/dapp?cb_url=${encodeURIComponent("https://app.marginfi.com")}`,
};

export const walletInstallMap: WalletLinkMap = {
Phantom: "https://phantom.app/download",
Backpack: "https://backpack.app/download",
Solflare: "https://gamma.solflare.com/download#extension",
Coinbase: "https://www.coinbase.com/wallet/articles/getting-started-extension",
SquadsX: "https://squads.so/extension",
Coinbase: "https://www.coinbase.com/wallet/downloads",
};

const backpackAdapter: Wallet = {
Expand Down Expand Up @@ -220,3 +224,12 @@ const solflareAdapter: Wallet = {
} as any,
readyState: WalletReadyState.NotDetected,
};

const coinbaseAdapter: Wallet = {
adapter: {
name: CoinbaseWalletName,
icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyNCIgaGVpZ2h0PSIxMDI0IiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8Y2lyY2xlIGN4PSI1MTIiIGN5PSI1MTIiIHI9IjUxMiIgZmlsbD0iIzAwNTJGRiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTE1MiA1MTJDMTUyIDcxMC44MjMgMzEzLjE3NyA4NzIgNTEyIDg3MkM3MTAuODIzIDg3MiA4NzIgNzEwLjgyMyA4NzIgNTEyQzg3MiAzMTMuMTc3IDcxMC44MjMgMTUyIDUxMiAxNTJDMzEzLjE3NyAxNTIgMTUyIDMxMy4xNzcgMTUyIDUxMlpNNDIwIDM5NkM0MDYuNzQ1IDM5NiAzOTYgNDA2Ljc0NSAzOTYgNDIwVjYwNEMzOTYgNjE3LjI1NSA0MDYuNzQ1IDYyOCA0MjAgNjI4SDYwNEM2MTcuMjU1IDYyOCA2MjggNjE3LjI1NSA2MjggNjA0VjQyMEM2MjggNDA2Ljc0NSA2MTcuMjU1IDM5NiA2MDQgMzk2SDQyMFoiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo=",
readyState: WalletReadyState.NotDetected,
} as any,
readyState: WalletReadyState.NotDetected,
};

0 comments on commit 619c648

Please sign in to comment.