The submit button ('Register') will either take user to auth page, or to loans flow branching logic, depending on the result of isIdBoxregistered(ethAddr, phoneNo).
isIdBoxregistered() is asychronous and takes a callback as its third parameter - which will be called with either a truthy value, or false.
If truthy, user goes to loans flow branching logic,
if false, user goes to auth page
This check can be done on the click/ submit event of 'Register', or before rendering auth page, as appropriate for the framework.
The submit button ('Register') will either take user to auth page, or to loans flow branching logic, depending on the result of isIdBoxregistered(ethAddr, phoneNo).
isIdBoxregistered() is asychronous and takes a callback as its third parameter - which will be called with either a truthy value, or false. If truthy, user goes to loans flow branching logic, if false, user goes to auth page
This check can be done on the click/ submit event of 'Register', or before rendering auth page, as appropriate for the framework.