Adjust historic DispatchError type for statemint/statemine (#5303)

This commit is contained in:
Jaco
2022-10-28 12:18:50 +03:00
committed by GitHub
parent 0caae6beb5
commit 3f3c51d652
3 changed files with 14 additions and 2 deletions
+7
View File
@@ -1,5 +1,12 @@
# CHANGELOG
## master
Changes:
- Adjust historic `DispatchError` type for `statemint/statemine`
## 9.6.1 Oct 23, 2022
Contributed:
+3 -1
View File
@@ -15,9 +15,11 @@ function formatFailure (registry: Registry, result: unknown[], { message }: Erro
// ignore
}
// This is extra debugging info (we most-probably want this in in some way, shape or form,
// but at this point not quite sure how to include and format it (it can be quite massive)
// console.error(JSON.stringify(result, null, 2));
return `decodeU8a: failed at ${u8aToHex(u8a.subarray(0, 16))}…${key ? ` on ${key}` : ''} (index ${i}/${count})${type}:: ${message}`;
return `decodeU8a: failed at ${u8aToHex(u8a.subarray(0, 16))}…${key ? ` on ${key}` : ''} (index ${i + 1}/${count})${type}:: ${message}`;
}
/**
+4 -1
View File
@@ -37,7 +37,10 @@ const versioned: OverrideVersionedType[] = [
},
{
minmax: [4, 5],
types: objectSpread({}, sharedTypes, mapXcmTypes('V1'))
types: objectSpread({
// As above, see https://github.com/polkadot-js/api/issues/5301
DispatchError: 'DispatchErrorPre6First'
}, sharedTypes, mapXcmTypes('V1'))
},
{
// metadata V14