We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 712d4b0 + e750de9 commit 1884e7dCopy full SHA for 1884e7d
utils/balance-hooks.ts
@@ -36,7 +36,10 @@ export const useUtxoBalance = (
36
const balanceInText = await fetch(url)
37
.then((res) => res.json())
38
.then((res: BalanceResp) => {
39
- if (assetGuid && address && res.tokensAsset) {
+ if (assetGuid && address) {
40
+ if (!res.tokensAsset) {
41
+ return "0";
42
+ }
43
const total = res.tokensAsset.reduce((acc, asset) => {
44
if (asset.assetGuid === assetGuid) {
45
return acc + parseInt(asset.balance);
0 commit comments