chore: Minor fix
This commit is contained in:
@@ -237,15 +237,10 @@ export const actions = {
|
||||
}
|
||||
},
|
||||
|
||||
v2Topup: async ({ commit, dispatch }, data) => {
|
||||
v2Topup: async ({ commit }, data) => {
|
||||
commit(types.default.SET_V2_BILLING_UI_FLAG, { isTopupInProcess: true });
|
||||
try {
|
||||
await EnterpriseAccountAPI.v2Topup(data);
|
||||
// Wait for backend to process, then refresh balance
|
||||
await new Promise(resolve => {
|
||||
setTimeout(resolve, 2000);
|
||||
});
|
||||
await dispatch('fetchCreditsBalance');
|
||||
return { success: true };
|
||||
} catch (error) {
|
||||
const errorMessage = error.response?.data?.error || error.message;
|
||||
|
||||
Reference in New Issue
Block a user