SaitoTech / saito-lite-rust

a version of the Saito-Lite client written for compatibility with the Saito Rust client and binary data format
24 stars 28 forks source link

QRScanner: doesn't read crypto addresses??? #2348

Open umairkhannn opened 8 months ago

umairkhannn commented 8 months ago

Trying to scan my Mixin TRX receive address QR code on my phone with the laptop web camera. I thought it was a resolution issue, but also saw this in the console

Image

Updated: 2/22 Before we launch we need to test withdrawing tokens back to a Mixin (or external account), and we know people don't want to be typing keys...

umairkhannn commented 8 months ago

@f8daniel due to low resolution of laptop webcam, qrscanner will capture qrcode at certain angle and lightning. Else qrscanner is working fine havent found any issue.

https://github.com/SaitoTech/saito-lite-rust/assets/104337801/00fd8d08-6d59-41e5-85f7-466fa88b8022

f8daniel commented 8 months ago

My laptop will read the saito wallet qr code from my phone, e.g.

Image

But won't read the Mixin wallet qr code...

Image

That is the problem. How do I withdraw money from Saito back onto Mixin???

umairkhannn commented 8 months ago

So I did a little deep dive into this problem to find out whats the issue.

The code which we're using in our "qrscanner" mod is imported from this tutorial:

Tutorial: https://www.peterkins.dev/blog/wasm-qrscanner/ Github: https://github.com/BearGuy/wasm-qrscanner/tree/master Demo: https://gifted-bhaskara-a52e4f.netlify.app/

When running the scanner, from above demo, it was able to detect Binance & Saito qrcodes but refused to do so for Mixin qrcode.

Detected binance qrcode address: Image

Detected saito qrcode address: Image

Not detecting mixin qrcode Image

So the issue is inherited from the source code itself. My guess is that since mixin qrcode has circular dots instead of rectangles, the library has hard time identifying the pattern. Also the ECC level (Error Correction Level) for mixin qrcode seems different as compare to other qrcodes.

Now not sure if we should make changes to source code or replace the library with something reliable.

@f8daniel @arpee