Equibit / wallet-ui

0 stars 1 forks source link

Support new EQB transaction structure (no equibit section in VOUTs) #1167

Open kvagajack opened 6 years ago

kvagajack commented 6 years ago

Update UI to not rely on equibit section of EQB UTXO.

E.g. (not the only place in UI, need research): src/models/portfolio.js

  // List of blank EQB.
  // utxoBlankEqb :: List<UTXO>
  utxoBlankEqb: {
    get () {
      if (!this.utxoByTypeByAddress || !this.utxoByTypeByAddress.EQB) {
        return []
      }
      const eqbAddresses = this.utxoByTypeByAddress.EQB.addresses
      return Object.keys(eqbAddresses).reduce((acc, addr) => {
        const txouts = eqbAddresses[addr].txouts
        const blankEqb = txouts.filter(out => {
          return !out.equibit.issuance_tx_id || out.equibit.issuance_tx_id === EMPTY_ISSUANCE_TX_ID
        })
        acc.push.apply(acc, blankEqb)
        return acc
      }, [])
    }
  },
Eternali commented 6 years ago

Changes to UI and unit tests are done and passing. Waiting on core to be completed before e2e can pass.