Skip to content

Commit

Permalink
app: Fix bond asset selection form
Browse files Browse the repository at this point in the history
Fixes a bug on the page where you select a bond asset when registering.
  • Loading branch information
martonp committed Apr 27, 2024
1 parent 79c4689 commit eb520a3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions client/webserver/site/src/js/forms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,7 @@ export class FeeAssetSelectionForm {
success: (assetID: number, tier: number) => Promise<void>
host: string
selectedAssetID: number
bondAssets: Record<string, BondAsset>
page: Record<string, PageElement>
assetRows: Record<string, RegAssetRow>
marketRows: MarketLimitsRow[]
Expand Down Expand Up @@ -996,6 +997,7 @@ export class FeeAssetSelectionForm {

setExchange (xc: Exchange) {
this.host = xc.host
this.bondAssets = xc.bondAssets
this.assetRows = {}
this.marketRows = []
const page = this.page
Expand Down Expand Up @@ -1104,11 +1106,10 @@ export class FeeAssetSelectionForm {
}

setTier () {
const { page, host, selectedAssetID: assetID } = this
const { page, selectedAssetID: assetID } = this
const { symbol, unitInfo: ui } = app().assets[assetID]
const { conventional: { conversionFactor, unit } } = ui
const { bondAssets } = app().exchanges[host]
const bondAsset = bondAssets[symbol]
const bondAsset = this.bondAssets[symbol]
const raw = page.tradingTierInput.value ?? ''
if (!raw) return
const tier = parseInt(raw)
Expand Down

0 comments on commit eb520a3

Please sign in to comment.