1
1
import { useMemo } from 'react' ;
2
2
import { Chain } from '@wormhole-foundation/sdk' ;
3
3
import { WalletData } from '../store/wallet' ;
4
- import { type AvailableWallets } from '@aptos-labs/wallet-adapter-core' ;
5
4
6
5
export type WalletCompatibilityResult = {
7
6
isCompatible : boolean ;
@@ -26,24 +25,24 @@ export const useWalletCompatibility = ({
26
25
27
26
if ( isManualCCTPRoute ) {
28
27
// 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 [ ] = [
30
31
'Petra' ,
31
32
'Pontem Wallet' ,
32
33
'Nightly' ,
34
+ 'Continue with Google' ,
35
+ 'Continue with Apple' ,
33
36
] ;
34
37
if (
35
38
( sourceChain === 'Aptos' &&
36
- ! compatibleWallets . includes (
37
- sendingWallet . name as AvailableWallets ,
38
- ) ) ||
39
+ ! compatibleWallets . includes ( sendingWallet . name ) ) ||
39
40
( destChain === 'Aptos' &&
40
- ! compatibleWallets . includes ( receivingWallet . name as AvailableWallets ) )
41
+ ! compatibleWallets . includes ( receivingWallet . name ) )
41
42
) {
42
43
return {
43
44
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.' ,
47
46
} ;
48
47
}
49
48
}
0 commit comments