dashed-slug.net › Forums › General discussion › Notification Suggestion
Tagged: blockexplorer, lowercase, url
- This topic has 7 replies, 2 voices, and was last updated 6 years, 7 months ago by alexg.
-
AuthorPosts
-
May 16, 2018 at 4:26 pm #3080AnonymousInactive
Hi Alex,
I’ve added a explorer link the withdrawal transaction notification:
Transaction Link: https://chainz.cryptoid.info/###SYMBOL###/tx.dws?###TXID###
But cryptoid doesn’t support the symbol to be in CAPS. Would it be possible to add another variable for the symbol in small letters? like ###SYMBOLsmall###?
Regards Philipp
May 16, 2018 at 4:39 pm #3085alexgKeymasterHello Philipp,
Block explorer links do not accept variables in the same way that email templates do.
your link would be something like https://chainz.cryptoid.info/XYZ/tx.dws?%s
Where XYZ would be your coin and %s is substituted with the TXID using the PHP sprintf function.
I can make it so that %2$s is lowercase TXID while %s or %1$s is the current uppercase value.
This will go into the next release.
regards
May 16, 2018 at 4:50 pm #3086AnonymousInactiveWell the txid works fine. Just cryptoid can’t handle XYZ as symbol they need xyz.
May 16, 2018 at 5:18 pm #3087alexgKeymasterOK in that case you should enter the coin symbol in lowercase.
There is no variable for the coin. Enter one link pattern per coin.
May 16, 2018 at 6:18 pm #3088AnonymousInactiveI just need the ###SYMBOL### (XYZ) and ###SYMBOLsmall### (xyz). Would that be possible?
May 17, 2018 at 6:28 am #3092alexgKeymasterHello,
No, actually variable substitution is not needed in the block explorer links.
You can enter the coin symbol in lowercase as part of the URI.
There are instructions on how to do this in the manual.
kind regards
May 17, 2018 at 5:32 pm #3103AnonymousInactiveFor me it is. My service supports multiple coins but I only have one notification. So I need a variable to determine the coin.
May 18, 2018 at 5:42 am #3106alexgKeymasterOK sounds like you could be doing something wrong.
There are three places where you can enter a blockexplorer url:
1. When you extend the
Dashed_Slug_Coin_Adapter
class to create your own coin adapter from scratch, you can override the methodsexplorer_uri_transaction()
andexplorer_uri_address()
. You can use the methodget_symbol()
to constuct your URI based on the actual symbol of the instance. You could define an abstract subclass that returns something like'https://chainz.cryptoid.info/' . $this->get_symbol() . '/tx.dws?%s'
and then not have to worry about this in any concrete implementations for each coin you instantiate.2. You can provide a URI by binding to the filter:
wallets_explorer_uri_tx_XXX
orthe filter: wallets_explorer_uri_add_XXX
where XXX is a coin symbol. In this case you have no choice – you have to use the XXX symbol in your URI pattern since it is already part of the filter you are binding to.3. In the MultiAdapter’s
coins.csv
file. Again, in this file every line is its own coin, so again you have to use the coin symbol as part of the URI.Hope this is clearer. I do not want to change the URI pattern, because that would break things. I am confused by what you mentioned “My service supports multiple coins but I only have one notification” Block explorer URIs have nothing to do with the notification mechanism. If you insist that none of the above solutions work for you, could you please explain why in more detail?
Thank you very much
kind regards
Alex -
AuthorPosts
- You must be logged in to reply to this topic.