{"size": 722, "ext": "js", "max_stars_repo_path": "views/get.js", "max_stars_repo_name": "flex-dapps/binance-burner-wallet", "max_stars_repo_stars_event_min_datetime": "2019-10-14T03:09:04.000Z", "max_stars_repo_stars_event_max_datetime": "2019-10-14T03:09:04.000Z", "max_issues_repo_path": "views/get.js", "max_issues_repo_name": "flex-dapps/snap-wallet", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "views/get.js", "max_forks_repo_name": "flex-dapps/snap-wallet", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 20.6285714286, "max_line_length": 70, "alphanum_fraction": 0.5664819945}
const html = require('choo/html')
const css = require('sheetify')

const QRCode = require('qrcode')

const TITLE = 'RECEIVE'

module.exports = (state, emit) => {
  if (state.title !== TITLE) emit(state.events.DOMTITLECHANGE, TITLE)

  QRCode.toDataURL(
    state.wallet.address,
    {
      margin: 1,
      color: {
        light: '#F0B90B',
        dark: '#333'
      },
      scale: 10
    },
    (err, url) => {
      state.wallet.qr = url
    }
  )

  return html`
    <section class="flex flex-column justify-around items-center pa4">
      <img class="w-100" src=${state.wallet.qr} />
      <div class="actions flex flex-column tc">
        <a class="button pa2" href="/">Back</a>
      </div>
    </section>
  `
}
