mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-04-29 12:37:58 +00:00
556d07b368
* Scan consistency updates * Default auto height/width * Rework qrcode export * Fix address scanning (as per new format) * Update tests * Bump common * Pass through genesisHash * addExternal via address
17 lines
654 B
TypeScript
17 lines
654 B
TypeScript
// Copyright 2017-2019 @polkadot/react-qr authors & contributors
|
|
// This software may be modified and distributed under the terms
|
|
// of the Apache-2.0 license. See the LICENSE file for details.
|
|
|
|
import _qrcode from 'qrcode-generator';
|
|
|
|
// A small hurdle to jump through, just to get the default/default correct (as generated)
|
|
const qrcode: typeof _qrcode = _qrcode;
|
|
|
|
// HACK The default function take string -> number[], the Uint8array is compatible
|
|
// with that signature and the use thereof
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
(qrcode as any).stringToBytes = (data: Uint8Array): Uint8Array =>
|
|
data;
|
|
|
|
export default qrcode;
|