Wishing Wall: donations, comments, ranked by amount paid

https://wishingwall.ochremusic.com

Here’s a little project I’ve been working on. Users donate to an address, leaving a comment if they wish, and the comments are listed in the order of the donation/fee paid. Perhaps useful for blog tipping, streaming, Twitch etc. A real-time public tip-jar.

It accepts both mainnet and testnet addresses, and will switch networks as necessary.

It was previously client side only, but in order for secure sites to be able to include it as an iframe, it needs to be https, so I’ve added a backend that’ll talk to the NEM nodes (most of which are not https), then pass data along to the client via a websocket.

One thing I really wish we had at this point is testnet support on the iOS app. Any chance we’ll see that, so we can scan QR codes on the testnet too? Would make testing much easier.

Anyway, any comments or ideas/suggestions are welcome. I was thinking a ‘boost’ option to ‘upvote’ or top-up donations might be cool, but I’d have to think of a way to tie these with the original comment and sum the donations.

3 Likes

Just added an update. You can try this out with your own addresses (both testnet and mainnet should work) by adding a query at the end of the url, like this:

http://wishing-wall.surge.sh/?address=YOURADDRESS

It’ll spool through all transactions, so if you have thousands it might take a few seconds to grab them.

EDIT: Added more options: ‘max=[number]’ (default: 100 transactions), ‘sortByValue=[bool]’ (default: true)

e.g.

http://wishing-wall.surge.sh/?address=YOURADDRESS&max=20&sortByValue=false

That’s probably a more useful ‘Twitch mode’. :slight_smile: Rather than all-time txs sorted by value.

So you can now customise the address, set a limit on how many transactions to fetch and display, and whether to sort by value or time received. I’ll get an options panel made for these too.

cool project! I consider using that or an own similar feature on nem-tools :slight_smile:

1 Like

This is so simple and well executed… I like it.

You could build an decay function so posts with many xem would decay over time. Could be perfect for applications like twitch where viewers like donating and get some recognition.

1 Like

Thanks folks. Yeah, I spent some time on UI details like not displaying insignificant trailing zeros on XEM decimals, as I feel this makes it much easier to see at a glance how much XEM has been paid/donated. Things like emojis give it a bit more charm too (zipper mouth for encrypted, no mouth for no comment), as well as a warmer overall colour scheme.

I might just add a field for addresses and options (number to display, sort by recent or value), save them in local browser storage, so people can use the site as their donations page, rather than have it be something that needs to be incorporated into another site.

And thank you for topping up my testnet account, marc0o. :slight_smile: Lost a bit trying out that supernode co-op hackathon project.

I’ll look into offering a sharable widget too. Looks like it could sit in an iframe easily enough; will add a couple of colour options to integrate more seamlessly.

1 Like

Okay, added options, a link to bookmark a particular address (including options), and some embed code.

I’ve no idea why I can’t get websockets to work on the mainnet (or why unconfirmed won’t work on either networks), so I’ll leave it for now. Hopefully someone finds it useful.

1 Like

Websockets sorted now. Decided to go for native websockets with stomp instead of sockjs, and all seems fine.

really great! I will use the widget within the upcoming new release of nem-tools.com :slight_smile:

1 Like

Awesome, thanks! The embed’s identical to the site at the moment, but I’ll add some tweaks to make it more embed friendly, like title customisation/removal.

can you switch to https?

widget can otherwise not be loaded on nem-tools.com :frowning:

here a list of https nodes if you need them:

2 Likes

Shall do! Are there any testnet nodes available on https?

I switched it over to la.nemchina.com, which seems to work, but the websocket connection (port 7779) fails after a minute or so, every time.

wss://la.nemchina.com:7779/w/messages/websocket

Seems to happily subscribe and receive blocks until it mysteriously loses connection.

mhhh, are you on telegram? maybe you can ask in the tech channel

I activated the wishwall hoping it will work soon =)

see it in action here -> https://nem-tools.com/#/guestbook

Yep – I’ll join the tech channel and ask. :slight_smile:

For some reason the websocket’s getting disconnected when trying to receive a new transactions, as if I refresh the page I notice a new transaction will have been received.

Odd, as it receives messages from the block height subscription just fine, but not the conf/unconf transactions on https/wss.

did you solve the problem? it seemed to work last time I checked a few minutes ago :slight_smile:

Sadly not! While it’ll work fetching the initial bundle of transactions, websockets for realtime transactions won’t work properly on those https nodes. Not really sure why, so I’m reading up on setting up my own node now to see if it’ll make a difference, or if I can at least see why the connection drops as soon as there’s a new tx frame received.

1 Like

:frowning: wish you good luck!

1 Like

Thanks! Actually I might try a different stop client first. If that sorts it it’ll save me the bother of spinning-up new nodes. :slight_smile: