Coding Interruptus
This is a value for value post: see the explanation in the footer.
Doing the Work
I started off the day doing the work.
- I got the all import Dark Mode selector on the site;
- a Language selector (because I'm determined to make the next site in Spanish and whatever other languages the Hive team can help me with);
- I added an indicator for whether Keychain is installed;
- I installed the
hive-tx-js
library by @mahdiyari
Hive-tx-js Needs a bit more Discussion
I say I installed hive-tx-js
but actually I don't think I did. I tried the yarn add hive-tx
way of doing this but try as I might I couldn't find the right magic spell to get that into my code.
In the end I copied a file called hive-tx.min.js
which I got from Github into the assets
folder on my site and when I want to use it I include import "src/assets/hive-tx.min.js"
in my code.
I'd love to know if there is a better way to do this and I really do need to learn a whole lot more about how Javascript handles 3rd party libraries and importing. I'm pretty clueless about this stuff right now but I'll learn.
And then the interruption
At some point this afternoon I started listening to the second half of the @cttpodcast from Saturday night which I was on for the first hour but then dropped off.
I started listening on a newly released Beta version of the Fountain Podcasting App. As I listened I started streaming sats and after a couple of payments I noticed that my Telegram internal notification system was going nuts with errors:
This system has been very reliable for over a year now so this is kinda rare.
That itemID
is supposed to be an integer (int
) but Fountain's new version was sending this string.
Fortunately I jumped on Podcastindex.social and Oscar Merry responded very quickly and fixed this immediately. This left me with a few messed up payments in my database and because these have already been sent by Fountain and received by my Lightning Node I can't really change them.
I'm actually stuck now permanently accounting for this mistake in my code (at least until I clear down my Lightning Node's database at some point which I will probably have to do one day).
That's all for today
I leave you with the show we recorded on Saturday night. I think the discussion I was involved in at the start with @theycallmedan and @starkerz is particularly important for a whole bunch of Bitcoin Maxis who'll never listen to it. Their loss.
Value for Value
For the last few months while building @v4vapp I was generously supported by the DHF. Going forward I have a much more modest support which covers direct server costs and a little of my time.
If you appreciate the work I do on and around Hive, you can express this directly: upvoting posts on Hive is great. Also consider a direct donation (there's a Tip button on Hive or a Lightning Address) on all my posts.
Support Proposal 244 on PeakD
Support Proposal 244 with Hivesigner
Support Proposal 244 on Ecency
Vote for Brianoflondon's Witness KeyChain or HiveSigner
"-js" part is usually not in the package name of npm packages
It is
hive-tx
https://www.npmjs.com/package/hive-tx
I did install it right but can't figure out how to import from that into a Vue 3 spa. Any suggestions?
You import it like any other npm package.
If I do
yarn add hive-tx
(without -js).Then I put in my vue component:
import { hiveTx } from "hive-tx"
I immediately get this:
ReferenceError: Buffer is not defined
I've tried adding Buffer but fundamentally there's some issue here with using things that want to be running via Node and I do not understand the Javascript universe well enough to understand this.
There's some magic I'm missing that nobody ever talks about.
You can use the minified JS if that's the case. There are ways to define
Buffer
in different environments though. For example in Angular adding the following to the polyfills.ts file would do the trick.I've added this to quasar.conf:
And created a file
buffer.js
in theboot
folder:and
hive-tx
still throws this error:Nothing is ever as easy as
yarn add ...
with javascript or so it seems to me.https://twitter.com/LovingGirlHive/status/1658171873056919552
I don't know why no matter how much I tried to learn the coding and programming stuff, I always give up along the journey due to the complexity
What a great thing to know about coding, technology advancement is life and fun to those that truly love it
https://twitter.com/HamzaSial328600/status/1658192579626778624
#hive #posh
Sometime maintenance eats from our creative and developing time and when there is a Production issue, nothing else matters (Metallica: Nothing Else Matters). As compared to you I've started my work day lazily (working from home allows that), but I recouped that in the afternoon when my hunger to write automation tests in Java got me. And while I had few failures, I succeeded to run some successful tests. Time to close the day on a positive note, so I've stopped.
Coding and programming is a very great thing but I don't have interest in it.
It looks like it will be quite difficult
Hahaha
Congratulations @brianoflondon! You received a personal badge!
Thank you for participating in the Leo challenge.
You can view your badges on your board and compare yourself to others in the Ranking
Check out our last posts:
As you said Spanish version will be next in this website, when can we expect the Hindi version of it?
Love From India.
My goal is to have a project up on the web where anyone can translate all the phrases I use in the code.
The discipline from my side is never to write something directly in the code and always use a field from a translation table. Then you'll be able to go in and translate to any other language, even using google as a starting point and just correct things for your native language.
Ok. Thanks for the straight forward explanation.
I've been cringing while thinking about diving deep into JS. I feel like it's probably a necessary evil though at this point.
I used to code a long time ago, but I've lost most of my skill now. One day maybe I'll return to dabbling in coding.
It's great that you've done it the way we've been seeing the Spanish people for the last few days coming over it and you've now thought that there should be a Spanish version so that's a lot. It is a good thing and like the rest of the countries, can it be here in the Pakistani language as well. Because even here in Pakistan people are seeing and doing this kind of work with great interest, I myself have brought many of my friends to this platform.