Skip to content

Commit

Permalink
apply standard
Browse files Browse the repository at this point in the history
  • Loading branch information
bitspill committed Mar 11, 2023
1 parent 3fcdc69 commit b16e8cd
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/Account.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { discovery } from './util'
const GAP_LIMIT = 20

const CUSTOM_ADDRESS_FUNCTION = (node, network) => {
return { address: node, network: network }
return { address: node, network }
}

/**
Expand Down Expand Up @@ -539,7 +539,7 @@ class Account {
allAddresses.push(address)
}

return { results: results, addresses: allAddresses }
return { results, addresses: allAddresses }
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/FloTransaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class FloTransaction {
hash,
index,
script: scriptSig || EMPTY_SCRIPT,
sequence: sequence,
sequence,
witness: EMPTY_WITNESS
}) - 1
)
Expand Down Expand Up @@ -1531,7 +1531,7 @@ function getSignersFromHD (inputIndex, inputs, hdKeyPair) {
if (bipDv.masterFingerprint.equals(hdKeyPair.fingerprint)) {
return bipDv
} else {

return undefined
}
})
.filter(v => !!v)
Expand Down
4 changes: 1 addition & 3 deletions src/TransactionBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class TransactionBuilder {
addTo (address, amount) {
if (isValidPublicAddress(address, this.coin.network) && !isNaN(amount)) {
const tmpTo = {
address: address,
address,
value: amount
}
this.to.push(tmpTo)
Expand Down Expand Up @@ -336,8 +336,6 @@ class TransactionBuilder {
await this.account.discoverChain(1)
return
} catch (e) { throw new Error('Unable to Discover Chain \n' + e) }
} else {

}
}

Expand Down
16 changes: 8 additions & 8 deletions src/networks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import raven from './raven'
import ravenTestnet from './ravenTestnet'

module.exports = {
bitcoin: bitcoin,
bitcoinTestnet: bitcoinTestnet,
flo: flo,
floTestnet: floTestnet,
litecoin: litecoin,
litecoinTestnet: litecoinTestnet,
raven: raven,
ravenTestnet: ravenTestnet
bitcoin,
bitcoinTestnet,
flo,
floTestnet,
litecoin,
litecoinTestnet,
raven,
ravenTestnet
}
2 changes: 1 addition & 1 deletion src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ async function discovery (chain, gapLimit, queryPromise, i, coin) {
if (gap >= gapLimit) {
const used = checked - gap

return { used: used, checked: checked, chainIndex: i, addresses: allAddresses }
return { used, checked, chainIndex: i, addresses: allAddresses }
} else {
chain.next()
}
Expand Down
2 changes: 1 addition & 1 deletion test/PurchaseRecord.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ test.skip('Wallet PurchaseRecord', async (done) => {
})
}, 1000000)

test('empty', async () => {})
test('empty', async () => {})

0 comments on commit b16e8cd

Please sign in to comment.