chore: Minor fix

This commit is contained in:
iamsivin
2025-11-03 19:16:09 +05:30
parent cdececcc67
commit 6a0878f893
6 changed files with 8 additions and 11 deletions
@@ -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;