@agent-fuel/sdk 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3834,9 +3834,16 @@ async function pay(args) {
3834
3834
  receiptUsed: receipt,
3835
3835
  systemProgram: SystemProgram.programId
3836
3836
  });
3837
- const spendIx = await spendBuilder.instruction();
3838
- const recordIx = await recordBuilder.instruction();
3839
- const tx = new Transaction().add(createAtaIx, spendIx, recordIx);
3837
+ const computeBuilder = rep.methods.computeScore().accounts({
3838
+ caller: agent.publicKey,
3839
+ agentProfile
3840
+ });
3841
+ const [spendIx, recordIx, computeIx] = await Promise.all([
3842
+ spendBuilder.instruction(),
3843
+ recordBuilder.instruction(),
3844
+ computeBuilder.instruction()
3845
+ ]);
3846
+ const tx = new Transaction().add(createAtaIx, spendIx, recordIx, computeIx);
3840
3847
  try {
3841
3848
  const signature = await sendAndConfirmTransaction(
3842
3849
  connection,