I'm having a strange problem with the JSON RPC interface via PHP as follows:
Native asset is created (step1):
getnewaddress = (1)
grant to 1 issue,send,receive
issue to above address assetName Qty and multiplier
Value is transferred (step 2):
getnewaddress (2)
grant to 2 send,receive
sendassetfrom 1 to 2 of assetName with Qty
So far so good this all works 100%. But now if I want to reverse the transaction i.e.(step 3):
sendassetfrom 2 to 1 of assetName with Qty
I get an error - yet via the CLI the transaction goes through correctly.
I cannot understand why it's not working as the exact same code is being used for Step 2, surely then it should work for Step 3.
I've tried using grant (send, receive) on address 2 to no effect and have also tried setting anyone-can-send is true and anyone-can-receive is true in params.dat
Please could you assist as this is making no sense.