Hello,
The coin that is selected by default is the one that you select in Wallets → Frontend Settings → UI/display settings → Default coin. This applies throughout your site.
You can also override this selection in certain pages. In the page editor for any page, scroll to the bottom, and you will find a metabox titled “Bitcoin and Altcoin Wallets default coin”.
On the frontend, the plugin applies your selection by running the following JavaScript code. I am mentioning this because you may provide additional logic, by binding to the wallets_ready
bubbling event in the same way. https://github.com/dashed-slug/wallets/blob/5.0.2/assets/scripts/wallets-ko.js#L1022-L1029 You can get access to the wallets viewModel via wp.wallets.viewModels.wallets
from any variable scope.
Finally, if you were to use the static UIs (rather than dynamic ones), then you can pass the coin as an attribute, and the UI’s HTML will be rendered for that coin only (hence static). Static UIs are discussed in the accompanying documentation. For example: [wallets_balance]
would show you a box with a dropdown, where you can select a coin and display its balance, but [wallets_balance template="static" coin="BTC"]
would display the current user’s BTC balance only. It’s up to you to see if you find static templates more useful in your case.
Hope this answers your question.
with regards