From b05d59f2705f81412c69ba2c6ccf97cb0078f269 Mon Sep 17 00:00:00 2001
From: simke9445 <simke9445@gmail.com>
Date: Thu, 14 Mar 2024 15:56:28 +0100
Subject: [PATCH] fix sending coins when funding account is provided

---
 apps/warp-protocol/src/tx/useMigrateJobTx.ts | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/apps/warp-protocol/src/tx/useMigrateJobTx.ts b/apps/warp-protocol/src/tx/useMigrateJobTx.ts
index b0acae8..edef734 100644
--- a/apps/warp-protocol/src/tx/useMigrateJobTx.ts
+++ b/apps/warp-protocol/src/tx/useMigrateJobTx.ts
@@ -89,9 +89,9 @@ export const useMigrateJobTx = (waitForCompletion?: boolean) => {
         .executions(executions)
         .compose();
 
-      const createJobV2Tx = await sdkv2.tx.createJob(wallet.walletAddress, createJobMsg, [
-        new Coin(nativeTokenDenom, operationalAmount),
-      ]);
+      const coins = fundingAccount ? [] : [new Coin(nativeTokenDenom, operationalAmount)];
+
+      const createJobV2Tx = await sdkv2.tx.createJob(wallet.walletAddress, createJobMsg, coins);
       const deleteJobV1Tx = await sdkv1.tx.deleteJob(wallet.walletAddress, job.info.id);
 
       const msgs = [...createJobV2Tx.msgs, ...deleteJobV1Tx.msgs];