You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each property in state has two pieces of metadata that must be specified. This instructs the client how to treat that property:
110
110
111
+
-`includeInDebugLogs` - Informs the client whether to include the property in debug state logs attached to Sentry events (`true`) or not (`false`). We must exclude any data that could potentially be personally identifying here, and we often also exclude data that is large and/or unhelpful for debugging.
112
+
-`includeInStateLogs` - Informs the client whether to include the property in state logs downloaded by users (`true`) or not (`false`). We must exclude any sensitive data that we don't want our support team to have access to (such as private keys). We include personally-identifiable data related to on-chain state here (we never collect this data, and we have a disclaimer about this in the UI when users download state logs), but other types of personally identifiable information must still be excluded.
111
113
-`persist` — Informs the client whether the property should be placed in persistent storage (`true`) or not (`false`). Opting out is useful if you want to have a property in state for convenience reasons but you know that property is ephemeral and can be easily reconstructed.
112
-
-`anonymous` — Informs the client whether the property is free of personally identifiable information (`true`) or not (`false`) and can therefore safely be included and sent to error reporting services such as Sentry. When in doubt, use `false`.
114
+
-`usedInUi` - Informs the client whether the property is used in the UI (`true`) or not (`false`). This is used to filter the state we send to the UI to improve performance.
113
115
114
116
A variable named `${controllerName}Metadata` should be defined (there is no need to export it) and passed as the `metadata` argument in the constructor to `BaseController`.
115
117
116
118
```typescript
117
119
const keyringControllerMetadata = {
118
120
vault: {
121
+
// This property can be used to identify a user, so we want to make sure we
122
+
// do not include it in Sentry.
123
+
includeInDebugLogs: false,
119
124
// We don't want to include this in state logs because it contains sensitive key material.
120
125
includeInStateLogs: false,
121
126
// We want to persist this property so it's restored automatically, as we
122
127
// cannot reconstruct it otherwise.
123
128
persist: true,
124
-
// This property can be used to identify a user, so we want to make sure we
125
-
// do not include it in Sentry.
126
-
anonymous: false,
127
129
// This property is only used in the controller, not in the UI.
0 commit comments