Skip to content

Commit 9ea37ba

Browse files
authored
fix: ci (#287)
* fix ci * fix linting * use pop testnet
1 parent 0954577 commit 9ea37ba

File tree

6 files changed

+9
-147
lines changed

6 files changed

+9
-147
lines changed

.github/workflows/create-typink-template-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ jobs:
7272
APPDIR="${WORKDIR}/test-app-${T}"
7373
7474
# Pick one network based on template family
75-
NETWORK="Aleph Zero Testnet"
76-
if [[ "$T" == v6-* ]]; then
77-
NETWORK="Passet Hub"
75+
NETWORK="Passet Hub"
76+
if [[ "$T" == inkv5-* ]]; then
77+
NETWORK="Pop Testnet"
7878
fi
7979
8080
echo "=== Creating ${T} (Node 20 + Bun) ==="

packages/create-typink/src/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export const CONTRACT_TYPES_CHOICES = [
5656
] as const;
5757

5858
export const PALLET_CONTRACTS_NETWORKS = [
59+
{ name: 'Pop Testnet', value: 'popTestnet', address: '12L4yRvLh5qWSgS5ty5X7gPoL5UjUTpQvM81jioo1L48gkS5' },
5960
{
6061
name: 'Aleph Zero Testnet',
6162
value: 'alephZeroTestnet',
@@ -66,6 +67,7 @@ export const PALLET_CONTRACTS_NETWORKS = [
6667
] as const;
6768

6869
export const PALLET_REVIVE_NETWORKS = [
70+
{ name: 'Pop Testnet', value: 'popTestnet', address: '0x73d678d38cd4b404223c4Ff8F0e7A5AF4beBA352' },
6971
{ name: 'Passet Hub', value: 'passetHub', address: '0x87396fA7d7FcE9B3e4b11a733C98700968426c50' },
7072
{ name: 'Kusama Asset Hub', value: 'kusamaAssetHub', address: '0xFf6A8342Ae4440D95BB5b9204a72f328c671b751' },
7173
{ name: 'Westend Asset Hub', value: 'westendAssetHub', address: '0xA8237FBAC4387CBcc595757d9bA6DEA296332449' },

packages/create-typink/templates/inkv5-nextjs/src/components/shared/wallet-selection.tsx

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,6 @@ const WalletButton = ({ walletInfo, afterSelectWallet }: WalletButtonProps) => {
3737
afterSelectWallet && afterSelectWallet();
3838
};
3939

40-
const getStatusText = () => {
41-
if (!installed) return 'Not Installed';
42-
};
43-
44-
const getActionText = () => {
45-
if (!installed) return 'Install';
46-
return 'Connect';
47-
};
48-
4940
return (
5041
<div
5142
className='flex items-center justify-between p-4 border border-gray-200 dark:border-gray-800 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors cursor-pointer group'
@@ -54,7 +45,7 @@ const WalletButton = ({ walletInfo, afterSelectWallet }: WalletButtonProps) => {
5445
<img className='rounded-sm' src={logo} alt={`${name}`} width={32} height={32} />
5546
<div className='flex flex-col'>
5647
<span className='font-medium text-sm'>{name}</span>
57-
<span className='text-xs text-red-500'>{getStatusText()}</span>
48+
{!installed && <span className='text-xs text-red-500'>Not Installed</span>}
5849
</div>
5950
</div>
6051
<Button
@@ -89,35 +80,9 @@ interface WalletSelectionProps {
8980
buttonClassName?: string;
9081
}
9182

92-
// Categorize wallets based on their name and type
93-
const categorizeWallets = (wallets: Wallet[]) => {
94-
const categories = {
95-
Hardware: [] as Wallet[],
96-
Remote: [] as Wallet[],
97-
'Web Signer': [] as Wallet[],
98-
Extensions: [] as Wallet[],
99-
};
100-
101-
wallets.forEach((wallet) => {
102-
const name = wallet.name.toLowerCase();
103-
if (name.includes('ledger')) {
104-
categories.Hardware.push(wallet);
105-
} else if (name.includes('walletconnect')) {
106-
categories.Remote.push(wallet);
107-
} else if (name.includes('signer') || name.includes('dedot')) {
108-
categories['Web Signer'].push(wallet);
109-
} else {
110-
categories.Extensions.push(wallet);
111-
}
112-
});
113-
114-
return categories;
115-
};
116-
11783
export function WalletSelection({ buttonLabel = 'Connect Wallet', buttonClassName = '' }: WalletSelectionProps) {
11884
const [isOpen, setIsOpen] = useState(false);
11985
const { wallets } = useTypink();
120-
const categorizedWallets = categorizeWallets(wallets);
12186

12287
return (
12388
<Dialog open={isOpen} onOpenChange={setIsOpen}>

packages/create-typink/templates/inkv6-nextjs/src/components/shared/wallet-selection.tsx

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,6 @@ const WalletButton = ({ walletInfo, afterSelectWallet }: WalletButtonProps) => {
3737
afterSelectWallet && afterSelectWallet();
3838
};
3939

40-
const getStatusText = () => {
41-
if (!installed) return 'Not Installed';
42-
};
43-
44-
const getActionText = () => {
45-
if (!installed) return 'Install';
46-
return 'Connect';
47-
};
48-
4940
return (
5041
<div
5142
className='flex items-center justify-between p-4 border border-gray-200 dark:border-gray-800 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors cursor-pointer group'
@@ -54,7 +45,7 @@ const WalletButton = ({ walletInfo, afterSelectWallet }: WalletButtonProps) => {
5445
<img className='rounded-sm' src={logo} alt={`${name}`} width={32} height={32} />
5546
<div className='flex flex-col'>
5647
<span className='font-medium text-sm'>{name}</span>
57-
<span className='text-xs text-red-500'>{getStatusText()}</span>
48+
{!installed && <span className='text-xs text-red-500'>Not Installed</span>}
5849
</div>
5950
</div>
6051
<Button
@@ -89,35 +80,9 @@ interface WalletSelectionProps {
8980
buttonClassName?: string;
9081
}
9182

92-
// Categorize wallets based on their name and type
93-
const categorizeWallets = (wallets: Wallet[]) => {
94-
const categories = {
95-
Hardware: [] as Wallet[],
96-
Remote: [] as Wallet[],
97-
'Web Signer': [] as Wallet[],
98-
Extensions: [] as Wallet[],
99-
};
100-
101-
wallets.forEach((wallet) => {
102-
const name = wallet.name.toLowerCase();
103-
if (name.includes('ledger')) {
104-
categories.Hardware.push(wallet);
105-
} else if (name.includes('walletconnect')) {
106-
categories.Remote.push(wallet);
107-
} else if (name.includes('signer') || name.includes('dedot')) {
108-
categories['Web Signer'].push(wallet);
109-
} else {
110-
categories.Extensions.push(wallet);
111-
}
112-
});
113-
114-
return categories;
115-
};
116-
11783
export function WalletSelection({ buttonLabel = 'Connect Wallet', buttonClassName = '' }: WalletSelectionProps) {
11884
const [isOpen, setIsOpen] = useState(false);
11985
const { wallets } = useTypink();
120-
const categorizedWallets = categorizeWallets(wallets);
12186

12287
return (
12388
<Dialog open={isOpen} onOpenChange={setIsOpen}>

packages/create-typink/templates/inkv6-sol-nextjs/src/components/shared/wallet-selection.tsx

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,6 @@ const WalletButton = ({ walletInfo, afterSelectWallet }: WalletButtonProps) => {
3737
afterSelectWallet && afterSelectWallet();
3838
};
3939

40-
const getStatusText = () => {
41-
if (!installed) return 'Not Installed';
42-
};
43-
44-
const getActionText = () => {
45-
if (!installed) return 'Install';
46-
return 'Connect';
47-
};
48-
4940
return (
5041
<div
5142
className='flex items-center justify-between p-4 border border-gray-200 dark:border-gray-800 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors cursor-pointer group'
@@ -54,7 +45,7 @@ const WalletButton = ({ walletInfo, afterSelectWallet }: WalletButtonProps) => {
5445
<img className='rounded-sm' src={logo} alt={`${name}`} width={32} height={32} />
5546
<div className='flex flex-col'>
5647
<span className='font-medium text-sm'>{name}</span>
57-
<span className='text-xs text-red-500'>{getStatusText()}</span>
48+
{!installed && <span className='text-xs text-red-500'>Not Installed</span>}
5849
</div>
5950
</div>
6051
<Button
@@ -89,35 +80,9 @@ interface WalletSelectionProps {
8980
buttonClassName?: string;
9081
}
9182

92-
// Categorize wallets based on their name and type
93-
const categorizeWallets = (wallets: Wallet[]) => {
94-
const categories = {
95-
Hardware: [] as Wallet[],
96-
Remote: [] as Wallet[],
97-
'Web Signer': [] as Wallet[],
98-
Extensions: [] as Wallet[],
99-
};
100-
101-
wallets.forEach((wallet) => {
102-
const name = wallet.name.toLowerCase();
103-
if (name.includes('ledger')) {
104-
categories.Hardware.push(wallet);
105-
} else if (name.includes('walletconnect')) {
106-
categories.Remote.push(wallet);
107-
} else if (name.includes('signer') || name.includes('dedot')) {
108-
categories['Web Signer'].push(wallet);
109-
} else {
110-
categories.Extensions.push(wallet);
111-
}
112-
});
113-
114-
return categories;
115-
};
116-
11783
export function WalletSelection({ buttonLabel = 'Connect Wallet', buttonClassName = '' }: WalletSelectionProps) {
11884
const [isOpen, setIsOpen] = useState(false);
11985
const { wallets } = useTypink();
120-
const categorizedWallets = categorizeWallets(wallets);
12186

12287
return (
12388
<Dialog open={isOpen} onOpenChange={setIsOpen}>

packages/create-typink/templates/sol-nextjs/src/components/shared/wallet-selection.tsx

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,6 @@ const WalletButton = ({ walletInfo, afterSelectWallet }: WalletButtonProps) => {
3737
afterSelectWallet && afterSelectWallet();
3838
};
3939

40-
const getStatusText = () => {
41-
if (!installed) return 'Not Installed';
42-
};
43-
44-
const getActionText = () => {
45-
if (!installed) return 'Install';
46-
return 'Connect';
47-
};
48-
4940
return (
5041
<div
5142
className='flex items-center justify-between p-4 border border-gray-200 dark:border-gray-800 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors cursor-pointer group'
@@ -54,7 +45,7 @@ const WalletButton = ({ walletInfo, afterSelectWallet }: WalletButtonProps) => {
5445
<img className='rounded-sm' src={logo} alt={`${name}`} width={32} height={32} />
5546
<div className='flex flex-col'>
5647
<span className='font-medium text-sm'>{name}</span>
57-
<span className='text-xs text-red-500'>{getStatusText()}</span>
48+
{!installed && <span className='text-xs text-red-500'>Not Installed</span>}
5849
</div>
5950
</div>
6051
<Button
@@ -89,35 +80,9 @@ interface WalletSelectionProps {
8980
buttonClassName?: string;
9081
}
9182

92-
// Categorize wallets based on their name and type
93-
const categorizeWallets = (wallets: Wallet[]) => {
94-
const categories = {
95-
Hardware: [] as Wallet[],
96-
Remote: [] as Wallet[],
97-
'Web Signer': [] as Wallet[],
98-
Extensions: [] as Wallet[],
99-
};
100-
101-
wallets.forEach((wallet) => {
102-
const name = wallet.name.toLowerCase();
103-
if (name.includes('ledger')) {
104-
categories.Hardware.push(wallet);
105-
} else if (name.includes('walletconnect')) {
106-
categories.Remote.push(wallet);
107-
} else if (name.includes('signer') || name.includes('dedot')) {
108-
categories['Web Signer'].push(wallet);
109-
} else {
110-
categories.Extensions.push(wallet);
111-
}
112-
});
113-
114-
return categories;
115-
};
116-
11783
export function WalletSelection({ buttonLabel = 'Connect Wallet', buttonClassName = '' }: WalletSelectionProps) {
11884
const [isOpen, setIsOpen] = useState(false);
11985
const { wallets } = useTypink();
120-
const categorizedWallets = categorizeWallets(wallets);
12186

12287
return (
12388
<Dialog open={isOpen} onOpenChange={setIsOpen}>

0 commit comments

Comments
 (0)