Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
new Promise((resolve, reject) => {
QRCode.toCanvas(
// $FlowFixMe
this.uri,
options,
(err, canvas) => (err ? reject(err) : resolve(canvas)),
)
}),
])
componentDidMount () {
const { address, encryptedWIF } = this.props
QRCode.toCanvas(this.publicCanvas, address, { version: 5 }, (err) => {
if (err) console.log(err)
})
QRCode.toCanvas(this.privateCanvas, encryptedWIF, { version: 5 }, (err) => {
if (err) console.log(err)
})
}
componentDidMount() {
QRCode.toCanvas(this.canvas, this.props.address, { version: 5 }, err => {
if (err) console.error(err)
})
}
componentDidMount () {
const { address, encryptedWIF } = this.props
QRCode.toCanvas(this.publicCanvas, address, { version: 5 }, (err) => {
if (err) console.log(err)
})
QRCode.toCanvas(this.privateCanvas, encryptedWIF, { version: 5 }, (err) => {
if (err) console.log(err)
})
}
handleCreateCanvas = (ref: ?HTMLCanvasElement, data: string) => {
QRCode.toCanvas(ref, data, { version: 5 }, err => {
if (err) console.error(err)
})
}