mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-06-19 11:11:07 +00:00
3.1.2 (#742)
* 3.1.2 * Remove assert usage * Unsubscribe on open observable * Attempt a clear * Final attempt before skip * .skip for problematic
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
|
||||
import React, { useCallback } from 'react';
|
||||
|
||||
import { assert } from '@polkadot/util';
|
||||
import { decodeAddress } from '@polkadot/util-crypto';
|
||||
|
||||
import { ADDRESS_PREFIX, SEED_PREFIX } from './constants.js';
|
||||
@@ -43,7 +42,9 @@ function ScanAddress ({ className, isEthereum, onError, onScan, size, style }: P
|
||||
const expectedPrefix = (isEthereum ? 'ethereum' : ADDRESS_PREFIX);
|
||||
const isValidPrefix = (prefix === expectedPrefix) || (prefix === SEED_PREFIX);
|
||||
|
||||
assert(isValidPrefix, `Invalid prefix received, expected '${expectedPrefix} or ${SEED_PREFIX}' , found '${prefix}'`);
|
||||
if (!isValidPrefix) {
|
||||
throw new Error(`Invalid prefix received, expected '${expectedPrefix} or ${SEED_PREFIX}' , found '${prefix}'`);
|
||||
}
|
||||
|
||||
const isAddress = prefix === expectedPrefix;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user