Skip to content

Commit 864251c

Browse files
authored
aptos cctp: support aptos connect (#3330)
* aptos cctp: support aptos connect * fix linter
1 parent d779425 commit 864251c

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

wormhole-connect/src/hooks/useWalletCompatibility.ts

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { useMemo } from 'react';
22
import { Chain } from '@wormhole-foundation/sdk';
33
import { WalletData } from '../store/wallet';
4-
import { type AvailableWallets } from '@aptos-labs/wallet-adapter-core';
54

65
export type WalletCompatibilityResult = {
76
isCompatible: boolean;
@@ -26,24 +25,24 @@ export const useWalletCompatibility = ({
2625

2726
if (isManualCCTPRoute) {
2827
// Aptos CCTP requires modern (AIP-62 standard) wallets with support for signing move script transaction types
29-
const compatibleWallets: AvailableWallets[] = [
28+
// NOTE: This package is missing some of the wallet types, so we're using a string array instead
29+
// import { type AvailableWallets } from '@aptos-labs/wallet-adapter-core';
30+
const compatibleWallets: string[] = [
3031
'Petra',
3132
'Pontem Wallet',
3233
'Nightly',
34+
'Continue with Google',
35+
'Continue with Apple',
3336
];
3437
if (
3538
(sourceChain === 'Aptos' &&
36-
!compatibleWallets.includes(
37-
sendingWallet.name as AvailableWallets,
38-
)) ||
39+
!compatibleWallets.includes(sendingWallet.name)) ||
3940
(destChain === 'Aptos' &&
40-
!compatibleWallets.includes(receivingWallet.name as AvailableWallets))
41+
!compatibleWallets.includes(receivingWallet.name))
4142
) {
4243
return {
4344
isCompatible: false,
44-
warning: `Please use ${compatibleWallets.join(
45-
' or ',
46-
)} with the Aptos CCTP route.`,
45+
warning: 'Please use a compatible wallet for this route.',
4746
};
4847
}
4948
}

0 commit comments

Comments
 (0)