UNPKG

react-native-unit-components

Version:

Unit React Native components

16 lines (12 loc) 536 B
import { UNAddToWalletComponentProps } from './UNAddToWalletComponent'; import { UNCardAddToWalletStatus, UNWallet } from '../../../types/shared/wallet.types'; export const getAddToWalletParams = (props: UNAddToWalletComponentProps) => { return ` customer-token=${props.customerToken} card-id=${props.cardId} action=AddToWallet `; }; export const getAddToWalletWindowParams = (wallet?: UNWallet) => { return `window.UnitMobileSDKConfig["isCardInWallet"] = ${wallet?.status === UNCardAddToWalletStatus.addedToWallet}`; };