mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-06-14 17:11:02 +00:00
Support scanning name where ":" is contained within (#354)
This commit is contained in:
@@ -40,9 +40,9 @@
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.11.1",
|
||||
"@babel/runtime": "^7.11.2",
|
||||
"@polkadot/keyring": "^3.1.0-beta.4",
|
||||
"@polkadot/util": "^3.1.0-beta.4",
|
||||
"@polkadot/util-crypto": "^3.1.0-beta.4",
|
||||
"@polkadot/keyring": "^3.1.1",
|
||||
"@polkadot/util": "^3.1.1",
|
||||
"@polkadot/util-crypto": "^3.1.1",
|
||||
"@react-native-community/cli-platform-ios": "^4.10.1",
|
||||
"@types/react-test-renderer": "16.9.3",
|
||||
"babel-jest": "^26.2.2",
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
"styled-components": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^3.1.0-beta.4",
|
||||
"@polkadot/util": "^3.1.0-beta.4",
|
||||
"@polkadot/util-crypto": "^3.1.0-beta.4",
|
||||
"@polkadot/keyring": "^3.1.1",
|
||||
"@polkadot/util": "^3.1.1",
|
||||
"@polkadot/util-crypto": "^3.1.1",
|
||||
"@types/react-copy-to-clipboard": "^4.3.0",
|
||||
"@types/react-dom": "^16.9.8",
|
||||
"@types/styled-components": "^5.1.2",
|
||||
|
||||
@@ -29,7 +29,7 @@ function ScanAddress ({ className, onError, onScan, size, style }: Props): React
|
||||
(data: string | null): void => {
|
||||
if (data) {
|
||||
try {
|
||||
const [prefix, content, genesisHash, name] = data.split(':');
|
||||
const [prefix, content, genesisHash, ...name] = data.split(':');
|
||||
const isValidPrefix = prefix === ADDRESS_PREFIX || prefix === SEED_PREFIX;
|
||||
|
||||
assert(isValidPrefix, `Invalid prefix received, expected '${ADDRESS_PREFIX}/${SEED_PREFIX}' , found '${prefix}'`);
|
||||
@@ -40,7 +40,7 @@ function ScanAddress ({ className, onError, onScan, size, style }: Props): React
|
||||
decodeAddress(content);
|
||||
}
|
||||
|
||||
onScan({ content, genesisHash, isAddress, name });
|
||||
onScan({ content, genesisHash, isAddress, name: name?.length ? name.join(':') : undefined });
|
||||
} catch (error) {
|
||||
console.error('@polkadot/react-qr:QrScanAddress', (error as Error).message, data);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"react-native": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/util-crypto": "^3.1.0-beta.4",
|
||||
"@polkadot/util-crypto": "^3.1.1",
|
||||
"@types/react-native": "^0.63.5"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
"store": "^2.0.12"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^3.1.0-beta.4",
|
||||
"@polkadot/types": "^1.28.0-beta.3",
|
||||
"@polkadot/util": "^3.1.0-beta.4",
|
||||
"@polkadot/keyring": "^3.1.1",
|
||||
"@polkadot/types": "^1.29.0-beta.0",
|
||||
"@polkadot/util": "^3.1.1",
|
||||
"@types/ledgerhq__hw-transport-node-hid": "^4.22.1",
|
||||
"@types/ledgerhq__hw-transport-webusb": "^4.70.0",
|
||||
"@types/mkdirp": "^1.0.1",
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"store": "^2.0.12"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/util": "^3.1.0-beta.4",
|
||||
"@polkadot/util": "^3.1.1",
|
||||
"@types/store": "^2.0.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
"@polkadot/util-crypto": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/util": "^3.1.0-beta.4",
|
||||
"@polkadot/util-crypto": "^3.1.0-beta.4",
|
||||
"@polkadot/util": "^3.1.1",
|
||||
"@polkadot/util-crypto": "^3.1.1",
|
||||
"@types/color": "^3.0.1",
|
||||
"@types/xmlserializer": "^0.6.0"
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"vue": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/util-crypto": "^3.1.0-beta.4",
|
||||
"@polkadot/util-crypto": "^3.1.1",
|
||||
"vue": "^2.6.11"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user