Open extra topbar

How to add multiple Coins

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

How to add multiple Coins

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #8994
    ademkagz
    Participant

    Hello!
    I added 1 coin. Now when I add more Coins with plugins, there comes an error that the function already used. So I renamed the function. Now it doesn’t come up in the Wallets as a tab. How can I add more?

    #8995
    ademkagz
    Participant

    And I already tried everything you posted nothing works. When I activate the plugin, the row of the 2nd coin doesn’t show up in the Wallets Tab

    #8996
    alexg
    Keymaster

    Hello,

    Please describe what you did exactly, and which coin adapter you are using. Once you do, I will transfer this thread to the correct forum and will provide assistance.

    with regards

    #8997
    ademkagz
    Participant

    it was the multi node coin adapter

    #8999
    alexg
    Keymaster

    OK.

    Suppose you want to add two coins, with symbols ABC and XYZ.

    This is how you can use the wallets_multiadapter_coins filter to add more than one coin (I have omitted most of the settings for clarity):

    function wallets_multiadapter_coins_filter( $coins ) {
    
    	$coins['ABC'] = array( // replace ABC with the coin's ticker symbol in this line
    
    		// Coin symbol (again)
    		'symbol' => 'ABC',
    
    		// Coin name
    		'name' => 'ABC coin',
    
    		// MORE SETTINGS GO HERE
    
    		// URL to an 64x64 icon for the coin. Or leave empty to pull the icon from 'assets/sprites/SYMBOL.png'.
    		'icon url' => 'http://www.example.com/abc-coin-icon-64x64.png',
    	);
    
    	$coins['XYZ'] = array( // replace XYZ with the coin's ticker symbol in this line
    
    		// Coin symbol (again)
    		'symbol' => 'XYZ',
    
    		// Coin name
    		'name' => 'XYZ coin',
    
    		// MORE SETTINGS GO HERE
    
    		// URL to an 64x64 icon for the coin. Or leave empty to pull the icon from 'assets/sprites/SYMBOL.png'.
    		'icon url' => 'http://www.example.com/xyz-coin-icon-64x64.png',
    	);
    
    	return $coins;
     }
    
    add_filter( 'wallets_multiadapter_coins', 'wallets_multiadapter_coins_filter' );

    If you really wanted to define multiple functions you could, but there’s no need.

    #9000
    ademkagz
    Participant

    I added that to the Plugin but it still only shows the first Coin

    #9001
    ademkagz
    Participant

    Sorry, now it doesn’t show any coins

    #9002
    alexg
    Keymaster

    OK,

    Please answer all of the points below:

    1. You say you see no coins. Where do you see no coins? At the frontend UIs, or at the admin section (Wallets -> Adapters)?

    2. If the coins are listed in the admin section, what is the status of the coins? If there’s any error in the status column, please copy and paste it so I can see.

    3. Is your plugin file activated? See the Plugins screen and check your PHP file.

    4. What is the exact code you entered in the PHP file? If you show me, I can look at your code to see if there’s any errors.

    with regards

    P.S. In general, please try to be more specific so I can help you. (see point 3 here). Thank you.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.