Skip to content

Commit 1430cc0

Browse files
committed
fix: move loading outside try-catch block
1 parent eb23dd8 commit 1430cc0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/invoice-dashboard/src/lib/view-requests.svelte

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@
8585
8686
const getRequests = async () => {
8787
if (!wallet || !requestNetwork) return;
88-
8988
loading = true;
89+
9090
try {
9191
const requestsData = await requestNetwork?.fromIdentity({
9292
type: Types.Identity.TYPE.ETHEREUM_ADDRESS,
@@ -103,9 +103,10 @@
103103
};
104104
105105
const getOneRequest = async (activeRequest: any) => {
106+
if (!activeRequest) return;
107+
loading = true;
108+
106109
try {
107-
if (!activeRequest) return;
108-
loading = true;
109110
const _request = await requestNetwork?.fromRequestId(
110111
activeRequest?.requestId!
111112
);

0 commit comments

Comments
 (0)