Skip to content

Commit 7439330

Browse files
authored
redact system.NewAccount event (#442)
1 parent 7b565f0 commit 7439330

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for
669669
},
670670
{
671671
"data": {
672-
"account": "FeeVgsArd4tnkvZ9scbcrmbcyfqR4M73xWFUAPWaJ1Z2Df1",
672+
"account": "(redacted)",
673673
},
674674
"method": "NewAccount",
675675
"section": "system",
@@ -1588,7 +1588,7 @@ exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for
15881588
},
15891589
{
15901590
"data": {
1591-
"account": "FeeVgsArd4tnkvZ9scbcrmbcyfqR4M73xWFUAPWaJ1Z2Df1",
1591+
"account": "(redacted)",
15921592
},
15931593
"method": "NewAccount",
15941594
"section": "system",
@@ -1751,7 +1751,7 @@ exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for
17511751
},
17521752
{
17531753
"data": {
1754-
"account": "FeeVgsArd4tnkvZ9scbcrmbcyfqR4M73xWFUAPWaJ1Z2Df1",
1754+
"account": "(redacted)",
17551755
},
17561756
"method": "NewAccount",
17571757
"section": "system",
@@ -1990,7 +1990,7 @@ exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for
19901990
},
19911991
{
19921992
"data": {
1993-
"account": "FeeVgsArd4tnkvZ9scbcrmbcyfqR4M73xWFUAPWaJ1Z2Df1",
1993+
"account": "(redacted)",
19941994
},
19951995
"method": "NewAccount",
19961996
"section": "system",
@@ -2191,7 +2191,7 @@ exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for
21912191
},
21922192
{
21932193
"data": {
2194-
"account": "FeeVgsArd4tnkvZ9scbcrmbcyfqR4M73xWFUAPWaJ1Z2Df1",
2194+
"account": "(redacted)",
21952195
},
21962196
"method": "NewAccount",
21972197
"section": "system",
@@ -2506,7 +2506,7 @@ exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for
25062506
},
25072507
{
25082508
"data": {
2509-
"account": "FeeVgsArd4tnkvZ9scbcrmbcyfqR4M73xWFUAPWaJ1Z2Df1",
2509+
"account": "(redacted)",
25102510
},
25112511
"method": "NewAccount",
25122512
"section": "system",
@@ -2650,7 +2650,7 @@ exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for
26502650
},
26512651
{
26522652
"data": {
2653-
"account": "FeeVgsArd4tnkvZ9scbcrmbcyfqR4M73xWFUAPWaJ1Z2Df1",
2653+
"account": "(redacted)",
26542654
},
26552655
"method": "NewAccount",
26562656
"section": "system",
@@ -2832,7 +2832,7 @@ exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for
28322832
},
28332833
{
28342834
"data": {
2835-
"account": "FeeVgsArd4tnkvZ9scbcrmbcyfqR4M73xWFUAPWaJ1Z2Df1",
2835+
"account": "(redacted)",
28362836
},
28372837
"method": "NewAccount",
28382838
"section": "system",
@@ -3024,7 +3024,7 @@ exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for
30243024
},
30253025
{
30263026
"data": {
3027-
"account": "FeeVgsArd4tnkvZ9scbcrmbcyfqR4M73xWFUAPWaJ1Z2Df1",
3027+
"account": "(redacted)",
30283028
},
30293029
"method": "NewAccount",
30303030
"section": "system",

packages/shared/src/proxy.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,8 +1313,14 @@ async function proxyCallFilteringSingleTestRunner<
13131313
}
13141314

13151315
let redactKeys: RegExp | undefined
1316-
if (['referenda', 'bounties'].includes(proxyAction.pallet)) {
1317-
redactKeys = /^index$/
1316+
switch (proxyAction.pallet) {
1317+
case 'referenda':
1318+
case 'bounties':
1319+
redactKeys = /^index$/
1320+
break
1321+
case 'system':
1322+
redactKeys = /^account$/ // system.NewAccount for the pure proxy address is based on current block
1323+
break
13181324
}
13191325

13201326
await eventChecker

0 commit comments

Comments
 (0)