Last active
September 15, 2018 08:22
-
-
Save alex-georgiou/5430a8b92a5c199f6134b277ce028e24 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Disallow selling TOKEN for BTC in the Dashed-Slug Exchange extension to Bitcoin and Altcoin Wallets | |
* | |
* https://www.dashed-slug.net/bitcoin-altcoin-wallets-wordpress-plugin/exchange-extension/ | |
* | |
* @author alexg | |
*/ | |
function disallow_limit_ask_orders( $order_id = null, $args = array() ) { | |
if ( 'BTC' == $args['base_symbol'] && 'TOKEN' == $args['quote_symbol'] && 'ask' == $args['direction'] ) { | |
throw new Exception( 'You can only buy our TOKEN token, but you can never sell it, sucker!!!! hahaha' ); | |
} | |
} | |
add_filter( 'wallets_api_limit_order', 'disallow_limit_ask_orders', 0, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment