Skip to content

Commit

Permalink
feat(qr code generation): get-address command now generates a qr code
Browse files Browse the repository at this point in the history
  • Loading branch information
christroutner committed Nov 25, 2018
1 parent 93d16de commit d0225c9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Expand Up @@ -16,6 +16,7 @@
"ipfs": "^0.33.1",
"orbit-db": "^0.19.9",
"prettier": "^1.14.3",
"qrcode-terminal": "^0.12.0",
"request": "^2.88.0",
"request-promise": "^4.2.2",
"shelljs": "^0.8.2"
Expand Down
4 changes: 4 additions & 0 deletions src/commands/get-address.js
Expand Up @@ -6,6 +6,7 @@

const BB = require("bitbox-sdk/lib/bitbox-sdk").default
const appUtil = require("../util")
const qrcode = require("qrcode-terminal")

const { Command, flags } = require("@oclif/command")

Expand All @@ -27,6 +28,9 @@ class GetAddress extends Command {

const newAddress = await this.getAddress(filename, BITBOX)

// Display the address as a QR code.
qrcode.generate(newAddress, { small: true })

// Display the address to the user.
this.log(`${newAddress}`)
//this.log(`legacy address: ${legacy}`)
Expand Down

0 comments on commit d0225c9

Please sign in to comment.