()
| 17 | } |
| 18 | |
| 19 | async getKeys() { |
| 20 | const keys = []; |
| 21 | // map keys to UI format |
| 22 | keys.push(...await this.getPublicKeys()); |
| 23 | keys.push(...await this.getPrivateKeys()); |
| 24 | // sort by key type and name |
| 25 | keys.sort((a, b) => { |
| 26 | const compType = a.type.localeCompare(b.type); |
| 27 | if (compType === 0) { |
| 28 | return a.name.localeCompare(b.name); |
| 29 | } else { |
| 30 | return compType; |
| 31 | } |
| 32 | }); |
| 33 | return keys; |
| 34 | } |
| 35 | |
| 36 | getPublicKeys() { |
| 37 | return mapKeys(this.keystore.publicKeys.keys); |
no test coverage detected