Skip to content

Commit f2e01c2

Browse files
simplify load
1 parent e2204e0 commit f2e01c2

7 files changed

Lines changed: 155 additions & 342 deletions

File tree

js/token-interface/src/instructions/approve.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type {
66
CreateApproveInstructionsInput,
77
CreateRawApproveInstructionInput,
88
} from '../types';
9-
import { buildLoadInstructionList } from './load';
9+
import { createLoadInstructions } from './load';
1010
import { toInstructionPlan } from './_plan';
1111

1212
const LIGHT_TOKEN_APPROVE_DISCRIMINATOR = 4;
@@ -68,7 +68,7 @@ export async function createApproveInstructions({
6868
assertAccountNotFrozen(account, 'approve');
6969

7070
return [
71-
...(await buildLoadInstructionList({
71+
...(await createLoadInstructions({
7272
rpc,
7373
payer,
7474
owner,
@@ -101,7 +101,7 @@ export async function createApproveInstructionsNowrap({
101101
});
102102

103103
return [
104-
...(await buildLoadInstructionList({
104+
...(await createLoadInstructions({
105105
rpc,
106106
payer,
107107
owner,

js/token-interface/src/instructions/burn.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type {
77
CreateRawBurnCheckedInstructionInput,
88
CreateRawBurnInstructionInput,
99
} from '../types';
10-
import { buildLoadInstructionList } from './load';
10+
import { createLoadInstructions } from './load';
1111
import { toInstructionPlan } from './_plan';
1212

1313
const LIGHT_TOKEN_BURN_DISCRIMINATOR = 8;
@@ -120,7 +120,7 @@ export async function createBurnInstructions({
120120
});
121121

122122
return [
123-
...(await buildLoadInstructionList({
123+
...(await createLoadInstructions({
124124
rpc,
125125
payer,
126126
owner,
@@ -165,7 +165,7 @@ export async function createBurnInstructionsNowrap({
165165
});
166166

167167
return [
168-
...(await buildLoadInstructionList({
168+
...(await createLoadInstructions({
169169
rpc,
170170
payer,
171171
owner,

js/token-interface/src/instructions/freeze.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import type {
99
CreateFreezeInstructionsInput,
1010
CreateRawFreezeInstructionInput,
1111
} from '../types';
12-
import { buildLoadInstructionList } from './load';
12+
import { createLoadInstructions } from './load';
1313
import { toInstructionPlan } from './_plan';
1414

1515
const LIGHT_TOKEN_FREEZE_ACCOUNT_DISCRIMINATOR = Buffer.from([10]);
@@ -42,7 +42,7 @@ export async function createFreezeInstructions({
4242
assertAccountNotFrozen(account, 'freeze');
4343

4444
return [
45-
...(await buildLoadInstructionList({
45+
...(await createLoadInstructions({
4646
rpc,
4747
payer,
4848
owner,
@@ -70,7 +70,7 @@ export async function createFreezeInstructionsNowrap({
7070
assertAccountNotFrozen(account, 'freeze');
7171

7272
return [
73-
...(await buildLoadInstructionList({
73+
...(await createLoadInstructions({
7474
rpc,
7575
payer,
7676
owner,

0 commit comments

Comments
 (0)