Auth: Strip phone number

This commit is contained in:
Alexander Zinchuk 2021-07-16 00:55:13 +03:00
parent 27e5c31deb
commit 61f378e7a2

View File

@ -43,7 +43,7 @@ addReducer('initApi', (global: GlobalState, actions) => {
addReducer('setAuthPhoneNumber', (global, actions, payload) => {
const { phoneNumber } = payload!;
void callApi('provideAuthPhoneNumber', phoneNumber);
void callApi('provideAuthPhoneNumber', phoneNumber.replace(/[^\d]/g, ''));
return {
...global,