Update all code to be able to release. Still having issues on Release transaction.

This commit is contained in:
Filipe Soccol
2025-06-28 12:16:36 -03:00
parent ed5d3b5726
commit 2370051243
13 changed files with 459 additions and 338 deletions

View File

@@ -24,7 +24,6 @@ const openItem = (index: number) => {
faq.value[selectedSection.value].items[index].content = marked(
faq.value[selectedSection.value].items[index].content
);
console.log(marked(faq.value[selectedSection.value].items[index].content));
};
</script>

View File

@@ -58,20 +58,22 @@ const confirmBuyClick = async (
}
};
const releaseTransaction = async (lockId: string) => {
const releaseTransaction = async ({
pixTarget,
signature,
}: {
pixTarget: string;
signature: string;
}) => {
flowStep.value = Step.List;
showBuyAlert.value = true;
loadingRelease.value = true;
const solicitation = await getSolicitation(lockId);
const release = await releaseLock(lockID.value, pixTarget, signature);
await release.wait();
if (solicitation.status) {
const release = await releaseLock(solicitation);
await release.wait();
await updateWalletStatus();
loadingRelease.value = false;
}
await updateWalletStatus();
loadingRelease.value = false;
};
const checkForUnreleasedLocks = async (): Promise<void> => {

View File

@@ -48,19 +48,15 @@ const callWithdraw = async (amount: string) => {
const getWalletTransactions = async () => {
user.setLoadingWalletTransactions(true);
if (walletAddress.value) {
console.log("Will fetch all required data...");
const walletDeposits = await listValidDepositTransactionsByWalletAddress(
walletAddress.value
);
console.log("Fetched deposits");
const allUserTransactions = await listAllTransactionByWalletAddress(
walletAddress.value
);
console.log("Fetched all transactions");
activeLockAmount.value = await getActiveLockAmount(walletAddress.value);
console.log("Fetched active lock amount");
if (walletDeposits) {
depositList.value = walletDeposits;