saito-lite-rust icon indicating copy to clipboard operation
saito-lite-rust copied to clipboard

QRScanner: doesn't read crypto addresses???

Open umairkhannn opened this issue 1 year ago • 3 comments

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 avatar Feb 23 '24 03:02 umairkhannn

@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

umairkhannn avatar Feb 23 '24 03:02 umairkhannn

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???

f8daniel avatar Feb 26 '24 05:02 f8daniel

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

umairkhannn avatar Feb 26 '24 22:02 umairkhannn