Update type for remainingAccountsInfo

This commit is contained in:
Adw8 2025-02-06 16:13:45 +05:30
parent bfda39830a
commit e04c43baca
3 changed files with 16 additions and 4 deletions

12
package-lock.json generated
View File

@ -27,6 +27,7 @@
"devDependencies": {
"@types/big.js": "^6.2.2",
"@types/bn.js": "^5.1.6",
"@types/bs58": "^4.0.4",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
@ -954,6 +955,17 @@
"@types/node": "*"
}
},
"node_modules/@types/bs58": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/@types/bs58/-/bs58-4.0.4.tgz",
"integrity": "sha512-0IEpMFXXQi2zXaXl9GJ3sRwQo0uEkD+yFOv+FnAU5lkPtcu6h61xb7jc2CFPEZ5BUOaiP13ThuGc9HD4R8lR5g==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/node": "*",
"base-x": "^3.0.6"
}
},
"node_modules/@types/connect": {
"version": "3.4.38",
"resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz",

View File

@ -28,6 +28,7 @@
"devDependencies": {
"@types/big.js": "^6.2.2",
"@types/bn.js": "^5.1.6",
"@types/bs58": "^4.0.4",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",

View File

@ -116,7 +116,7 @@ export async function createVestingPlanV2(params: CreateVestingPlanParams) {
ASSOCIATED_TOKEN_PROGRAM_ID
);
let remainingAccountsInfo;
let remainingAccountsInfo: OptionRemainingAccountsInfoData | null = null;
let remainingAccounts: AccountMeta[] = [];
if (tokenProgram == TOKEN_2022_PROGRAM_ID) {
let inputTransferHookAccounts =
@ -196,8 +196,7 @@ export async function createVestingPlanV2(params: CreateVestingPlanParams) {
return escrow;
}
throw new Error;
throw error;
}
}
@ -227,7 +226,7 @@ export async function claimTokenV2(params: ClaimTokenParamsV2) {
ASSOCIATED_TOKEN_PROGRAM_ID
);
let remainingAccountsInfo;
let remainingAccountsInfo: OptionRemainingAccountsInfoData | null = null;
let remainingAccounts: AccountMeta[] | undefined = [];
if (tokenProgram == TOKEN_2022_PROGRAM_ID) {
let claimTransferHookAccounts =