ecency / hivesigner-sdk

Hivesigner SDK
https://hivesigner.com
MIT License
2 stars 1 forks source link

[QUESTION] Payment Decline #21

Closed zackrspv closed 1 year ago

zackrspv commented 1 year ago

Using Hive Signer SDK, how do we specify a payment decline for a given post? Ergo, if the user wishes NOT to monetize the post, but still post it to the blockchain, we can usually specify 'decline payment' on hive.blog; but how can we do that via the SDK?

feruzm commented 1 year ago

@zackrspv Try .sendOperations method where you can include multiple operations in single call. One operation will be post/content publishing operations, 2nd one will be comment_options operation that defines decline payouts settings. Let me know if it works

zackrspv commented 1 year ago

@feruzm do you have an example of that JSON element showing payment decline? I tried doing one on hive.blog and looking at the raw JSON that was posted onto the chain, but it's not there, even though it shows on the frontend.

feruzm commented 1 year ago

@zackrspv I would suggest for you to check ecency.com source code: https://github.com/ecency/ecency-vision or hive.blog source code: https://gitlab.syncad.com/hive/condenser

basically you will do comment_options operation with dp declined payment and comment operation into same operation array. Do sendOperations after that.

Screenshot 2022-08-08 at 22 18 19
zackrspv commented 1 year ago

Thanks, we have adjusted using the code above w/o issue.