Skip to content

Commit 133f580

Browse files
committed
sdk: fix lut casing (TODO)
TODO: update the build process to do this correctly
1 parent b928c39 commit 133f580

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

solana/ts/idl/2_0_0/ts/example_native_token_transfers.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1246,7 +1246,7 @@ export type ExampleNativeTokenTransfers = {
12461246
}
12471247
},
12481248
{
1249-
"name": "lut",
1249+
"name": "LUT",
12501250
"type": {
12511251
"kind": "struct",
12521252
"fields": [
@@ -3178,7 +3178,7 @@ export const IDL: ExampleNativeTokenTransfers = {
31783178
}
31793179
},
31803180
{
3181-
"name": "lut",
3181+
"name": "LUT",
31823182
"type": {
31833183
"kind": "struct",
31843184
"fields": [

solana/ts/lib/ntt.ts

+4
Original file line numberDiff line numberDiff line change
@@ -1048,6 +1048,10 @@ export namespace NTT {
10481048
if (major < 2) return null;
10491049

10501050
pdas = pdas ?? NTT.pdas(program.programId);
1051+
// @ts-ignore
1052+
// NOTE: lut is 'LUT' in the IDL, but 'lut' in the generated code
1053+
// It needs to be upper-cased in the IDL to compute the anchor
1054+
// account discriminator correctly
10511055
const lut = await program.account.lut.fetchNullable(pdas.lutAccount());
10521056
if (!lut) return null;
10531057

0 commit comments

Comments
 (0)