diff --git a/.env b/.env index 0475807a..c63eab7c 100644 --- a/.env +++ b/.env @@ -1,3 +1,3 @@ -APP_VERSION=2.5.11 +APP_VERSION=2.5.12 -APP_BUILD_NUMBER=439 \ No newline at end of file +APP_BUILD_NUMBER=440 \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/changelogs/440.txt b/fastlane/metadata/android/en-US/changelogs/440.txt new file mode 100644 index 00000000..27705195 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/440.txt @@ -0,0 +1 @@ +- Support ticket printing on Bitcoinize v2.1 \ No newline at end of file diff --git a/fastlane/metadata/android/fr-FR/changelogs/440.txt b/fastlane/metadata/android/fr-FR/changelogs/440.txt new file mode 100644 index 00000000..1762ec0b --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/440.txt @@ -0,0 +1 @@ +- Support de l'impression du ticket sur Bitcoinize v2.1 \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index bf0408dc..6beef920 100644 --- a/package-lock.json +++ b/package-lock.json @@ -87,7 +87,7 @@ "react-native-keychain": "9.2.3", "react-native-linear-gradient": "2.8.3", "react-native-nfc-manager": "3.16.1", - "react-native-nyx-printer": "github:SwissBitcoinPay/react-native-nyx-printer#4b31680", + "react-native-nyx-printer": "github:SwissBitcoinPay/react-native-nyx-printer#83b4006", "react-native-picker-select": "9.3.1", "react-native-progress": "5.0.1", "react-native-qrcode-svg": "6.3.14", @@ -20602,8 +20602,7 @@ "node_modules/react-native-nyx-printer": { "name": "@swissbitcoinpay/react-native-nyx-printer", "version": "2.0.9", - "resolved": "git+ssh://git@github.com/SwissBitcoinPay/react-native-nyx-printer.git#4b31680017d56cb50fc9b2b5f6b054b16347da45", - "license": "MIT", + "resolved": "git+ssh://git@github.com/SwissBitcoinPay/react-native-nyx-printer.git#964abb58f7be669b238e6f94ed1c027d627010c8", "engines": { "node": ">= 16.0.0" }, diff --git a/package.json b/package.json index af291b82..d56d8376 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "react-native-keychain": "9.2.3", "react-native-linear-gradient": "2.8.3", "react-native-nfc-manager": "3.16.1", - "react-native-nyx-printer": "github:SwissBitcoinPay/react-native-nyx-printer#4b31680", + "react-native-nyx-printer": "github:SwissBitcoinPay/react-native-nyx-printer#83b4006", "react-native-picker-select": "9.3.1", "react-native-progress": "5.0.1", "react-native-qrcode-svg": "6.3.14", diff --git a/src/config/platform/platform.native.ts b/src/config/platform/platform.native.ts index ebaf7eab..83ddcd2d 100644 --- a/src/config/platform/platform.native.ts +++ b/src/config/platform/platform.native.ts @@ -22,7 +22,11 @@ const isTablet = DeviceInfo.isTablet(); const device = getDeviceSync(); -const isBitcoinize = ["BTC21PRO", "Bitcoinize Machine"].includes(device); +const model = DeviceInfo.getModel(); + +const isBitcoinize = + ["BTC21PRO", "Bitcoinize Machine"].includes(device) || + model === "Bitcoinize-BTC21PRO"; export const platform = { isWeb: false, @@ -31,7 +35,7 @@ export const platform = { isIos, isDesktop: false, isMobile, - model: DeviceInfo.getModel(), + model, maxContentWidth: 520, isTablet, isIphoneX, diff --git a/src/hooks/usePrintInvoiceTicket.ts b/src/hooks/usePrintInvoiceTicket.ts index 107cce15..6371bcba 100644 --- a/src/hooks/usePrintInvoiceTicket.ts +++ b/src/hooks/usePrintInvoiceTicket.ts @@ -1,9 +1,6 @@ import { InvoiceType } from "@screens/Invoice/Invoice"; import { MarkOptional } from "ts-essentials"; -import { - NyxAlign, - NyxFontStyle -} from "react-native-nyx-printer/src/NyxTextFormat"; +import { NyxAlign, NyxFontStyle } from "react-native-nyx-printer"; import { AsyncStorage, getImageSize,