From 7b9dec2436b33e6cf1f92cf78ee5fa57f81d87e0 Mon Sep 17 00:00:00 2001 From: eric lin <128665795+EricLin-BBpos@users.noreply.github.com> Date: Tue, 23 Jul 2024 23:54:37 +0800 Subject: [PATCH] Fix wrong display of the "terminal.didRequestReaderDisplayMessage" (#762) * Fix wrong display of the "terminal.didRequestReaderDisplayMessage" * fix e2e test fail * sort collect methods. * revert log check string. * sort collect methods. --------- Co-authored-by: Ian Lin --- dev-app/src/screens/CollectCardPaymentScreen.tsx | 2 +- dev-app/src/screens/SetupIntentScreen.tsx | 2 +- ios/Mappers.swift | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dev-app/src/screens/CollectCardPaymentScreen.tsx b/dev-app/src/screens/CollectCardPaymentScreen.tsx index 36ee8451..c95766bc 100644 --- a/dev-app/src/screens/CollectCardPaymentScreen.tsx +++ b/dev-app/src/screens/CollectCardPaymentScreen.tsx @@ -118,7 +118,7 @@ export default function CollectCardPaymentScreen() { name: 'Collect Payment Method', events: [ { - name: input.join(' / '), + name: input.sort().join(' / '), description: 'terminal.didRequestReaderInput', onBack: cancelCollectPaymentMethod, }, diff --git a/dev-app/src/screens/SetupIntentScreen.tsx b/dev-app/src/screens/SetupIntentScreen.tsx index 43ef00ec..e4c90d50 100644 --- a/dev-app/src/screens/SetupIntentScreen.tsx +++ b/dev-app/src/screens/SetupIntentScreen.tsx @@ -37,7 +37,7 @@ export default function SetupIntentScreen() { name: 'Collect Setup Intent', events: [ { - name: input.join(' / '), + name: input.sort().join(' / '), description: 'terminal.didRequestReaderInput', onBack: cancelCollectSetupIntent, }, diff --git a/ios/Mappers.swift b/ios/Mappers.swift index 5ab27103..4bf5e04b 100644 --- a/ios/Mappers.swift +++ b/ios/Mappers.swift @@ -322,8 +322,8 @@ class Mappers { array.forEach { item in switch item { case 0: return - case 1: return mappedOptions.add("insertCard") - case 2: return mappedOptions.add("swipeCard") + case 1: return mappedOptions.add("swipeCard") + case 2: return mappedOptions.add("insertCard") case 4: return mappedOptions.add("tapCard") default: return }