Skip to content

Commit

Permalink
site: don't convert null/undefined values to objects
Browse files Browse the repository at this point in the history
Signed-off-by: Philemon Ukane <[email protected]>
  • Loading branch information
ukane-philemon committed Sep 4, 2024
1 parent d52ef5c commit 8c23904
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions client/webserver/site/src/js/forms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1037,13 +1037,17 @@ export class FeeAssetSelectionForm {
this.marketRows.push({ mkt, tmpl, setTier })
}

for (const { symbol, id: assetID } of Object.values(xc.assets)) {
if (!app().assets[assetID]) continue
const bondAsset = xc.bondAssets[symbol]
if (bondAsset) addBondRow(assetID, bondAsset)
if (xc.assets) {
for (const { symbol, id: assetID } of Object.values(xc.assets)) {
if (!app().assets[assetID]) continue
const bondAsset = xc.bondAssets[symbol]
if (bondAsset) addBondRow(assetID, bondAsset)
}
}

for (const mkt of Object.values(xc.markets)) addMarketRow(mkt)
if (xc.markets) {
for (const mkt of Object.values(xc.markets)) addMarketRow(mkt)
}

// page.host.textContent = xc.host
page.tradingTierInput.value = xc.auth.targetTier ? String(xc.auth.targetTier) : '1'
Expand Down

0 comments on commit 8c23904

Please sign in to comment.