refactor: clean up code formatting and improve readability across multiple components

- Standardized the use of quotes and spacing in various files.
- Removed unnecessary line breaks and trailing spaces in components.
- Improved the structure of computed properties and methods for better clarity.
- Enhanced the consistency of prop definitions and emit events in Vue components.
- Updated the GraphQL composable to streamline error handling and data processing.
- Refactored network configuration files for better organization and readability.
- Cleaned up model files by removing redundant lines and ensuring consistent formatting.
- Adjusted router configuration for improved readability.
- Enhanced utility functions for better maintainability and clarity.
This commit is contained in:
2026-05-04 20:04:19 -03:00
committed by hueso
parent c481d9d0a5
commit d63cb8c6d3
52 changed files with 1645 additions and 1606 deletions

View File

@@ -30,12 +30,12 @@ export const updateWalletStatus = async (): Promise<void> => {
};
export const listValidDepositTransactionsByWalletAddress = async (
walletAddress: Address
walletAddress: Address,
): Promise<ValidDeposit[]> => {
const user = useUser();
const walletDeposits = await getValidDeposits(
user.network.value.tokens[user.selectedToken.value].address,
user.network.value
user.network.value,
);
if (walletDeposits) {
return walletDeposits
@@ -50,7 +50,7 @@ export const listValidDepositTransactionsByWalletAddress = async (
const getLockStatus = async (id: bigint): Promise<LockStatus> => {
const { address, abi, client } = await getContract();
const [ sortedIDs , status ] = await client.readContract({
const [sortedIDs, status] = await client.readContract({
address,
abi,
functionName: "getLocksStatus",
@@ -60,7 +60,7 @@ const getLockStatus = async (id: bigint): Promise<LockStatus> => {
};
export const listAllTransactionByWalletAddress = async (
walletAddress: Address
walletAddress: Address,
): Promise<WalletTransaction[]> => {
const user = useUser();
@@ -199,7 +199,7 @@ export const listAllTransactionByWalletAddress = async (
// get wallet's release transactions
export const listReleaseTransactionByWalletAddress = async (
walletAddress: Address
walletAddress: Address,
) => {
const user = useUser();
const network = user.network.value;
@@ -403,7 +403,7 @@ const listLockTransactionBySellerAddress = async (sellerAddress: Address) => {
};
export const checkUnreleasedLock = async (
walletAddress: Address
walletAddress: Address,
): Promise<UnreleasedLock | undefined> => {
const { address, abi, client } = await getContract();
const addedLocks = await listLockTransactionByWalletAddress(walletAddress);
@@ -412,7 +412,7 @@ export const checkUnreleasedLock = async (
const lockIds = addedLocks.map((lock: any) => lock.args.lockID);
const [ sortedIDs, status ] = await client.readContract({
const [sortedIDs, status] = await client.readContract({
address,
abi,
functionName: "getLocksStatus",
@@ -420,15 +420,15 @@ export const checkUnreleasedLock = async (
});
const unreleasedLockId = status.findIndex(
(status: LockStatus) => status == LockStatus.Active
(status: LockStatus) => status == LockStatus.Active,
);
if (unreleasedLockId !== -1)
return getUnreleasedLockById(sortedIDs[unreleasedLockId]);
};
export const getActiveLockAmount = async (
walletAddress: Address
walletAddress: Address,
): Promise<number> => {
const { address, abi, client } = await getContract(true);
const lockSeller = await listLockTransactionBySellerAddress(walletAddress);
@@ -437,7 +437,7 @@ export const getActiveLockAmount = async (
const lockIds = lockSeller.map((lock: any) => lock.args.lockID);
const [ sortedIDs, status ] = await client.readContract({
const [sortedIDs, status] = await client.readContract({
address,
abi,
functionName: "getLocksStatus",
@@ -450,7 +450,7 @@ export const getActiveLockAmount = async (
abi,
functionName: "mapLocks",
args: [BigInt(id)],
})
}),
);
const mapLocksResults = await client.multicall({