Concordium / cryptox-android

CryptoX is a Concordium mobile wallet with an advanced set of features
Apache License 2.0
1 stars 0 forks source link

Include error to invalid ID proofs rejections #22

Closed Radiokot closed 5 months ago

Radiokot commented 5 months ago

Purpose

Include error to invalid WalletConnect ID proof request rejections, so the dApp developer can identify the issue.

Changes

Checklist

linear[bot] commented 5 months ago
WAL2-76 Inconsistent error handling for not well-formed statements

Following statements examples are considered as not well-formed * In case the same attribute is used more than once in a single credential statement. * In case attribute value that is in request was not defined properly (for example countryOfResidence should be ISO3166-1 Alpha 2 code in upper case) * Any attributes with values NULL or N/A In case the statements are not well-formed, proof explorer will get the response as the wallet has canceled the request. While the intent is somewhat ok since we cannot provide proofs on not well-formed statements, proof explorer should receive appropriate error codes/messages so that it can show error in user readable way. **To reproduce:** 1. Open [proof explorer](https://web3id-proof-explorer.testnet.concordium.com/) and connect wallet. 2. Prove nationality in dk,hr 3. Prove **Expected result:** Error message in the proof explorer: [image.png](https://uploads.linear.app/430cc2b6-6b19-45f6-b7f0-6a0093e10c15/24588046-3eb5-4a6b-8641-d2e8b81a38c5/7007c679-d2ab-4dfd-949d-5d7cb19e9a18) **Actual result:** [image.png](https://uploads.linear.app/430cc2b6-6b19-45f6-b7f0-6a0093e10c15/fb9f9245-479e-4be5-959f-6dd458d3999b/8b4184aa-ba41-4989-adb4-db53d6d6694f)