Skip to content

Commit 25228a7

Browse files
authored
Update the balance cache in case of an error (#3288)
Signed-off-by: Emre Bogazliyanlioglu <emre@wormholelabs.xyz>
1 parent fab83cc commit 25228a7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

wormhole-connect/src/hooks/useGetTokenBalances.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,12 @@ const useGetTokenBalances = (
113113
};
114114
}
115115
}
116-
117-
updateCache = true;
118116
} catch (e) {
119117
console.error('Failed to get token balances', e);
118+
} finally {
119+
// There can be failures for some tokens,
120+
// but we'll still update the cache with latest balances
121+
updateCache = true;
120122
}
121123
}
122124
if (isActive) {

0 commit comments

Comments
 (0)