2

I'm developing a remittance system around Stellar and we generated our own custom assets of type credit_alphanum4. Now the issue is, when we send payments using these custom assets to destination account then balance successfully transferred to destination account but balance of sender account still remains the same. Need advice and help from you guys.

"balances": [
    {
      "balance": "1009.0100000",
      "limit": "922337203685.4775807",
      "asset_type": "credit_alphanum4",
      "asset_code": "<our-asset-code>",
      "asset_issuer": "<public-key>"
    },
    {
      "balance": "8.0000000",
      "limit": "922337203685.4775807",
      "asset_type": "credit_alphanum4",
      "asset_code": "<our-asset-code>",
      "asset_issuer": "<public-key>"
    },
    {
      "balance": "133.2257500",
      "asset_type": "native"
    }
  ]
| improve this question | | | | |
  • Did you find a solution for this? I'm currently experimenting using Stellar Laboratory and testnet and running into the same problem. The total for my custom asset is not decreasing for the distribution account. – Martin Carstens Apr 16 '18 at 3:30
  • I also meet this problems, I tried to do load test on my private Stellar (many wallets send to one wallet) and getting successful transactions but the destination wallet lost some tokens – Khai Nguyen May 27 '19 at 8:43
1

In order to retrieve the updated balance, you need to wait until the transaction is submitted to the network (for example, once the transaction is submitted, Horizon returns a transaction reference, or error code in case of failure) and then load the source account once more (e.g. server.loadAccount('<soure account public key>')).

In theory, there may be a lag between ledger application and Horizon information update, but in practice it is updated even before you receive a response with a confirmation of successful transaction.

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.