-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Error Description:
When attempting to invoke the reveal method in the Skyflow React-Native SDK, an error occurs with the following details:
Reveal Failed {"errors":[{"code":400,"description":"Interface: reveal container - cannot invoke reveal method before creating reveal elements"}]}
Steps to Reproduce:
Followed the Skyflow integration steps:
Added the Skyflow wrapper in the app-level files.
Copied the end-to-end example code onto an empty screen component.
Run the application.
On the screen with the Skyflow integration, click on the "Reveal" button.
Encounter the above error message.
Expected Behavior:
The reveal method should successfully execute and reveal the appropriate elements within the reveal container.
Actual Behavior:
The reveal method fails to execute, and the application returns a 400 error with the description indicating that the reveal method cannot be invoked before creating reveal elements.
Additional Information:
Skyflow React-Native SDK version: 1.4.0
React Native version: 0.72.4
Operating System: macos/ android device
Relevant Code:
`const Skyflow = () => {
const dispatch = useDispatch();
const revealContainer = useRevealContainer();
const handleReveal = () => {
console.log(revealContainer);
revealContainer
.reveal()
.then(response => {
console.log('Reveal Success', JSON.stringify(response));
})
.catch(err => {
console.error('Reveal Failed', JSON.stringify(err));
});
};
return (
<RevealElement
token={''}
container={revealContainer}
label="Card Number"
altText="XXXX XXXX XXXX XXXX"
inputStyles={revealInputStyles}
labelStyles={revealLabelStyles}
errorTextStyles={revealerrorTextStyles}
redaction={RedactionType.PLAIN_TEXT}
/>
<View style={buttonStyles.button}>
<Button title="Reveal" onPress={handleReveal} />
</View>
</View>
);
};`