I reply to all queries on the forums and via email, once per day, Monday to Friday (not weekends).

If you are new here, please see some information on how to ask for support. Thank you!

alexg

Forum Replies Created

Viewing 15 posts - 16 through 30 (of 2,207 total)
  • Author
    Posts
  • alexg
    Keymaster

    Hello,

    The error you mentioned is unavoidable. It’s simply the plugin checking whether there needs to be a migration from the old custom SQL tables that existed in versions before 6.0.0. Nothing to worry about.

    If you enable verbose logging in the settings, you will get more detail in the wordpress debug log on how the transactions are executed.

    The available balance does not count pending transactions, while the normal user balance does.

    Transactions, including deposits and withdrawals should be initiated in a pending state by your code, then they should either transition into a done or to a fail state by the wallet adapter. Does your transaction remain in a pending state?

    I am not sure what the problem you describe is. Can you please provide screenshots of the currency page and of the transaction page screens? You can either post them here or email me, whichever you prefer.

    Looking forward to your reply.

    with regards

    alexg
    Keymaster

    Hello,

    The code you provided does not work because you are creating a class Wallets that does not exist. There is a DSWallets\Wallet class that contains an adapter object of DSWallets\Wallet_Adapter class. The wallet adapter is an object that holds the connection information to the wallet as well as the code to communicate with the wallet. You can call get_new_address on the wallet adapter to get a new address.

    Once you have a $currency object, here’s how to generate a new address:

    $new_address = $currency->wallet->adapter->get_new_address( $currency );

    (It’s necessary to pass the currency into the method because there are wallets with multiple currencies e.g. CoinPayments wallet)

    It’s best to wrap this in a try..catch, because if there is any problem with communication with the wallet, this can throw.

    So, to put it all together:

    try {

    $new_address = $currency->wallet->adapter->get_new_address( $currency );

    } catch ( \Exception $e ) {
    error_log( “Could not generate a new address for $currency because: ” . $e.getMessage() );
    }

    In general, the UIs that require JavaScript, communicate with the plugin via its RESTful API, which is here and documented here.

    If you check out the code for the various API endpoints, you can see example code for the basic operations.

    Hope this helps.

    Please let me know if you have any more questions. I want to answer all of them and help you with your project.

    with regards

    alexg
    Keymaster

    Hello,

    You can use the functions in helpers/balances.php to get the balances.

    PHPdocumentor page:

    https://wallets-phpdoc.dashed-slug.net/wallets/files/build-helpers-balances.html

    Note that these functions are all under the DSWallets namespace. So you either need to be in that namespace, or prefix the functions with the namespace. e.g. $balances = DSWallets\get_all_balances_assoc_for_user( $user_id );

    You can see this particular function in action at the plugin’s user profile page code:

    https://github.com/dashed-slug/wallets/blob/6.2.4/admin/profile.php#L97-L216

    To be clear, this is the code that displays user balances in the user profile admin screen.

    Note the difference between balances and available_balances. The links point to the glossary.

    Please let me know if you have any more questions about anything.

    with regards

    alexg
    Keymaster

    Hello,

    Unfortunately there are no UIs currently that do not require JavaScript.

    I understand the need to avoid JavaScript in cases where tor must be used.

    If you can create your own forms and PHP handlers, then it’s very straightforward to interact with the plugin from PHP using the PHP API. Please see the following link for details and sample code on how to create transactions:

    https://wallets-phpdoc.dashed-slug.net/wallets/classes/DSWallets-Transaction.html

    For example, initiating a withdrawal would require you to create a new withdrawal transaction, and save it on the DB.

    There are also other ways to communicate with the plugin, but I think this is the one that’s relevant to your use case.

    I remain available to answer any questions you may have about this.

    Hope this helps.

    with regards

    in reply to: Im getting Error trying to download 2.0 #13575
    alexg
    Keymaster

    Oops! My apologies! Download is now fixed.

    If you encounter any difficulties using the adapter, please let me know in a new thread or by email.

    with regards

    in reply to: BTC Pay Server #13559
    alexg
    Keymaster

    Hello,

    While this is a good idea, I have not developed any BTCPay wallet adapter, and it’s not possible for me to develop one at this time.

    If you are interested in developing a wallet adapter yourself, or if you plan to hire a developer, I have provided information here:

    https://github.com/dashed-slug/wallets/blob/6.2.4/docs/developer.md#developing-wallet-adapters-wallet-adapters

    Sample code (stubs) are here: https://github.com/dashed-slug/my-wallet-adapter

    I am always available to answer any questions about this.

    with regards

    alexg
    Keymaster

    Hello,

    This is certainly not normal behavior. I am attaching a screenshot of what you should be seeing in this case.

    Before completing your order, you get a dropdown, showing you how much you would pay in each available cryptocurrency. This is calculated using the exchange rates on the system.

    Can you please email me a screenshot of that dropdown?

    Also, can you please check if the exchange rates on the currencies that you made available are set correctly? You can do this in the admin screen for each currency.

    Normally the exchange rates are kept up to date with data from CoinGecko. This is only done if you have set correctly the CoinGecko ID on each currency, and if the cron jobs are running.

    Looking forward to your reply.

    with regards,
    Alex

    Attachments:
    You must be logged in to view attached files.
    in reply to: E-Mail notifications #13305
    alexg
    Keymaster

    For the record, this has now been implemented in version 2.3.1. Sorry for the long delay. 😊

    in reply to: Order Placed/Filled Notification. #13304
    alexg
    Keymaster

    For the record, this has now been implemented in version 2.3.1. Sorry for the long delay. 😊

    in reply to: Bitcoin core Wallet Adapter installation #13301
    alexg
    Keymaster

    Even if you have disabled your firewall, the hosting provider has their own firewall to protect their systems. You must contact them and ask them to add a specific exception for incoming TCP ports to your RPC port on your host’s IP.

    Bottom line, the plugin must be able to contact the wallet. No other way around it.

    in reply to: Bitcoin core Wallet Adapter installation #13295
    alexg
    Keymaster

    Hello,

    1. Ensure that rpcallowip is set to the IP of your WordPress installation in CIDR notation.
    2. Ensure that rpcbind is set to the public-facing IP of your wallet node. This tells the wallet to listen on the correct NIC.
    3. If your wallet node is on a hosting provider, contact your hosting provider, and ask them to open their firewall for your server and for incoming TCP connections to your RCP port.

    Hope this helps. Please let me know if you continue to face problems.

    with regards

    in reply to: Bitcoin core Wallet Adapter installation #13291
    alexg
    Keymaster

    If you are using a strong password with rpcpassword, does it contain the equals (=) character?

    If so, you would be getting this problem. The equals character is used to assign values in the config file, and it can’t be used as part of the password.

    in reply to: Bitcoin core Wallet Adapter installation #13289
    alexg
    Keymaster

    Hello,

    HTTP_UNAUTHORIZED simply means that you have not entered the username/password correctly.

    Make sure that you understand the difference between using rpcuser/rpcpassword and rpcauth.

    You should use either user/pass or auth.

    (The values foo and bar I gave above are examples, you should replace them with the credentials you are planning to use.)

    Hope this helps. Please let me know if you have any more questions.

    with regards

    in reply to: Bitcoin core Wallet Adapter installation #13285
    alexg
    Keymaster

    Hello! Try a simple config at first (the following is only for connecting from localhost, if your WordPress is elsewhere, change the IP):

    server=1
    rpcallowip=127.0.0.1/8
    rpcbind=127.0.0.1
    rpcport=8332
    rpcuser=foo
    rpcpassword=bar

    If this works, then you can expand on it.

    If you tell me what error you are encountering, perhaps I can help. You can also get general help on bitcoin core installation at: bitcoin.stackexchange.com

    Hope you have a happy new year 2024!

    with regards

    in reply to: Rescan wallet transactions manually #13248
    alexg
    Keymaster

    In the latest version 6.2.0 of the plugin, it is now possible to set a block height to your wallet and the wallet will restart scanning for transactions from that height.

    For more information, please see the documentation at:

    https://github.com/dashed-slug/wallets/blob/6.2.0/docs/troubleshooting.md#i-am-unable-to-setup-the-transaction-notification-mechanism-on-a-bitcoin-like-full-node-wallet-how-can-i-ensure-that-transactions-are-eventually-scraped-from-the-wallet-and-appear-in-the-plugin

Viewing 15 posts - 16 through 30 (of 2,207 total)