Alon Goren
Forum Replies Created
-
Forum: Reviews
In reply to: [Cryptocurrency Exchange] Cool startI’m working on custom CSS. THANKS!
Forum: Reviews
In reply to: [Cryptocurrency Exchange] Great plugin!Thank you! Please let me know if you have any feedback.
Forum: Reviews
In reply to: [Cryptocurrency Exchange] Cool and useful plugin!THANKS! That’s the next feature I will work on. It’s possible through the Totle API, just need to build it into this and decide ouw the UX will be, Something like [wpdex ETH DAI] will load the plugin with ETH/DAI trading pair.
Forum: Reviews
In reply to: [Cryptocurrency Exchange] Works like a charm!THANKS!
Forum: Reviews
In reply to: [Cryptocurrency Exchange] Good plugin, needs customizationThanks for being one of the first to try it out. If you venture into the Totle API docs you can choose specific tokens but it will take customizing the plugin. I’m gonna work on that next, but if you do it first, please share the code with me and I’ll give it to the community! Custom CSS coming soon!
Forum: Reviews
In reply to: [Cryptocurrency Exchange] Great, easy to use plugin!Thanks!!!
Forum: Developing with WordPress
In reply to: get option inside of a return function?Thanks, Joy!!! I appreciate the support. I read what you sent, played around a bit and ended up doing this (in case anyone else in the future finds this):
function cryptoexchange_function(){ $contract_address = get_option('custom_contract_address') ?? '0x5180d531C7113C2F7Dcbfc78c8462c6b9b45758f'; return '<script> const config = { sourceAssetAddress: null, sourceAmountDecimal: null, destinationAssetAddress: null, destinationAmountDecimal: null, apiKey: "5a8d0a24-7cce-4b3e-9203-1d88034dd64e", partnerContractAddress: "'. $contract_address .'", }; const nodeId = "totle-widget"; !function(){const t=document.createElement("script");t.type="text/javascript";const e=()=>{TotleWidget.default.run(config,document.getElementById(nodeId))};t.readyState?t.onreadystatechange=function(){"loaded"!=t.readyState&&"complete"!=t.readyState||(t.onreadystatechange=null,e())}:t.onload=function(){e()},t.src="https://widget.totle.com/latest/dist.js",document.getElementsByTagName("head")[0].appendChild(t)}(); </script><p><center><small><b>Swap your tokens below to get the best prices across all decentralized crypto exchanges.</b></small></center></p><div id="totle-widget"></div><p></p></html>'; }