client/webserver/site/src/js/settings.js
/* Get the reg fees for the DEX. */
Get the reg fees for the DEX.
Get the reg fees for the DEX .
async verifyDEX () {
    const page = this.page
    Doc.hide(page.dexAddrErr)
    const addr = page.dexAddr.value
    if (addr === '') {
      page.dexAddrErr.textContent = 'URL cannot be empty'
      Doc.show(page.dexAddrErr)
      return
    }
    let cert = ''
    if (page.certFile.value) {
      cert = await page.certFile.files[0].text()
    }
    const loaded = app.loading(page.dexAddrForm)
    const res = await postJSON('/api/getfee', {
      addr: addr,
      cert: cert
    })
    loaded()
    if (!app.checkResponse(res)) {
      page.dexAddrErr.textContent = res.msg
      Doc.show(page.dexAddrErr)
      return
    }
    this.fee = res.fee
    page.feeDisplay.textContent = Doc.formatCoinValue(res.fee / 1e8)
    await this.showForm(page.confirmRegForm)
  }
async verifyDEX ( ) { const page = this . page Doc . hide ( page . dexAddrErr ) const addr = page . dexAddr . value if ( addr === '' ) { page . dexAddrErr . textContent = 'URL cannot be empty' Doc . show ( page . dexAddrErr ) return } let cert = '' if ( page . certFile . value ) { cert = await page . certFile . files [ 0 ] . text ( ) } const loaded = app . loading ( page . dexAddrForm ) const res = await postJSON ( '/api/getfee' , { addr : addr , cert : cert } ) loaded ( ) if ( ! app . checkResponse ( res ) ) { page . dexAddrErr . textContent = res . msg Doc . show ( page . dexAddrErr ) return } this . fee = res . fee page . feeDisplay . textContent = Doc . formatCoinValue ( res . fee / 1e8 ) await this . showForm ( page . confirmRegForm ) }
Get the reg fees for the DEX.
Get the reg fees for the DEX .