Waivio

Recommended Posts

2024-07-02 - Distriator - Supporting claims for payments done using Keychain Store Custom Invoice ID

11 comments

sagarkothari886.3 K18 days ago9 min read

Hello Hive Community Members,

Welcome to daily updates from @sagarkothari88 - a Hive Witness & mobile-app-developer. I daily invest my time with my skillset in #Hive & I daily hive-power-up.

https://images.ecency.com/DQme1eL9v9d8qiTY2KdjUACLN5oMFzUQZP9Rpf8uvDhAnhH/hive_divider.png

Project Distriator

A failure in claim reported

https://images.ecency.com/DQme7Xne86x42pPnQHJyk4rVCLuhXRVpkEaQagdCkB5kUxo/screenshot_2024_07_02_at_10.43.10_pm.png

  • @starkerz reported that users are not able to claim.
  • So, I immediately started looking into it.
  • Debugging the front-end didn't help much

A null as invoice id

https://images.ecency.com/DQmerMzTwyjc8Uc3Y14xp1WgsZ5nLqwiHteu56mqcnNzwMD/screenshot_2024_07_02_at_9.57.29_pm.png

  • Upon debugging I found that, we're getting invoice null.
  • As you can see in the screenshot below, invoice-id was null.

Reproduce issue

https://images.ecency.com/DQmVz2t82umpoUw39QbJdGnNjW3jrd68LZ8RLD6LGMu3o3R/screenshot_2024_07_02_at_10.13.38_pm.png

  • To investigate the issue further, you should be able to reproduce the issue.
  • So, I executed everything - made a payment to business with v4v & claimed
  • Everything went well without any issues.
  • This left me confused.

https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExb2hsNTJwYW50NXM3NGhnMnVpeXZiOGhrbnl3MnM3ejdib2Zlc3EweSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/a5viI92PAF89q/giphy.gif
source

Keychain Store

https://images.ecency.com/DQmbJUJhs9V9awTujuzsxXeaXvXSFzi2EtykJHYmxFZ8P15/screenshot_2024_07_02_at_10.22.40_pm.png

  • Upon finding that, user has used Keychain Store
  • Instead of using V4V.app, I generated invoice with Keychain Store
  • I made the payment
  • I attempted claim again & success
  • This left me confused even more.

https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExY2JlOTFhMGI1eWs3b2R0cWU0OXN2MXQ0ZWgzb2M2ZHE2dzRtZ2M0byZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/TPl5N4Ci49ZQY/giphy.gif
source

What actually went wrong?

https://images.ecency.com/DQmdrE3bHS4vFqMXXyedHwLsLxv5GJc5ccjSghrJy9CD1r5/screenshot_2024_07_03_at_5.34.05_pm.png

  • Upon looking the users wallet page, I found that keychain invoice id is not in expected format.
  • Usually, we expect 20 characters separated with hyphens
  • But this invoice kcs-Prueba is not matching the expectation
  • This resulted into failure.
  • Allow me to elaborate more on this with following details.

CURRENT: Supporting Keychain Store Invoices

https://images.ecency.com/DQmZFGSRABTJLBry1SGuzCVL4KPzG544Q31smoSKiLMmPMV/keychain_invoice.png

  • We are supporting Keychain Store invoices
  • As highlighted in the screenshot above, our assumption was that Keychain Invoice will always be in specific pattern

CURRENT: Keychain Store Invoice Pattern

  • kcs-4_letters-4_letters-4_letters-4_letters-4_letters
  • Based on this, we implemented regex based invoice-id identification
  • Here is the Regular Expression to extract invoice identifier fom memo
  • /(kcs-....-....-....-....-....)/gm;

New: Keychain Store Invoice Pattern

https://images.ecency.com/DQmR1wbnCTww42HkGoW7ZukVQK7SDZChUeceBuhupqKEbJZ/screenshot_2024_07_03_at_4.54.50_pm.png

  • Upon finding that, user can actually modify invoice-identifier, I immediately started digging further in code.

https://images.ecency.com/DQmTj1fcvBZPg5emRJxae7mxB4GJ6iMqCQhC9WRBpXVt2wh/screenshot_2024_07_03_at_5.42.46_pm.png

  • After updating regex, I also had to handle that on memo of distriators
  • So, memo from invoice & memo from distriator reward both can have such keychain-store-invoice
  • Review above code (if you are a tech person) & let me know if I'm doing something wrong.

Issues Fixed

  • After changing the logic for detecting invoice-ids from Keychain Store Invoices, I tested it & pushed it to production.
  • I even tested it on my test account after it.
  • From my experience, I can say that issue is fixed.
  • However, user didn't try again.
  • I hope that if he/she tries again, there won't be an issue

A small typo

https://images.ecency.com/DQmcb29HGsZdzb4RV1TChvFbRrBwqRk8kMcD5uZzxmvX2Nq/screenshot_2024_07_03_at_8.44.37_pm.png

@starkerz said that there was a typo spotted by @gandalf.
It was a good spot. And lucky me that word didn't start with masterba... 🤣 such typeos can be disastrous

https://images.ecency.com/DQmQzakHyWB5SWExrmbq3fJDzpNzLWp37HtbVjvQPeT8CF8/screenshot_2024_07_03_at_8.51.58_pm.png

I immediately addressed it & fixed the typo

What else is cooking?

( ⏳ = In Progress, ✅ = Done)

  • Complete UX for managing users ✅
  • Support Localization / Multi language support ⏳
  • Complete Add-A-Business API ✅
  • Complete Edit-A-Business API ⏳
  • Fixing issues suggested by @starkerz
  • Adding improvements suggested by @starkerz
  • Migrate existing excel-sheet-based-businesses to database using add-a-business-api
  • Once migration is done, we'll integrate update-a-business-API
  • Add support for setting percentage for each-trusted-business-guide on a business
  • Reward onboarders ✅
  • Rewarding BTC - V4V - SATS payments ⏳

https://images.ecency.com/DQme1eL9v9d8qiTY2KdjUACLN5oMFzUQZP9Rpf8uvDhAnhH/hive_divider.png

My contributions on projects on Hive Blockchain

https://images.ecency.com/DQme1eL9v9d8qiTY2KdjUACLN5oMFzUQZP9Rpf8uvDhAnhH/hive_divider.png

Rewarding Hive Content Creators

  • I support several contests hosted by different communities.
  • I reward them with Hive-Power-up for the contribution that they have made on communities on Hive.
  • We keep transferring portion of hive power to different users on Hive for encouraging them for their contribution on Hive.
  • Those who respond to our replies, we also reward them with different tokens like PIZZA, BEER
  • We sent Hive-Power-Up to these people on hive for their amazing contribution - @elamaria, @purpleglitter, @yummycruz1, @theresa16, @hylene74, @virgilio07, @yessi08, @dlizara

https://images.ecency.com/DQmbC626vCD5XVg1egCK8mv7nBkC1Eai6QQLYYZAswo1sQ2/screenshot_2024_07_03_at_4.58.01_pm.png

https://images.ecency.com/DQme1eL9v9d8qiTY2KdjUACLN5oMFzUQZP9Rpf8uvDhAnhH/hive_divider.png

Dedicated Resources for Hive Eco-System

Resource NameResource DescriptionApprox Cost of ResourceStatus
Hive WitnessHive Witness Node$50
DluxRunning Dlux Witness Node$5Down ATM
LarynxRunning a LARYNX node$5Down ATM
DuatRunning a DUAT node$5Down ATM
VSCRunning a VSC witness node$5
Discord BotHive Curators Discord Bot Node$5
HP RewardsHive Curators HP reward Bot Node$5
12 NodesPowerful video encoder nodes for 3Speak $20 on average$240
Bandwidth3 internet connections$50
DistriatorHive-Distriator Backend node$50
Community ContributorsRewarding community contributors in INR$60
Additional DevelopersAdditional Contributing Developers$1500
--------
TotalApprox$1980--

https://images.ecency.com/DQme1eL9v9d8qiTY2KdjUACLN5oMFzUQZP9Rpf8uvDhAnhH/hive_divider.png

  

Updates: Video Encoder Nodes

  • I'm running 12 powerful video encoder nodes for 3Speak Community Members.
  • Monthly internet bandwidth usage which exceeds 15 TB, Maintenance cost, Electricity backup, Internet backup, Depreciation cost - it's all on me.
  • On 2024-07-02, 3Speak published total 125 videos.
  • My video encoder nodes encoded 111 videos from 125 videos published.
  • It means, my encoder nodes encoded 88.80 % of total videos published on 2024-07-02
  • Here is visual representation of above data.

https://image-charts.com/chart.js/2.8.0?backgroundcolor=%23000000&bkg=%23000000&c=%7B%0A%20%20%22type%22%3A%20%22pie%22%2C%0A%20%20%22data%22%3A%20%7B%0A%20%20%20%20%22datasets%22%3A%20%5B%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%22data%22%3A%20%5B111%2C%2014%5D%2C%0A%20%20%20%20%20%20%20%20%22backgroundColor%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%22rgba%28255%2C99%2C132%2C0.5%29%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22rgba%28255%2C159%2C64%2C0.5%29%22%2C%0A%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%22label%22%3A%20%22Total%20Published%20Videos%20by%203Speak%22%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%5D%2C%0A%20%20%20%20%22labels%22%3A%20%5B%22Sagar%22%2C%20%22Others%22%5D%2C%0A%20%20%7D%0A%7D

https://images.ecency.com/DQme1eL9v9d8qiTY2KdjUACLN5oMFzUQZP9Rpf8uvDhAnhH/hive_divider.png
 

  ## My Daily Hive Investment Report for 2024-07-02

  | Value | Investment Type |
  | --: | -- |
  | 224.590 Hive | Hive Power Up |
  | 24.068 Hive | Witness Rewards in Hive Power |
  | 77.368 Hive | Curation Rewards as Hive Power |
  | 8.082 Hive | Benefactor Rewards as Hive Power |
  | -- | -- |
  | 334.108 Hive | Total Hive Power Invested |
  | -- | -- |

  https://images.ecency.com/DQme1eL9v9d8qiTY2KdjUACLN5oMFzUQZP9Rpf8uvDhAnhH/hive_divider.png

  ## Curation Report for 2024-07-02

  NOTE:

  • If you don't like tagging you under curation report, let me know in comment section & I'll exclude you from the curation report.
  • If you think that I should not attach curation report in the post, let me know in the comment section.

We've curated total 35 & motivated content creators for their contributions on Hive.

🧑‍💻 Author📝 Post❤️ HiveCurator👥 Community
@stekenehttps://ecency.com/@stekene/woo-updates-6kw@hivecuratorsFreeCompliments
@littlesorceresshttps://ecency.com/@littlesorceress/reversion-de-diseno-de-un-postre-clasico-pasta-frola-por-patria-frola-esp-eng-design-reversion-of-a-classic-dessert-pasta-frola-@dimascastillo90Hive Food
@florian-glechnerhttps://ecency.com/@florian-glechner/beautiful-butterflies-at-the-zoo-in-prague@dimascastillo90Fascinating Insects
@woelfchenhttps://ecency.com/@woelfchen/farmers-plow-fields-between-ruins-chinas-popped-real-estate-bubble@gwajnbergLeoFinance
@amberkashifhttps://ecency.com/@amberkashif/the-hinderence-in-a-fulfilling@gwajnbergHive Learners
@olujayhttps://ecency.com/@olujay/youtube-now-lets-you-request-removal-of-ai-mimicking-your-identity-9vh@gwajnbergLeoFinance
@curamaxhttps://ecency.com/@curamax/the-futuristic-designs-of-the@dimascastillo90The City of Neoxian
@reeta0119https://ecency.com/@reeta0119/some-ways-of-promotion-for-hive-htd@thetimetravelerzLoving HIVE ❤
@bhattghttps://ecency.com/@bhattg/dreams-and-disconnections-balancing-fantasy@mysteriousroadHive Learners
@semarekhahttps://ecency.com/@semarekha/update-on-my-vegetable-garden@bhattgASEAN HIVE COMMUNITY
@trucklife-familyhttps://ecency.com/@trucklife-family/having-to-walk-away-is-not-an-easy-thing-to-do@palomap3ThoughtfulDailyPost
@ifarmgirlhttps://ecency.com/@ifarmgirl/sb19-got-me-groovin-then-lataratara-ee6@palomap3Music
@nanixxxhttps://ecency.com/@nanixxx/maximum-surveillance@palomap3Daily Blog
@papilloncharityhttps://ecency.com/@papilloncharity/at-last-i-got-him-close-up@bhattgPhotography Lovers
@damoclesarthttps://ecency.com/@damoclesart/splinterlands-art-contestweek-300-nila-the-desert-elf@bhattgAlien Art Hive
@daltonohttps://ecency.com/@daltono/no-mans-sky-gameplay-and-first-impressions@bhattgHive Gaming
@avdesinghttps://ecency.com/@avdesing/qacsnjgj@equipodeltaAlien Art Hive
@nurfayhttps://ecency.com/@nurfay/easy-way-to-make-stir-fried-noodles-pumpkin-jipang@equipodeltaPlant Power (Vegan)
@cmplxtyhttps://ecency.com/@cmplxty/fruity-monochrome-monday@dimascastillo90Visual Shots
@visualblockhttps://ecency.com/@visualblock/reporte-de-curacion-de-visualblock-dd41e74b23e79@dimascastillo90VisualBlock
@abelfotografiahttps://ecency.com/@abelfotografia/my-favorite-model-monomad-engesp@dimascastillo90Black And White
@borniethttps://ecency.com/@borniet/capturing-magic-a-sunset-walk-in-the-forest@dimascastillo90Visual Shots
@nadin-zakrevskahttps://ecency.com/@nadin-zakrevska/light-and-darkness-in-monomad@dimascastillo90Black And White
@claudio83https://ecency.com/@claudio83/il-re-della-brace@alokkumar121Olio di Balena
@ewkawhttps://ecency.com/@ewkaw/see-you-next-year-poppy@equipodeltaPHOTOGRAPHY [DAC]
@bonzopoehttps://ecency.com/@bonzopoe/reflexiones-innecesarias-088-la-economia-de-la-atencion-por-bonzopoe@miriannalisHolos&Lotus
@eniolwhttps://ecency.com/@eniolw/chess-puzzle-of-the-day-414f89435d041@miriannalisIndiaunited
@valeriavalentinahttps://ecency.com/@valeriavalentina/mi-junio-en-fotografias-hola-julio-es-eng@jasonmunapaseeLifestyle
@yameenhttps://ecency.com/@yameen/splinterlands-daily-rewards-or-purchased-and-opened-5-major-loot-chests-or-07-01-2024@jasonmunapaseeOlio di Balena
@mariaserhttps://ecency.com/@mariaser/esp-eng-attending-the-opening-of-the-beauty-salon-with-my-friends@jasonmunapaseeFamily & Friends
@soldierofdreamshttps://ecency.com/@soldierofdreams/primeras-selfies-de-julio@jasonmunapaseeLiketu
@codingdefinedhttps://ecency.com/@codingdefined/hpud-monthly-goals-update-july-2cq@bhattgLeoFinance
@belkisa758https://ecency.com/@belkisa758/llegaron-las-vacaciones-y-ahora-esp-eng@jasonmunapaseeMotherhood
@corvidaehttps://ecency.com/@corvidae/the-pioneer-womans-grave@jasonmunapaseeLadies of Hive
@b0shttps://ecency.com/@b0s/hopeful-for-the-new-month-hpud-l1g@jasonmunapaseeHive Naija

 

https://images.ecency.com/DQme1eL9v9d8qiTY2KdjUACLN5oMFzUQZP9Rpf8uvDhAnhH/hive_divider.png

https://images.hive.blog/u/sagarkothari88/avatar

Vote sagarkothari88 as Hive Witness

https://images.hive.blog/u/threespeak/avatar

Vote for 3Speak as Witness

https://images.ecency.com/DQme1eL9v9d8qiTY2KdjUACLN5oMFzUQZP9Rpf8uvDhAnhH/hive_divider.png

Get paid for paying in HBD/Hive & SATs

https://distriator.com

Credits to designers - noakmilo & josegrech

https://images.ecency.com/DQmNM1ahigCcZowJYjJRsdCeLXu5vykGa64cmiCPK5mbRZU/photo_2024_04_26_21.08.09.jpeg

https://images.ecency.com/DQmdNqPB61oSdqMf3x2xcX9qNXimd6iMKccwM8nGEUgjUsa/abnner.png

Swap your HBD/Hive using @ecency

https://images.ecency.com/DQmQkeawijcZVajC14KdSK2KP9vV4NSBTM1hRFpnCaa47Nr/swap_feature_banner.gif

Comments

Sort byBest
AI
Waivio Assistant
Welcome to Waivio AI Assistant!
How can I assist you today?