react-native-unit-components
Version:
Unit React Native components
24 lines (21 loc) • 858 B
text/typescript
import { LISTENERS } from '../../scripts/html/bodyScript';
import { UNWirePaymentComponentProps } from './UNWirePaymentComponent';
export const getWirePaymentParams = (props: UNWirePaymentComponentProps) => {
const accountIdParam = props.accountId ? `account-id="${props.accountId}"` : '';
const feeParam = props.fee ? `fee="${props.fee}"` : '';
return `
${accountIdParam}
customer-token="${props.customerToken}"
${feeParam}
is-auto-focus="${props.isAutoFocus || false}"
initial-stage-back-button="${props.initialStageBackButton ?? false}"
final-stage-done-button="${props.finalStageDoneButton ?? false}"
`;
};
export const getWirePaymentScript = () => {
return `
${LISTENERS.unitPaymentCreated}
${LISTENERS.unitPaymentInitialStageBackButtonClicked}
${LISTENERS.unitPaymentFinalStageDoneButtonClicked}
`;
};