# Transaction "in\_ledger" but balance not changed

**URL:** <https://forum.cardano.org/t/transaction-in-ledger-but-balance-not-changed/86712>\
**Category:** Cardano Integration\
**Created:** [27 November 2021 15:12 UTC](https://forum.cardano.org/t/transaction-in-ledger-but-balance-not-changed/86712 "2021-11-27T15:12:49Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oliver\_Longhi](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/oliver_longhi/32/46964_2.png) [@Oliver\_Longhi](https://forum.cardano.org/u/Oliver_Longhi)\
**Post date:** [27 November 2021 15:12 UTC](https://forum.cardano.org/t/transaction-in-ledger-but-balance-not-changed/86712/1 "2021-11-27T15:12:49Z")

</div>

HI,

I’m playing with cardano-wallet-js and I am not able to transfer ADAs between wallets created by me.

i’m running testnet and I’ve created this transaction:

- 70ba6326de63c76c51dbfdf931f7159451684ba298c4ed4a4fbc5322a8d2f224

Transaction status is “in\_ledger” but the balance of the destination wallet is still zero. Is this the final state or it should change to “confirmed” or something else? Am I missing to do something?

My node (´/network/information`) is in sync:

```auto
  "sync_progress": {
    "status": "ready"
  },

```

And the wallet is ready too (`/wallets/d6c1908fadf6fbb686d706cc257715774f776c66`). I am not sure whether this piece is relevant or not though.

```auto
  "state": {
    "status": "ready"
  },

```

The code below is the script I am running to obtain wallets’ balances.

Thanks in advance.

```auto
const { WalletServer, AddressWallet } = require('cardano-wallet-js');

let main = async () => {
  let walletServer = WalletServer.init('http://localhost:8090/v2');

  let information = await walletServer.getNetworkInformation();
  console.log('Network Information');
  console.log(information);

  let wallet1 = await walletServer.getShelleyWallet('989f115d454222052deb72d8f3a65413c7fcba78');
  let wallet2 = await walletServer.getShelleyWallet('d6c1908fadf6fbb686d706cc257715774f776c66');
  
  let balance1 = await wallet1.getTotalBalance();    
  console.log('Wallet 1 Next Addres Total Balance', balance1);
  let address1 = await wallet1.getNextAddress();
  console.log('Wallet 1 Next Addres', address1.id);
  
  let balance2 = await wallet2.getTotalBalance();    
  console.log('Wallet 2 Next Addres Total Balance', balance2);
  let address2 = await wallet2.getNextAddress();
  console.log('Wallet 2 Next Addres', address2.id);

  let transactions = await wallet1.getTransactions();
  console.log('\nLast transactions:', transactions[0])
}

main();

```

---

<div class="post-metadata">

**Author:** ![Alexd1985](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/alexd1985/32/23759_2.png) [@Alexd1985](https://forum.cardano.org/u/Alexd1985)\
**Post date:** [27 November 2021 16:24 UTC](https://forum.cardano.org/t/transaction-in-ledger-but-balance-not-changed/86712/2 "2021-11-27T16:24:11Z")

</div>

hi,

the node is 100% synced?

---

<div class="post-metadata">

**Author:** ![Oliver\_Longhi](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/oliver_longhi/32/46964_2.png) [@Oliver\_Longhi](https://forum.cardano.org/u/Oliver_Longhi)\
**Post date:** [28 November 2021 14:07 UTC](https://forum.cardano.org/t/transaction-in-ledger-but-balance-not-changed/86712/3 "2021-11-28T14:07:18Z")

</div>

This is my /network/information output:

```auto
{
  "network_tip": {
    "time": "2021-11-28T14:06:16Z",
    "epoch_number": 171,
    "absolute_slot_number": 43739160,
    "slot_number": 236760
  },
  "node_era": "alonzo",
  "node_tip": {
    "height": {
      "quantity": 3109927,
      "unit": "block"
    },
    "time": "2021-11-28T14:06:12Z",
    "epoch_number": 171,
    "absolute_slot_number": 43739156,
    "slot_number": 236756
  },
  "sync_progress": {
    "status": "ready"
  },
  "next_epoch": {
    "epoch_start_time": "2021-11-30T20:20:16Z",
    "epoch_number": 172
  }
}

```

---

<div class="post-metadata">

**Author:** ![Alexd1985](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/alexd1985/32/23759_2.png) [@Alexd1985](https://forum.cardano.org/u/Alexd1985)\
**Post date:** [28 November 2021 14:14 UTC](https://forum.cardano.org/t/transaction-in-ledger-but-balance-not-changed/86712/4 "2021-11-28T14:14:21Z")

</div>

> [@Oliver\_Longhi](#):
>
> ` "epoch_number": 171,`

Not synced, we are in epoch 305, wait for the node to sync before to submit transactions… or u are on tesnet?

---

<div class="post-metadata">

**Author:** ![Oliver\_Longhi](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/oliver_longhi/32/46964_2.png) [@Oliver\_Longhi](https://forum.cardano.org/u/Oliver_Longhi)\
**Post date:** [28 November 2021 14:21 UTC](https://forum.cardano.org/t/transaction-in-ledger-but-balance-not-changed/86712/5 "2021-11-28T14:21:48Z")

</div>

I’m on testnet.

---

<div class="post-metadata">

**Author:** ![Alexd1985](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/alexd1985/32/23759_2.png) [@Alexd1985](https://forum.cardano.org/u/Alexd1985)\
**Post date:** [28 November 2021 17:17 UTC](https://forum.cardano.org/t/transaction-in-ledger-but-balance-not-changed/86712/6 "2021-11-28T17:17:28Z")

</div>

> [@Oliver\_Longhi](#):
>
> 70ba6326de63c76c51dbfdf931f7159451684ba298c4ed4a4fbc5322a8d2f224

This is your transaction?

[https://explorer.cardano-testnet.iohkdev.io/en/transaction?id=70ba6326de63c76c51dbfdf931f7159451684ba298c4ed4a4fbc5322a8d2f224](https://explorer.cardano-testnet.iohkdev.io/en/transaction?id=70ba6326de63c76c51dbfdf931f7159451684ba298c4ed4a4fbc5322a8d2f224)

2 addresses

[https://explorer.cardano-testnet.iohkdev.io/en/address?address=addr\_test1qzxmlag3xyujhlpka543wx86zfpys3duwlegehm2qg02gvlgrpmdqazdf0j5rver74m86hrxunte6fvrflwy7wde6hzq0qxsnd](https://explorer.cardano-testnet.iohkdev.io/en/address?address=addr_test1qzxmlag3xyujhlpka543wx86zfpys3duwlegehm2qg02gvlgrpmdqazdf0j5rver74m86hrxunte6fvrflwy7wde6hzq0qxsnd)

and

[https://explorer.cardano-testnet.iohkdev.io/en/address?address=addr\_test1qp0vsq7wyehlanhuu2gd298mm7v42dglxyf4hzqshtua9v09anm3ktlq69wzekpclawj82cfghct7m3c2gtvhqhaczvsq6q88a](https://explorer.cardano-testnet.iohkdev.io/en/address?address=addr_test1qp0vsq7wyehlanhuu2gd298mm7v42dglxyf4hzqshtua9v09anm3ktlq69wzekpclawj82cfghct7m3c2gtvhqhaczvsq6q88a)

---

<div class="post-metadata">

**Author:** ![Oliver\_Longhi](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/oliver_longhi/32/46964_2.png) [@Oliver\_Longhi](https://forum.cardano.org/u/Oliver_Longhi)\
**Post date:** [28 November 2021 17:52 UTC](https://forum.cardano.org/t/transaction-in-ledger-but-balance-not-changed/86712/7 "2021-11-28T17:52:30Z")

</div>

Yes, this is the transaction that I want to use to transfer 10 ADAs between accounts.

The origin wallet is is:

> 989f115d454222052deb72d8f3a65413c7fcba78

while the destination wallet and address are:

> d6c1908fadf6fbb686d706cc257715774f776c66

> addr\_test1qp0vsq7wyehlanhuu2gd298mm7v42dglxyf4hzqshtua9v09anm3ktlq69wzekpclawj82cfghct7m3c2gtvhqhaczvsq6q88a

This was the code I used:

```auto
  let walletServer = WalletServer.init('http://localhost:8090/v2');

  let wallet1 = await walletServer.getShelleyWallet('989f115d454222052deb72d8f3a65413c7fcba78');
  let wallet2 = await walletServer.getShelleyWallet('d6c1908fadf6fbb686d706cc257715774f776c66');
  
  let balance1 = await wallet1.getTotalBalance();    
  console.log('Wallet 1 Total Balance', balance1);
  let address1 = await wallet1.getNextAddress();
  console.log('Wallet 1 Next Addres', address1.id);
  
  let balance2 = await wallet2.getTotalBalance();    
  console.log('Wallet 2 Total Balance', balance2);
  let address2 = await wallet2.getNextAddress();
  console.log('Wallet 2 Next Addres', address2.id);

  let receiverAddress = await wallet2.getNextAddress();
  let amount = 10000000; // 10 ADA
  let estimatedFees = await wallet1.estimateFee([receiverAddress], [amount]);
  console.log('Estimated fees', estimatedFees);

  let passphrase = '.........';
  let metadata = {0: 'testing 3!'};
  let transaction = await wallet1.sendPayment(passphrase, [receiverAddress], [amount], metadata);
  console.log('Transaction', transaction);

```

This is my first interaction with cardano and I don’t know why it has created two outputs. Seems like the second output is pointing to another address in the origin wallet and serves as a kind of change, but it is only a guess that I have.

Let me make a question. Do I have to move the ADA received from the address to the wallet?

---

<div class="post-metadata">

**Author:** ![Oliver\_Longhi](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/oliver_longhi/32/46964_2.png) [@Oliver\_Longhi](https://forum.cardano.org/u/Oliver_Longhi)\
**Post date:** [28 November 2021 17:54 UTC](https://forum.cardano.org/t/transaction-in-ledger-but-balance-not-changed/86712/8 "2021-11-28T17:54:09Z")

</div>

Yes, that is my transaction.

---

<div class="post-metadata">

**Author:** ![Alexd1985](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/alexd1985/32/23759_2.png) [@Alexd1985](https://forum.cardano.org/u/Alexd1985)\
**Post date:** [28 November 2021 18:06 UTC](https://forum.cardano.org/t/transaction-in-ledger-but-balance-not-changed/86712/9 "2021-11-28T18:06:30Z")

</div>

Follow this guide, step 18.9 Send a simple transaction example

> **[18. Operational and Maintenance Tips](https://www.coincashew.com/coins/overview-ada/guide-how-to-build-a-haskell-stakepool-node/18.-operational-and-maintenance-tips)**

replace mainnet with testnet

```auto

--testnet-magic 1097911063

```

---

<div class="post-metadata">

**Author:** ![Oliver\_Longhi](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/oliver_longhi/32/46964_2.png) [@Oliver\_Longhi](https://forum.cardano.org/u/Oliver_Longhi)\
**Post date:** [29 November 2021 01:26 UTC](https://forum.cardano.org/t/transaction-in-ledger-but-balance-not-changed/86712/10 "2021-11-29T01:26:23Z")

</div>

Thank you @Alexd1985 .

Does anyone else has used cardano-wallet-js and knows what I am doing wrong?
