From 34163115ac804c624b3b9b9a3148b1d67342136b Mon Sep 17 00:00:00 2001
From: Hugo Trentesaux <hugo@trentesaux.fr>
Date: Tue, 16 Jan 2024 18:55:31 +0100
Subject: [PATCH] update metadata

---
 docs/api/runtime-errors.md       | 109 +++++++------------------------
 pallets/duniter-wot/src/tests.rs |   4 +-
 resources/metadata.scale         | Bin 129125 -> 128356 bytes
 3 files changed, 25 insertions(+), 88 deletions(-)

diff --git a/docs/api/runtime-errors.md b/docs/api/runtime-errors.md
index 03b5c31fb..a93c10f6f 100644
--- a/docs/api/runtime-errors.md
+++ b/docs/api/runtime-errors.md
@@ -1,6 +1,6 @@
 # Runtime errors
 
-There are **185** errors from **35** pallets.
+There are **176** errors from **35** pallets.
 
 <ul>
 <li>System - 0
@@ -740,126 +740,56 @@ This account is not allowed to claim UDs.
 <li>
 <details>
 <summary>
-<code>NotEnoughCertsToClaimMembership</code> - 0</summary>
-Insufficient certifications received to claim membership.
+<code>NotEnoughCerts</code> - 0</summary>
+Insufficient certifications received
 </details>
 </li>
 <li>
 <details>
 <summary>
-<code>DistanceIsInvalid</code> - 1</summary>
-Distance is invalid.
+<code>TargetStatusInvalid</code> - 1</summary>
+Target status is incompatible with this operation
 </details>
 </li>
 <li>
 <details>
 <summary>
-<code>DistanceNotEvaluated</code> - 2</summary>
-Distance is not evaluated.
-</details>
-</li>
-<li>
-<details>
-<summary>
-<code>DistanceEvaluationPending</code> - 3</summary>
-Distance evaluation has been requested but is still pending
-</details>
-</li>
-<li>
-<details>
-<summary>
-<code>DistanceEvaluationNotRequested</code> - 4</summary>
-Distance evaluation has not been requested
-</details>
-</li>
-<li>
-<details>
-<summary>
-<code>IdtyNotAllowedToClaimMembership</code> - 5</summary>
-Identity is not allowed to claim membership.
-</details>
-</li>
-<li>
-<details>
-<summary>
-<code>IdtyNotAllowedToRenewMembership</code> - 6</summary>
-Identity not allowed to renew membership.
-</details>
-</li>
-<li>
-<details>
-<summary>
-<code>IdtyCreationPeriodNotRespected</code> - 7</summary>
+<code>IdtyCreationPeriodNotRespected</code> - 2</summary>
 Identity creation period not respected.
 </details>
 </li>
 <li>
 <details>
 <summary>
-<code>NotEnoughReceivedCertsToCreateIdty</code> - 8</summary>
+<code>NotEnoughReceivedCertsToCreateIdty</code> - 3</summary>
 Insufficient received certifications to create identity.
 </details>
 </li>
 <li>
 <details>
 <summary>
-<code>MaxEmittedCertsReached</code> - 9</summary>
+<code>MaxEmittedCertsReached</code> - 4</summary>
 Maximum number of emitted certifications reached.
 </details>
 </li>
 <li>
 <details>
 <summary>
-<code>NotAllowedToChangeIdtyAddress</code> - 10</summary>
-Not allowed to change identity address.
-</details>
-</li>
-<li>
-<details>
-<summary>
-<code>NotAllowedToRemoveIdty</code> - 11</summary>
-Not allowed to remove identity.
-</details>
-</li>
-<li>
-<details>
-<summary>
-<code>IssuerNotMember</code> - 12</summary>
+<code>IssuerNotMember</code> - 5</summary>
 Issuer cannot emit a certification because it is not member.
 </details>
 </li>
 <li>
 <details>
 <summary>
-<code>CertToUnconfirmed</code> - 13</summary>
-Cannot issue a certification to an unconfirmed identity
-</details>
-</li>
-<li>
-<details>
-<summary>
-<code>CertToRevoked</code> - 14</summary>
-Cannot issue a certification to a revoked identity
-</details>
-</li>
-<li>
-<details>
-<summary>
-<code>IdtyNotFound</code> - 15</summary>
+<code>IdtyNotFound</code> - 6</summary>
 Issuer or receiver not found.
 </details>
 </li>
 <li>
 <details>
 <summary>
-<code>NotEnoughCertsReceivedToRequestDistanceEvaluation</code> - 16</summary>
-Not enough certs received to request distance evaluation.
-</details>
-</li>
-<li>
-<details>
-<summary>
-<code>MembershipRenewalPeriodNotRespected</code> - 17</summary>
+<code>MembershipRenewalPeriodNotRespected</code> - 7</summary>
 Membership can only be renewed after an antispam delay
 </details>
 </li>
@@ -1127,35 +1057,42 @@ Caller not member.
 <li>
 <details>
 <summary>
-<code>TargetIdentityNotFound</code> - 7</summary>
+<code>CallerStatusInvalid</code> - 7</summary>
+
+</details>
+</li>
+<li>
+<details>
+<summary>
+<code>TargetIdentityNotFound</code> - 8</summary>
 Target identity not found.
 </details>
 </li>
 <li>
 <details>
 <summary>
-<code>QueueFull</code> - 8</summary>
+<code>QueueFull</code> - 9</summary>
 Evaluation queue is full.
 </details>
 </li>
 <li>
 <details>
 <summary>
-<code>TooManyEvaluators</code> - 9</summary>
+<code>TooManyEvaluators</code> - 10</summary>
 Too many evaluators in the current evaluation pool.
 </details>
 </li>
 <li>
 <details>
 <summary>
-<code>WrongResultLength</code> - 10</summary>
+<code>WrongResultLength</code> - 11</summary>
 Evaluation result has a wrong length.
 </details>
 </li>
 <li>
 <details>
 <summary>
-<code>DistanceRequestOnlyAllowedForUnvalidated</code> - 11</summary>
+<code>TargetMustBeUnvalidated</code> - 12</summary>
 Targeted distance evaluation request is only possible for an unvalidated identity
 </details>
 </li>
diff --git a/pallets/duniter-wot/src/tests.rs b/pallets/duniter-wot/src/tests.rs
index fc4f4df0e..f1718d140 100644
--- a/pallets/duniter-wot/src/tests.rs
+++ b/pallets/duniter-wot/src/tests.rs
@@ -298,7 +298,7 @@ fn test_idty_membership_expire() {
         // Alice can't certify revoked identity
         assert_noop!(
             Cert::add_cert(RuntimeOrigin::signed(1), 1, 3),
-            pallet_duniter_wot::Error::<Test>::CertToRevoked
+            pallet_duniter_wot::Error::<Test>::TargetStatusInvalid
         );
 
         run_to_block(21);
@@ -399,7 +399,7 @@ fn test_certification_expire() {
         // Alice can not claim her membership because she does not have enough certifications
         assert_noop!(
             Membership::try_add_membership(1),
-            pallet_duniter_wot::Error::<Test>::NotEnoughCertsToClaimMembership
+            pallet_duniter_wot::Error::<Test>::NotEnoughCerts
         );
 
         // --- BLOCK 23 ---
diff --git a/resources/metadata.scale b/resources/metadata.scale
index 5908806517d61badcdd60a81e867552b7a21ea01..4f75555d61b51bfad4efd4f2d66048694ccefb78 100644
GIT binary patch
delta 308
zcmaF*f&IxV_J%EtToED)7Jm69u6g;T=^4(cMJ2@y3@j6->qjuEsQQE?7Nw__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