Trying to delete a stellar account with exist Data Entity

92 views Asked by At

On stellar account

 "signers": [
    {
      "weight": 1,
      "key": "GAVWIBPHF7JQ7BHHDKTZTWOJ2W4M2FVSGTSRZUPHBJC7DBMN7O6PG4OW",
      "type": "ed25519_public_key"
    }
  ],
  "data": { //data entity
    "asd": "ZHNh" ,
    "banana": "ZSfd0"
  },
  "paging_token": "GAVWIBPHF7JQ7BHHDKTZTWOJ2W4M2FVSGTSRZUPHBJC7DBMN7O6PG4OW"

I trying to delete/merge this account with Account Merge operation. but found an 400 error.

I think the error came from exist data entity.

How to remove all data entity in once time -not key by key.

Environment

Stellar-sdk javascript

1

There are 1 answers

0
Phakhin Deesee On

For now, I decided to sign all transactions and pass them to some server to submit to Stellar network. With this, the private key will not leak. After merging the account(close account), it will be safe to reuse the key pair.