Skip to content

Commit

Permalink
Add kryptokrona utils and crypto
Browse files Browse the repository at this point in the history
  • Loading branch information
n9lsjr committed Feb 19, 2024
1 parent a206c70 commit b07da15
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion utils/wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
const WB = require('kryptokrona-wallet-backend-js')
const files = require('fs/promises')
const log = require('loglevel')
import { Crypto } from 'kryptokrona-utils';
const crypto = new Crypto()

let db = require("../configs/postgresql"),
sequelize = db.sequelize,
Expand Down Expand Up @@ -156,7 +158,7 @@ async function optimizeMessages(nbrOfTxs, fee = 10000, attempt = 0) {
}
if (wallet.getAddresses().length === 1) {
const [spendKey, viewKey] = wallet.getPrimaryAddressPrivateKeys()
const subWalletKeys = await wallet.generateDeterministicSubwalletKeys(spendKey, 1)
const subWalletKeys = await crypto.generateDeterministicSubwalletKeys(spendKey, 1)
await wallet.importSubWallet(subWalletKeys.private_key)
}

Expand Down

0 comments on commit b07da15

Please sign in to comment.