mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-06-13 00:41:02 +00:00
use onError in ScanAddress (#488)
* use onError in ScanAddress * Update packages/react-qr/src/ScanAddress.tsx Co-authored-by: Jaco <jacogr@gmail.com> * lint Co-authored-by: Jaco <jacogr@gmail.com>
This commit is contained in:
@@ -43,11 +43,13 @@ function ScanAddress ({ className, isEthereum, onError, onScan, size, style }: P
|
||||
|
||||
onScan({ content, genesisHash, isAddress, name: name?.length ? name.join(':') : undefined });
|
||||
} catch (error) {
|
||||
onError && onError(error as Error);
|
||||
|
||||
console.error('@polkadot/react-qr:QrScanAddress', (error as Error).message, data);
|
||||
}
|
||||
}
|
||||
},
|
||||
[onScan, isEthereum]
|
||||
[onScan, onError, isEthereum]
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user