Skip to content

Commit

Permalink
Fix types for KeyguardCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
sisou committed Dec 1, 2022
1 parent 132b1e4 commit f924f46
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/request/connect/ConnectApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
/* global Errors */

const PermissionKeyguardCommands = [
/** @type {KeyguardRequest.KeyguardCommand} */ ('remove-key'),
/** @type {KeyguardRequest.KeyguardCommand} */ ('export'),
/** @type {KeyguardRequest.KeyguardCommand} */ ('change-password'),
// /** @type {KeyguardRequest.KeyguardCommand} */ ('sign-transaction'), // Already third-party whitelisted in Hub
/** @type {KeyguardRequest.KeyguardCommand} */ ('sign-multisig-transaction'),
// /** @type {KeyguardRequest.KeyguardCommand} */ ('sign-message'), // Already third-party whitelisted in Hub
/** @type {KeyguardRequest.KeyguardCommand} */ ('derive-address'),
/** @type {KeyguardCommand.KeyguardCommand} */ ('remove-key'),
/** @type {KeyguardCommand.KeyguardCommand} */ ('export'),
/** @type {KeyguardCommand.KeyguardCommand} */ ('change-password'),
// /** @type {KeyguardCommand.KeyguardCommand} */ ('sign-transaction'), // Already third-party whitelisted in Hub
/** @type {KeyguardCommand.KeyguardCommand} */ ('sign-multisig-transaction'),
// /** @type {KeyguardCommand.KeyguardCommand} */ ('sign-message'), // Already third-party whitelisted in Hub
/** @type {KeyguardCommand.KeyguardCommand} */ ('derive-address'),
// Bitcoin
/** @type {KeyguardRequest.KeyguardCommand} */ ('sign-btc-transaction'),
/** @type {KeyguardRequest.KeyguardCommand} */ ('derive-btc-xpub'),
/** @type {KeyguardCommand.KeyguardCommand} */ ('sign-btc-transaction'),
/** @type {KeyguardCommand.KeyguardCommand} */ ('derive-btc-xpub'),
// Swap
/** @type {KeyguardRequest.KeyguardCommand} */ ('sign-swap'),
/** @type {KeyguardCommand.KeyguardCommand} */ ('sign-swap'),
];

/** @extends {TopLevelApi<KeyguardRequest.ConnectRequest>} */
Expand Down
1 change: 1 addition & 0 deletions types/Keyguard.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// tslint:disable-next-line no-reference
/// <reference path="./KeyguardRequestNamespace.d.ts" />
/// <reference path="./KeyguardCommand.d.ts" />

interface Newable {
new(...args: any[]): any
Expand Down
4 changes: 4 additions & 0 deletions types/KeyguardCommand.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import * as _KeyguardCommand from '../client/src/KeyguardCommand';

export as namespace KeyguardCommand;
export = _KeyguardCommand;

0 comments on commit f924f46

Please sign in to comment.