mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
♻️ Rename internal busy-state IDs
This commit is contained in:
parent
2c4df18728
commit
7a8a190c3e
1 changed files with 6 additions and 7 deletions
|
@ -33,10 +33,9 @@ const MESSAGES = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const ACTIVITIES = {
|
const ACTIVITIES = {
|
||||||
CONNECT_SANDBOX: 'ISU_LOGIN_SANDBOX',
|
OAUTH_VERIFY: 'oauth/login',
|
||||||
CONNECT_PRODUCTION: 'ISU_LOGIN_PRODUCTION',
|
API_LOGIN: 'auth/api-login',
|
||||||
CONNECT_ISU: 'ISU_LOGIN',
|
API_VERIFY: 'auth/verify-login',
|
||||||
CONNECT_MANUAL: 'MANUAL_LOGIN',
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const useHandleOnboardingButton = ( isSandbox ) => {
|
export const useHandleOnboardingButton = ( isSandbox ) => {
|
||||||
|
@ -124,7 +123,7 @@ export const useHandleOnboardingButton = ( isSandbox ) => {
|
||||||
* visual cue to the user that something is still processing in the background.
|
* visual cue to the user that something is still processing in the background.
|
||||||
*/
|
*/
|
||||||
await withActivity(
|
await withActivity(
|
||||||
ACTIVITIES.CONNECT_ISU,
|
ACTIVITIES.OAUTH_VERIFY,
|
||||||
'Validating the connection details',
|
'Validating the connection details',
|
||||||
async () => {
|
async () => {
|
||||||
await authenticateWithOAuth(
|
await authenticateWithOAuth(
|
||||||
|
@ -182,7 +181,7 @@ const useConnectionBase = () => {
|
||||||
},
|
},
|
||||||
handleCompleted: async () => {
|
handleCompleted: async () => {
|
||||||
await withActivity(
|
await withActivity(
|
||||||
'auth',
|
ACTIVITIES.API_VERIFY,
|
||||||
'Verifying Authentication',
|
'Verifying Authentication',
|
||||||
async () => {
|
async () => {
|
||||||
try {
|
try {
|
||||||
|
@ -227,7 +226,7 @@ export const useDirectAuthentication = () => {
|
||||||
|
|
||||||
const handleDirectAuthentication = async ( connectionDetails ) => {
|
const handleDirectAuthentication = async ( connectionDetails ) => {
|
||||||
return withActivity(
|
return withActivity(
|
||||||
ACTIVITIES.CONNECT_MANUAL,
|
ACTIVITIES.API_LOGIN,
|
||||||
'Connecting manually via Client ID and Secret',
|
'Connecting manually via Client ID and Secret',
|
||||||
async () => {
|
async () => {
|
||||||
let data;
|
let data;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue