Skip to content

Commit 5508672

Browse files
authored
Update Polkadot E2E proxy snapshots (#347)
* Update Polkadot `CancelProxy` test Follows from github.com/polkadot-fellows/runtimes/pull/740 having taken effect on Polkadot after the latest runtime upgrade. * Update Polkadot snapshots
1 parent 69b3c92 commit 5508672

File tree

2 files changed

+75
-17
lines changed

2 files changed

+75
-17
lines changed

packages/polkadot/src/__snapshots__/polkadot.proxy.e2e.test.ts.snap

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1743,6 +1743,25 @@ exports[`Polkadot Proxy > filtering tests for permitted proxy calls > allowed pr
17431743
]
17441744
`;
17451745

1746+
exports[`Polkadot Proxy > filtering tests for permitted proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet multisig, call as_multi 1`] = `
1747+
[
1748+
{
1749+
"data": {
1750+
"result": {
1751+
"Err": {
1752+
"Module": {
1753+
"error": "0x00000000",
1754+
"index": 30,
1755+
},
1756+
},
1757+
},
1758+
},
1759+
"method": "ProxyExecuted",
1760+
"section": "proxy",
1761+
},
1762+
]
1763+
`;
1764+
17461765
exports[`Polkadot Proxy > filtering tests for permitted proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = `
17471766
[
17481767
{
@@ -1762,6 +1781,57 @@ exports[`Polkadot Proxy > filtering tests for permitted proxy calls > allowed pr
17621781
]
17631782
`;
17641783

1784+
exports[`Polkadot Proxy > filtering tests for permitted proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch 1`] = `
1785+
[
1786+
{
1787+
"data": {},
1788+
"method": "BatchCompleted",
1789+
"section": "utility",
1790+
},
1791+
{
1792+
"data": {
1793+
"result": "Ok",
1794+
},
1795+
"method": "ProxyExecuted",
1796+
"section": "proxy",
1797+
},
1798+
]
1799+
`;
1800+
1801+
exports[`Polkadot Proxy > filtering tests for permitted proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch_all 1`] = `
1802+
[
1803+
{
1804+
"data": {},
1805+
"method": "BatchCompleted",
1806+
"section": "utility",
1807+
},
1808+
{
1809+
"data": {
1810+
"result": "Ok",
1811+
},
1812+
"method": "ProxyExecuted",
1813+
"section": "proxy",
1814+
},
1815+
]
1816+
`;
1817+
1818+
exports[`Polkadot Proxy > filtering tests for permitted proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call force_batch 1`] = `
1819+
[
1820+
{
1821+
"data": {},
1822+
"method": "BatchCompleted",
1823+
"section": "utility",
1824+
},
1825+
{
1826+
"data": {
1827+
"result": "Ok",
1828+
},
1829+
"method": "ProxyExecuted",
1830+
"section": "proxy",
1831+
},
1832+
]
1833+
`;
1834+
17651835
exports[`Polkadot Proxy > filtering tests for permitted proxy calls > allowed proxy calls for Governance > events for proxy type Governance, pallet bounties, call propose_bounty 1`] = `
17661836
[
17671837
{

packages/shared/src/proxy.ts

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -814,15 +814,11 @@ async function buildAllowedProxyActions<
814814
...proxyActionBuilder.buildUtilityAction(),
815815
])
816816
.with('CancelProxy', () => {
817-
const actions = [...proxyActionBuilder.buildProxyRejectAnnouncementAction()]
818-
819-
// TODO: `utility` and `system` calls should be callable by cancel proxies, but on Polkadot, this is
820-
// currently not the case. Kusama has already had a runtime upgrade with this.
821-
// PR: https://github.com/polkadot-fellows/runtimes/pull/740
822-
if (!['polkadot'].includes(chainName)) {
823-
actions.push(...proxyActionBuilder.buildUtilityAction())
824-
actions.push(...proxyActionBuilder.buildMultisigAction())
825-
}
817+
const actions = [
818+
...proxyActionBuilder.buildProxyRejectAnnouncementAction(),
819+
...proxyActionBuilder.buildUtilityAction(),
820+
...proxyActionBuilder.buildMultisigAction(),
821+
]
826822

827823
return actions
828824
})
@@ -1002,14 +998,6 @@ async function buildDisallowedProxyActions<
1002998
...proxyActionBuilder.buildSystemAction(),
1003999
]
10041000

1005-
// TODO: `utility` and `system` calls should be callable by cancel proxies, but on Polkadot, this is
1006-
// currently not the case. Kusama has already had a runtime upgrade with this.
1007-
// PR: https://github.com/polkadot-fellows/runtimes/pull/740
1008-
if (['polkadot'].includes(chainName)) {
1009-
actions.push(...proxyActionBuilder.buildUtilityAction())
1010-
actions.push(...proxyActionBuilder.buildMultisigAction())
1011-
}
1012-
10131001
return actions
10141002
})
10151003

0 commit comments

Comments
 (0)