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

Add Leap Wallet #462

Open
wants to merge 3 commits into
base: main
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
5 changes: 5 additions & 0 deletions .changeset/tasty-poets-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@aptos-labs/wallet-adapter-core": patch
---

add leap wallet as AIP-62 wallet
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Note: These are in alphabetical order, any new wallets must be in alphabetical o
- [Nightly](https://chromewebstore.google.com/detail/nightly/fiikommddbeccaoicoejoniammnalkfa)
- [Petra](https://chromewebstore.google.com/detail/petra-aptos-wallet/ejjladinnckdgjemekebdpeokbikhfci?hl=en)
- [Pontem](https://www.npmjs.com/package/@pontem/wallet-adapter-plugin)
- [Leap Wallet](https://chromewebstore.google.com/detail/leap-cosmos-wallet/fcfcfllfndlomdhbehjjcoimbgofdncg)
- T wallet

Legacy standard compatible
Expand Down
8 changes: 6 additions & 2 deletions apps/nextjs-example/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ import { registerWallet } from "@aptos-labs/wallet-standard";
registerWallet(myWallet);
})();

const isTelegramMiniApp = typeof window !== 'undefined' && (window as any).TelegramWebviewProxy !== undefined;
const isTelegramMiniApp =
typeof window !== "undefined" &&
(window as any).TelegramWebviewProxy !== undefined;
if (isTelegramMiniApp) {
initTelegram();
}
Expand Down Expand Up @@ -169,7 +171,9 @@ function WalletConnection({
};

// TODO: Do a proper check for network change support
const isNetworkChangeSupported = wallet?.name === "Nightly";
const isNetworkChangeSupported = ["Nightly", "Leap Wallet"].includes(
wallet?.name ?? ""
);

return (
<Card>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import {
import { Network } from "@aptos-labs/ts-sdk";

const WalletIcon = defineAsyncComponent(
() => import("~/components/ui/Wallet/WalletIcon.vue"),
() => import("~/components/ui/Wallet/WalletIcon.vue")
);
const WalletLink = defineAsyncComponent(
() => import("~/components/ui/Wallet/WalletLink.vue"),
() => import("~/components/ui/Wallet/WalletLink.vue")
);
const DisplayValue = defineAsyncComponent(
() => import("~/components/DisplayValue.vue"),
() => import("~/components/DisplayValue.vue")
);

interface WalletConnectionProps {
Expand All @@ -31,7 +31,7 @@ const { account, network, wallet } = toRefs(props);
const isValidNetworkName = computed(() => {
if (isAptosNetwork(network.value)) {
return Object.values<string | undefined>(Network).includes(
network.value?.name,
network.value?.name
);
}
// If the configured network is not an Aptos network, i.e is a custom network
Expand All @@ -40,8 +40,8 @@ const isValidNetworkName = computed(() => {
});

// TODO: Do a proper check for network change support
const isNetworkChangeSupported = computed(
() => wallet.value?.name === "Nightly",
const isNetworkChangeSupported = computed(() =>
["Nightly", "Leap Wallet"].includes(wallet.value?.name ?? "")
);
</script>

Expand Down
2 changes: 1 addition & 1 deletion packages/wallet-adapter-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aptos-labs/wallet-adapter-core",
"version": "4.23.0",
"version": "4.23.1",
"description": "Aptos Wallet Adapter Core",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,11 @@ export const aptosStandardSupportedWalletList: Array<AptosStandardSupportedWalle
readyState: WalletReadyState.NotDetected,
isAIP62Standard: true,
},
{
name: "Leap Wallet" as WalletName<"Leap Wallet">,
url: "https://chromewebstore.google.com/detail/leap-cosmos-wallet/fcfcfllfndlomdhbehjjcoimbgofdncg?utm_source=wallet-adapter&utm_medium=movementecosystem-wallet-adapter&utm_campaign=movementecosystem",
icon: "data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42MjE0IDkxLjc4NDggNjcuNDM0IDg5LjYyNzggNjYuNjk3MiA4Ny4zMDI5QzY2LjE3MDEgODUuNjM5NiA2NS44ODExIDgzLjkxMzUgNjUuODM1OSA4Mi4xNzYxQzY1LjgwNiA4MS4wMjk0IDY2LjgyNDQgODAuMTgwOCA2Ny45NjczIDgwLjI3OTFMODQuNDAwNyA4MS42OTI4TDk5Ljc5OTUgODMuMDE3NloiIGZpbGw9IiMwOTI1MTEiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF83ODBfNjEwIj4KPHJlY3Qgd2lkdGg9IjE2NiIgaGVpZ2h0PSIxNjYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==",
readyState: WalletReadyState.NotDetected,
isAIP62Standard: true,
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ export type AvailableWallets =
| "T wallet"
| "Pontem Wallet"
| "Mizu Wallet"
| "Continue with Google";
| "Continue with Google"
| "Leap Wallet";