Skip to content

Commit

Permalink
Have the option to exclude AptosConnect from the wallet slector modal (
Browse files Browse the repository at this point in the history
  • Loading branch information
0xmaayan authored Aug 15, 2024
1 parent 0e37588 commit 4240f8b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/slimy-pens-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@aptos-labs/wallet-adapter-core": minor
---

Have the option to exclude AptosConnect from the wallet selector modal
6 changes: 3 additions & 3 deletions apps/nextjs-example/src/components/ui/use-toast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const reducer = (state: State, action: Action): State => {
return {
...state,
toasts: state.toasts.map((t) =>
t.id === action.toast.id ? { ...t, ...action.toast } : t,
t.id === action.toast.id ? { ...t, ...action.toast } : t
),
};

Expand All @@ -108,7 +108,7 @@ export const reducer = (state: State, action: Action): State => {
...t,
open: false,
}
: t,
: t
),
};
}
Expand Down Expand Up @@ -155,7 +155,7 @@ function toast({ ...props }: Toast) {
...props,
id,
open: true,
onOpenChange: (open) => {
onOpenChange: (open: any) => {
if (!open) dismiss();
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ export type AvailableWallets =
| "Petra"
| "T wallet"
| "Pontem Wallet"
| "Mizu Wallet";
| "Mizu Wallet"
| "Continue with Google";
2 changes: 0 additions & 2 deletions packages/wallet-adapter-core/src/WalletCore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,6 @@ export class WalletCore extends EventEmitter<WalletCoreEvents> {
* @returns
*/
excludeWallet(wallet: AptosStandardWallet): boolean {
// for now, we always include AptosConnect
if (isAptosConnectWallet(wallet)) return false;
// If _optInWallets is not empty, and does not include the provided wallet,
// return true to exclude the wallet, otherwise return false
if (
Expand Down

0 comments on commit 4240f8b

Please sign in to comment.