Skip to content

Commit

Permalink
Add specific types to ledger functions
Browse files Browse the repository at this point in the history
  • Loading branch information
NullSoldier committed Jan 21, 2025
1 parent 5e5b210 commit af05a06
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ironfish-cli/src/ledger/ledgerMultiSigner.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
import { ACCOUNT_SCHEMA_VERSION, UnsignedTransaction } from '@ironfish/sdk'
import { ACCOUNT_SCHEMA_VERSION, AccountImport, UnsignedTransaction } from '@ironfish/sdk'
import {
IronfishKeys,
KeyResponse,
Expand Down Expand Up @@ -166,12 +166,12 @@ export class LedgerMultiSigner extends Ledger {
await this.tryInstruction((app) => app.dkgRestoreKeys(encryptedKeys))
}

importAccount = async () => {
importAccount = async (): Promise<AccountImport> => {
const identity = await this.dkgGetIdentity(0)
const dkgKeys = await this.dkgRetrieveKeys()
const publicKeyPackage = await this.dkgGetPublicPackage()

const accountImport = {
const accountImport: AccountImport = {
...dkgKeys,
name: 'ledger-multisig',
multisigKeys: {
Expand Down
2 changes: 1 addition & 1 deletion ironfish-cli/src/ledger/ledgerSingleSigner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class LedgerSingleSigner extends Ledger {
return response.publicAddress.toString('hex')
}

importAccount = async () => {
importAccount = async (): Promise<AccountImport> => {
const publicAddress = await this.getPublicAddress()

const responseViewKey: KeyResponse = await this.tryInstruction((app) =>
Expand Down

0 comments on commit af05a06

Please sign in to comment.