Skip to content

Commit

Permalink
Swap wordsToSpendingKey for spendingKeyToWords (#3246)
Browse files Browse the repository at this point in the history
  • Loading branch information
dguenther authored Feb 1, 2023
1 parent 5e3463a commit 3e48c3e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ironfish-cli/src/commands/wallet/export.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 { wordsSpendingKey } from '@ironfish/rust-nodejs'
import { spendingKeyToWords } from '@ironfish/rust-nodejs'
import { ErrorUtils } from '@ironfish/sdk'
import { CliUx, Flags } from '@oclif/core'
import fs from 'fs'
Expand Down Expand Up @@ -57,10 +57,13 @@ export class ExportCommand extends IronfishCommand {
const response = await client.exportAccount({ account })
let output
if (flags.language) {
output = wordsSpendingKey(response.content.account.spendingKey, LANGUAGES[flags.language])
output = spendingKeyToWords(
response.content.account.spendingKey,
LANGUAGES[flags.language],
)
} else if (flags.mnemonic) {
const language = await selectLanguage()
output = wordsSpendingKey(response.content.account.spendingKey, language)
output = spendingKeyToWords(response.content.account.spendingKey, language)
} else {
output = JSON.stringify(response.content.account, undefined, ' ')
}
Expand Down

0 comments on commit 3e48c3e

Please sign in to comment.