@@ -30,9 +30,13 @@ const parseConsoleBody = (text: string) => {
3030 }
3131};
3232
33- watch (chainId , (id ) => {
34- isOnBaseSepolia .value = id ?.toLowerCase () === BASE_SEPOLIA_CHAIN_ID .toLowerCase ();
35- }, { immediate: true });
33+ watch (
34+ chainId ,
35+ (id ) => {
36+ isOnBaseSepolia .value = id ?.toLowerCase () === BASE_SEPOLIA_CHAIN_ID .toLowerCase ();
37+ },
38+ { immediate: true }
39+ );
3640
3741const onSwitchToBaseSepolia = async () => {
3842 fetchLoading .value = true ;
@@ -73,18 +77,13 @@ const onFetchWithPayment = async () => {
7377
7478 <!-- Status badges -->
7579 <div class =" flex flex-wrap gap-2 mb-3 text-xs" >
76- <span
77- class =" px-2 py-1 rounded-full font-medium"
78- :class =" isConnected ? 'bg-green-100 text-green-700' : 'bg-red-100 text-red-600'"
79- >
80+ <span class =" px-2 py-1 rounded-full font-medium" :class =" isConnected ? 'bg-green-100 text-green-700' : 'bg-red-100 text-red-600'" >
8081 {{ isConnected ? "Connected" : "Not connected" }}
8182 </span >
8283 <span v-if =" chainNamespace" class =" px-2 py-1 rounded-full bg-blue-100 text-blue-700 font-medium" >
8384 {{ chainNamespace }}
8485 </span >
85- <span v-if =" chainId" class =" px-2 py-1 rounded-full bg-gray-100 text-gray-600 font-medium font-mono" >
86- chain {{ chainId }}
87- </span >
86+ <span v-if =" chainId" class =" px-2 py-1 rounded-full bg-gray-100 text-gray-600 font-medium font-mono" >chain {{ chainId }}</span >
8887 <span
8988 v-if =" chainNamespace === CHAIN_NAMESPACES.EIP155"
9089 class =" px-2 py-1 rounded-full font-medium"
@@ -96,14 +95,7 @@ const onFetchWithPayment = async () => {
9695
9796 <!-- Switch chain -->
9897 <div v-if =" isConnected && chainNamespace === CHAIN_NAMESPACES.EIP155" class =" mb-3" >
99- <Button
100- block
101- size =" xs"
102- pill
103- :loading =" fetchLoading"
104- :disabled =" isOnBaseSepolia"
105- @click =" onSwitchToBaseSepolia"
106- >
98+ <Button block size =" xs" pill :loading =" fetchLoading" :disabled =" isOnBaseSepolia" @click =" onSwitchToBaseSepolia" >
10799 {{ isOnBaseSepolia ? "Already on Base Sepolia" : "Switch to Base Sepolia" }}
108100 </Button >
109101 </div >
@@ -120,16 +112,6 @@ const onFetchWithPayment = async () => {
120112 </div >
121113
122114 <!-- Fetch button -->
123- <Button
124- block
125- size =" xs"
126- pill
127- :loading =" fetchLoading"
128- :disabled =" !isConnected"
129- class =" mb-3"
130- @click =" onFetchWithPayment"
131- >
132- Fetch with Payment
133- </Button >
115+ <Button block size =" xs" pill :loading =" fetchLoading" :disabled =" !isConnected" class =" mb-3" @click =" onFetchWithPayment" >Fetch with Payment</Button >
134116 </Card >
135117</template >
0 commit comments