Commit 7daadb1
authored
feat(keyring-snap-bridge): add missing static
Old v1 keyrings used to have this `static` field too.
NOTE: Current v2 wrappers are using the v1 legacy type, and that's
something we might want to change in the future. But the `SnapKeyring`
v2 is different from those, since it is not wrapping any existing
keyring, so we can use a v2 type here.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Small API surface addition with no behavior change to account or
signing flows.
>
> **Overview**
> Adds **`static readonly type`** on v2 **`SnapKeyring`**, set to
**`KeyringType.Snap`** alongside the existing instance **`type`** field.
This restores the same class-level type identifier pattern legacy v1
snap keyrings exposed, so callers can read the keyring kind without
instantiating the class.
>
> Tests assert both **`SnapKeyring.type`** and **`keyring.type`**
resolve to **`KeyringType.Snap`**. The package changelog records the
addition under **Unreleased**.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
49fb77c. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->SnapKeyring.type (v2) (#570)1 parent aed086a commit 7daadb1
3 files changed
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
95 | 104 | | |
96 | 105 | | |
97 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
| 118 | + | |
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
| |||
0 commit comments