Skip to content

Commit 3110515

Browse files
committed
feedback
1 parent fbaee01 commit 3110515

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

packages/bitcore-client/src/storage.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,7 @@ export class Storage {
163163
let open = true;
164164
for (const key of keys) {
165165
const { path } = key;
166-
let { pubKey } = key;
167-
pubKey = pubKey || new BitcoreLib.PrivateKey(key.privKey).publicKey.toString();
166+
const pubKey = key.pubKey || new BitcoreLib.PrivateKey(key.privKey).publicKey.toString();
168167
let payload = {};
169168
if (pubKey && key.privKey && encryptionKey) {
170169
const toEncrypt = JSON.stringify(key);

packages/bitcore-client/src/wallet.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -630,9 +630,8 @@ export class Wallet {
630630

631631
async signTx(params) {
632632
const { tx, keys, passphrase, signingKeys, changeAddressIdx } = params;
633-
let { utxos } = params;
634-
if (!utxos) {
635-
utxos = [];
633+
const utxos = params.utxos || [];
634+
if (!utxos.length) {
636635
await new Promise<void>((resolve, reject) => {
637636
this.getUtxos()
638637
.pipe(new ParseApiStream())

0 commit comments

Comments
 (0)