@ukeyfe/react-native-nfc-litecard 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1016,6 +1016,9 @@ async function writeUserMemory(data) {
|
|
|
1016
1016
|
const offset = i * PAGE_SIZE;
|
|
1017
1017
|
const pageData = Array.from(buffer.slice(offset, offset + PAGE_SIZE));
|
|
1018
1018
|
await writePage(page, pageData);
|
|
1019
|
+
if (import_react_native3.Platform.OS === "android" && i < totalPages - 1) {
|
|
1020
|
+
await new Promise((r) => setTimeout(r, 10));
|
|
1021
|
+
}
|
|
1019
1022
|
}
|
|
1020
1023
|
}
|
|
1021
1024
|
async function writeAesKey(key) {
|
|
@@ -1024,7 +1027,10 @@ async function writeAesKey(key) {
|
|
|
1024
1027
|
const off = (3 - i) * 4;
|
|
1025
1028
|
const pageData = [key[off + 3], key[off + 2], key[off + 1], key[off + 0]];
|
|
1026
1029
|
await writePage(page, pageData);
|
|
1027
|
-
if (
|
|
1030
|
+
if (i < 3) {
|
|
1031
|
+
const delay = import_react_native3.Platform.OS === "ios" ? DELAY.IOS_KEY_WRITE : 10;
|
|
1032
|
+
await new Promise((r) => setTimeout(r, delay));
|
|
1033
|
+
}
|
|
1028
1034
|
}
|
|
1029
1035
|
}
|
|
1030
1036
|
async function writeNicknameToCard(nickname) {
|