mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-06-19 10:01:06 +00:00
Fix QR signature conversion (#199)
This commit is contained in:
@@ -5,10 +5,8 @@
|
|||||||
import { BaseProps } from './types';
|
import { BaseProps } from './types';
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { u8aToHex } from '@polkadot/util';
|
|
||||||
|
|
||||||
import QrScan from './Scan';
|
import QrScan from './Scan';
|
||||||
import { encodeString } from './util';
|
|
||||||
|
|
||||||
interface ScanType {
|
interface ScanType {
|
||||||
signature: string;
|
signature: string;
|
||||||
@@ -34,13 +32,13 @@ export default class ScanSignature extends React.PureComponent<Props> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private onScan = (data: string | null): void => {
|
private onScan = (signature: string | null): void => {
|
||||||
const { onScan } = this.props;
|
const { onScan } = this.props;
|
||||||
|
|
||||||
if (!data || !onScan) {
|
if (!signature || !onScan) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
onScan({ signature: u8aToHex(encodeString(data)) });
|
onScan({ signature: `0x${signature}` });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user