Skip to content

Commit 24e57d3

Browse files
committed
fix: unnecessary truncation of arguments for Solana instructions
1 parent 5a54101 commit 24e57d3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

server/services/clientSolana.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,10 +354,8 @@ export async function executeSolanaProgram({
354354
}
355355
const args = instructionArgs.map(({ name, type }) =>
356356
type === 'number'
357-
? new BN(
358-
(report[name as keyof typeof report] ?? 0).toString().slice(0, 4)
359-
)
360-
: (report[name as keyof typeof report] ?? '').toString().slice(0, 4)
357+
? new BN((report[name as keyof typeof report] ?? 0).toString())
358+
: (report[name as keyof typeof report] ?? '').toString()
361359
);
362360
const tx = await method(...args)
363361
.accounts({

0 commit comments

Comments
 (0)