mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-07-19 19:15:46 +00:00
Basic QR tests (+ number encoding fix) (#168)
* Basic QR tests (+ number encoding fix) * skipEncoding for Address display * Fixup comments
This commit is contained in:
@@ -2,20 +2,18 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
const DEFAULT_SIZE = 300;
|
||||
const DEFAULT_IMG_SIZE = 300;
|
||||
const ADDRESS_PREFIX = 'substrate:';
|
||||
|
||||
function createSize (size: number = DEFAULT_SIZE): Record<string, string> {
|
||||
const height = `${size}px`;
|
||||
|
||||
return {
|
||||
height,
|
||||
width: height
|
||||
};
|
||||
}
|
||||
const FRAME_SIZE = 1716;
|
||||
const SUBSTRATE_ID = new Uint8Array([0x53]);
|
||||
const CRYPTO_SR25519 = new Uint8Array([0x01]);
|
||||
const CMD_SIGN_TX = new Uint8Array([0x00]);
|
||||
|
||||
export {
|
||||
ADDRESS_PREFIX,
|
||||
DEFAULT_SIZE,
|
||||
createSize
|
||||
CMD_SIGN_TX,
|
||||
CRYPTO_SR25519,
|
||||
DEFAULT_IMG_SIZE,
|
||||
FRAME_SIZE,
|
||||
SUBSTRATE_ID
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user