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

@@ -1,9 +1,9 @@
import { ref } from "vue";
import type { ValidDeposit } from "@/model/ValidDeposit";
import type { Participant } from "../utils/bbPay";
import type { Address } from "viem"
import type { Address } from "viem";
import { DEFAULT_NETWORK, Networks } from "@/config/networks";
import { TokenEnum, NetworkConfig } from "@/model/NetworkEnum"
import { TokenEnum, NetworkConfig } from "@/model/NetworkEnum";
const walletAddress = ref<Address | null>(null);
const balance = ref("");
@@ -38,9 +38,9 @@ export function useUser() {
const setNetworkById = (id: string | number) => {
let chainId: number;
if (typeof id === 'string') {
if (typeof id === "string") {
// Parse hex string or number string to number
if (id.startsWith('0x')) {
if (id.startsWith("0x")) {
chainId = parseInt(id, 16);
} else {
chainId = parseInt(id, 10);
@@ -50,7 +50,7 @@ export function useUser() {
}
// Find network by chain ID
const chain = Object.values(Networks).find(n => n.id === chainId);
const chain = Object.values(Networks).find((n) => n.id === chainId);
if (chain) {
network.value = chain;
}