Forum Replies Created
-
AuthorPosts
-
April 20, 2020 at 7:35 am in reply to: When attempting to refund LTC from a WCMP Order.. I get insufficient funds error #8155April 16, 2020 at 9:31 pm in reply to: Getting this random error sometimes: SyntaxError: JSON.parse: unexpected char… #8126d3vnu77Participant
🙂
April 16, 2020 at 5:53 pm in reply to: Possible for the WCMP vendor to select which coins he’d like to accept? #8122d3vnu77ParticipantI would imagine would take only 3 steps programmatically to make it work, right?
1. Give a customer an option to select coins what coins he accepts based on a list of selectable coins the admin selects.
2. Display which coins the vendor selects on the product page…Oh wait, I see with multiple vendors how this gets complicated…
I see now.
Thanks for all your hard work too, by the way!
d3vnu77ParticipantI think I figured it out! Thanks.
d3vnu77ParticipantI think the main reason I had to start hacking up the monero plugin is that the cryptonote coin I am making work with your plugin is a coin called 2ACoin.
This coin which is based off TurtleCoin does not seem to have a get_accounts RPC Call. Therefore I removed most of the accounts functionality from the plugin inorder to make it work. Also had to change all of your calls to camel case as the 2ACoin Wallet RPC API is formated in camelcase: as seen here:
d3vnu77ParticipantThis is the var_dump of the $this object inside of the adapter, when executing the above code, mind you I have cron turned off while I attempt to manually isolate the issue.
object(Dashed_Slug_Wallets_Coin_Adapter_Cryptonote_2ACoin)#2159 (4) { [“network_active”:”Dashed_Slug_Wallets_Coin_Adapter_Cryptonote”:private]=> bool(false) [“menu_slug”:protected]=> string(40) “wallets-menu-2acoin-cryptonote-full-node” [“option_slug”:protected]=> string(44) “wallets-2acoin-cryptonote-full-node-settings” [“_notices”:protected]=> object(Dashed_Slug_Wallets_Admin_Notices)#1033 (1) { [“admin_notices”:”Dashed_Slug_Wallets_Admin_Notices”:private]=> object(stdClass)#1032 (4) { [“error”]=> array(1) { [0]=> object(stdClass)#993 (2) { [“message”]=> string(149) “The wp_cron tasks have not run in the past 4 hours.You must either enable auto-triggering or trigger cron manually via curl/system-cron.” [“dismiss_option”]=> string(24) “wallets-cron-not-running” } } [“warning”]=> array(0) { } [“info”]=> array(0) { } [“success”]=> array(0) { } } } } check network
notice how the network_active property is false.Trying to understand the dynamic of this.
d3vnu77ParticipantThe problems seems to be with the get_balance method in the cryptonote adapter…
It seems to do a “network active” check which fails and then returns a balance of false.
public function get_balance() { static $balance = false; if ( false === $balance ) { var_dump($this); die('check network'); if ( $this->network_active ) { //if(1==1){ $result = $this->do_rpc_command('getBalance'); var_dump($result); die('got the balance'); $balance += round( $result->availableBalance * 1e-8, 8 ); } } return $balance; }
If I don’t check that the network is active everything works.
d3vnu77ParticipantAdjusted the “Seconds to memoize market API calls” to 0 and that fixed the issue..
July 29, 2019 at 7:35 pm in reply to: I would like to add another provider for an exchange rate #6662d3vnu77ParticipantFor instance coingecko has the price at 0.00000010 BTC and has been stuck their for ages. Meanwhile it currently trades 6 times higher than that at 0.00000060 BTC
-
AuthorPosts