-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #322 from aptos-labs/aptos-connect-wallets-section
Add Aptos Connect section to shadcn/ui wallet selector
- Loading branch information
Showing
7 changed files
with
125 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@aptos-labs/wallet-adapter-react": minor | ||
--- | ||
|
||
Added `getAptosConnectWallets` utility function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@aptos-labs/wallet-adapter-core": minor | ||
--- | ||
|
||
Added `APTOS_CONNECT_BASE_URL`, `APTOS_CONNECT_ACCOUNT_URL`, and `isAptosConnectWallet` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@aptos-labs/wallet-adapter-nextjs-example": minor | ||
--- | ||
|
||
Moved Aptos Connect wallets to separate section in shadcn/ui wallet selector |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { WalletInfo } from "../LegacyWalletPlugins"; | ||
import { AnyAptosWallet } from "../WalletCore"; | ||
|
||
/** The base URL for all Aptos Connect wallets. */ | ||
export const APTOS_CONNECT_BASE_URL = "https://aptosconnect.app"; | ||
|
||
/** The URL to the Aptos Connect account page if the user is signed in to Aptos Connect. */ | ||
export const APTOS_CONNECT_ACCOUNT_URL = | ||
"https://aptosconnect.app/dashboard/main-account"; | ||
|
||
/** Returns `true` if the provided wallet is an Aptos Connect wallet. */ | ||
export function isAptosConnectWallet(wallet: WalletInfo | AnyAptosWallet) { | ||
return wallet.url.startsWith(APTOS_CONNECT_BASE_URL); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export { scopePollingDetectionStrategy } from "./scopePollingDetectionStrategy"; | ||
export * from "./localStorage"; | ||
export * from "./aptosConnect"; | ||
export * from "./helpers"; | ||
export * from "./localStorage"; | ||
export { scopePollingDetectionStrategy } from "./scopePollingDetectionStrategy"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters