--- a/pallets/common/src/lib.rs +++ b/pallets/common/src/lib.rs @@ -297,7 +297,7 @@ /// Item balance not enough. TokenValueTooLow, /// Requested value more than approved. - TokenValueNotEnough, + ApprovedValueTooLow, /// Tried to approve more than owned CantApproveMoreThanOwned, --- a/pallets/fungible/src/lib.rs +++ b/pallets/fungible/src/lib.rs @@ -343,7 +343,7 @@ if allowance.is_none() { ensure!( collection.ignores_allowance(spender), - >::TokenValueNotEnough + >::ApprovedValueTooLow ); } @@ -374,7 +374,7 @@ if allowance.is_none() { ensure!( collection.ignores_allowance(spender), - >::TokenValueNotEnough + >::ApprovedValueTooLow ); } --- a/pallets/nonfungible/src/lib.rs +++ b/pallets/nonfungible/src/lib.rs @@ -494,7 +494,7 @@ if >::get((collection.id, token)).as_ref() != Some(spender) { ensure!( collection.ignores_allowance(spender), - >::TokenValueNotEnough + >::ApprovedValueTooLow ); } @@ -522,7 +522,7 @@ if >::get((collection.id, token)).as_ref() != Some(spender) { ensure!( collection.ignores_allowance(spender), - >::TokenValueNotEnough + >::ApprovedValueTooLow ); } --- a/pallets/refungible/src/lib.rs +++ b/pallets/refungible/src/lib.rs @@ -529,7 +529,7 @@ if allowance.is_none() { ensure!( collection.ignores_allowance(spender), - >::TokenValueNotEnough + >::ApprovedValueTooLow ); } @@ -562,7 +562,7 @@ if allowance.is_none() { ensure!( collection.ignores_allowance(spender), - >::TokenValueNotEnough + >::ApprovedValueTooLow ); } --- a/pallets/unique/src/tests.rs +++ b/pallets/unique/src/tests.rs @@ -601,7 +601,7 @@ 1 ) .map_err(|e| e.error), - CommonError::::TokenValueNotEnough + CommonError::::ApprovedValueTooLow ); // do approve @@ -916,7 +916,7 @@ 4 ) .map_err(|e| e.error), - CommonError::::TokenValueNotEnough + CommonError::::ApprovedValueTooLow ); }); } --- a/tests/src/interfaces/augment-api-errors.ts +++ b/tests/src/interfaces/augment-api-errors.ts @@ -107,7 +107,7 @@ /** * Requested value more than approved. **/ - TokenValueNotEnough: AugmentedError; + ApprovedValueTooLow: AugmentedError; /** * Item balance not enough. **/