@tap-payments/os-micro-frontend-shared 0.1.333 → 0.1.334
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/build/utils/source.d.ts +1 -0
- package/build/utils/source.js +5 -0
- package/package.json +1 -1
package/build/utils/source.d.ts
CHANGED
package/build/utils/source.js
CHANGED
|
@@ -2,3 +2,8 @@ export const getPaymentTypeKey = (payment) => {
|
|
|
2
2
|
const walletTypeIcon = (payment === null || payment === void 0 ? void 0 : payment.wallet) === 'SV Wallet' ? 'walletStoredValue' : 'walletPassThru';
|
|
3
3
|
return (payment === null || payment === void 0 ? void 0 : payment.type) === 'Wallet' ? walletTypeIcon : payment === null || payment === void 0 ? void 0 : payment.type;
|
|
4
4
|
};
|
|
5
|
+
const PAYMENT_SOURCE_ALIASES = {
|
|
6
|
+
AMERICAN_EXPRESS: 'AMEX',
|
|
7
|
+
};
|
|
8
|
+
const normalizePaymentSource = (value) => { var _a; return (_a = PAYMENT_SOURCE_ALIASES[value.toUpperCase()]) !== null && _a !== void 0 ? _a : value.toUpperCase(); };
|
|
9
|
+
export const isSamePaymentSource = (a, b) => !!a && !!b && normalizePaymentSource(a) === normalizePaymentSource(b);
|
package/package.json
CHANGED