change from deposits history to bid history and add it to bid_history router

This commit is contained in:
RcleydsonR
2022-12-30 16:53:12 -03:00
parent 6279acc20d
commit 060c4f370f
6 changed files with 58 additions and 66 deletions

View File

@@ -7,9 +7,21 @@ import type { BigNumber } from "ethers";
import { ref, watch } from "vue";
const etherStore = useEtherStore();
const { walletAddress } = storeToRefs(etherStore);
const depositList = ref<any[]>([]);
if (walletAddress.value) {
const walletDeposits =
await blockchain.listValidDepositTransactionsByWalletAddress(
walletAddress.value
);
if (walletDeposits) {
depositList.value = walletDeposits;
}
}
const handleCancelDeposit = async (depositID: BigNumber, index: number) => {
const response = await blockchain.cancelDeposit(depositID);
if (response == true) {
@@ -26,16 +38,6 @@ const handleWithDrawDeposit = async (depositID: BigNumber, index: number) => {
}
};
if (walletAddress.value) {
const walletDeposits =
await blockchain.listValidDepositTransactionsByWalletAddress(
walletAddress.value
);
if (walletDeposits) {
depositList.value = walletDeposits;
}
}
watch(walletAddress, async () => {
const walletDeposits =
await blockchain.listValidDepositTransactionsByWalletAddress(