refactor: onUserId
gitea/hedera-web/pipeline/pr-beta This commit looks good Details

This commit is contained in:
taro 2025-03-17 16:02:04 -03:00
parent d08c1ac86f
commit 2593876813
1 changed files with 8 additions and 2 deletions

View File

@ -64,16 +64,22 @@ const onConfirmPay = async () => {
await tpv.pay(amountToPay.value); await tpv.pay(amountToPay.value);
}; };
watch( const onUserId = (cb) => watch(
() => userStore?.user?.id, () => userStore?.user?.id,
async userId => { async userId => {
if (userId) { if (userId) {
await getDebt(userId); try {
await cb(userId);
} catch (error) {
console.error(error);
}
} }
}, },
{ immediate: true } { immediate: true }
); );
onUserId(getDebt);
</script> </script>
<template> <template>