Reputation: 13
I am trying to get Account Info Object from the public key stored in the Anonymous Party using the following:
accountService.accountInfo(programCurrency.getPartner().getOwningKey()).getState().getData();
But everytime I am getting null. I checked the Anonymous party object coming from the vault query is not null when I am logging it and I get the following:
Anonymous(DL5Z9Sv3285QANUNK5Vm6crWtFK2tE4QXUFoEoYuWH7ahm)
I still cannot understand why its returning null.
P.S.: The account for which I am trying to get info is hosted on another node, but while creation I am sharing the Account Info whith other nodes using the: ShareAccountInfo() subflow.
Upvotes: 0
Views: 534
Reputation: 2548
It is possible that the account was assigned a new public key that your node (the one that's querying using that public key) is not aware of; so although it has that account (because it was shared with it); it wasn't kept up to date with the new public keys that the account acquired.
Read here about syncing keys; check their flow SyncKeyMappingInitiator
which uses SyncKeyMappingFlow
to sync the keys.
You can also read about syncing keys here (search SyncKeyMappingFlow
).
Upvotes: 1