Add comment with senfrom

+3 votes
Hi, could you please help on this?

 

Im trying to add a simple comment to a sendfrom method using multichain-node.

ie: const tx = await multi.sendfrom(from, to amount, comment);

The comment is a simple string : 'Server share';

I use the same format as with BTC Core, which accept it.

 

But I keep getting this with multichain:

Error: value is type str, expected real

 

Please advice.

Matt
asked May 25, 2020 by Inzider

1 Answer

0 votes

Please consult the documentation on sendfrom here, it looks like you missed a parameter:

https://www.multichain.com/developers/json-rpc-api/

answered May 27, 2020 by MultiChain
Hi,

My fault, I did refactor my code and was trying to fix to floating decimal on amount with .toFixed() in js, which return a string...

Comments are now being saved.

Thanks for your reply.
Nice work - multichain is beauty!
...