Closed chill117 closed 6 years ago
Ready for review
Tested in a device with no NFC it gives errors:
when initializing the app it throws to the console:
Failed to initialize the NfcPlugin NO_NFC phonegap-nfc.js:21
When going to pay screen with the qr code:
Uncaught TypeError: Object [object Object] has no method 'disableNfcReaderMode'
The check this.doNFC() returns true, due to the fact that nfc object is not undefined, it does not contain function disableNfcReaderMode:
""{"addTagDiscoveredListener":"function","addMimeTypeListener":"function","addNdefListener":"function","addNdefFormatableListener":"function","write":"function","makeReadOnly":"function","share":"function","unshare":"function","handover":"function","stopHandover":"function","erase":"function","enabled":"function","removeTagDiscoveredListener":"function","removeMimeTypeListener":"function","removeNdefListener":"function","showSettings":"function","beginSession":"function","invalidateSession":"function","connect":"function","close":"function","transceive":"function","FLAG_READER_NFC_A":1,"FLAG_READER_NFC_B":2,"FLAG_READER_NFC_F":4,"FLAG_READER_NFC_V":8,"FLAG_READER_NFC_BARCODE":16,"FLAG_READER_SKIP_NDEF_CHECK":128,"FLAG_READER_NO_PLATFORM_SOUNDS":256,"readerMode":"function","disableReaderMode":"function","bytesToString":"function","stringToBytes":"function","bytesToHexString":"function"}""
I guess the plugin "phonegap-nfc" tries to initialize and it creates the global object nfc, but without nfc functions.
Ready for review
I tested paper wallet payment with BTC and LTC and it works for both.
I am wondering if it wouldn't be interesting to add a flag in the config file in order to easily disable this feature just in case we needed to release a version without it.
There is a conflict in package.json
Fixed conflicts
Fixed:
Requires this pull-request on ct-api-server