Problem with sendassetfrom [closed]

+1 vote

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.

 

 

 

closed with the note: Sorry for wasting your time - found the problem - your suggestion helped me track down the issue in my code
asked Mar 3, 2017 by lenh
closed Mar 3, 2017 by lenh

1 Answer

0 votes
It's hard to debug without seeing the code. I would recommend inserting some debugging code in your PHP which displays the actual JSON-RPC request and response in full. Then it should be easy to see the problem, and you can copy it here as well.
answered Mar 3, 2017 by MultiChain
...