parent
9f8693a33e
commit
919848aecd
1 changed files with 6 additions and 1 deletions
|
|
@ -13,6 +13,7 @@ exports.SUPPORTED_MODULES = ['wallet']
|
||||||
|
|
||||||
const paymentPrefixPath = "m/44'/60'/0'/0'"
|
const paymentPrefixPath = "m/44'/60'/0'/0'"
|
||||||
const defaultPrefixPath = "m/44'/60'/1'/0'"
|
const defaultPrefixPath = "m/44'/60'/1'/0'"
|
||||||
|
let lastUsedNonces = {}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
NAME,
|
NAME,
|
||||||
|
|
@ -99,7 +100,11 @@ function generateTx (_toAddress, wallet, amount, includesFee) {
|
||||||
.then(arr => {
|
.then(arr => {
|
||||||
const gas = arr[0]
|
const gas = arr[0]
|
||||||
const gasPrice = arr[1]
|
const gasPrice = arr[1]
|
||||||
const txCount = arr[2]
|
const txCount = arr[2] <= lastUsedNonces[fromAddress]
|
||||||
|
? lastUsedNonces[fromAddress] + 1
|
||||||
|
: arr[2]
|
||||||
|
|
||||||
|
lastUsedNonces[fromAddress] = txCount
|
||||||
|
|
||||||
const toSend = includesFee
|
const toSend = includesFee
|
||||||
? amount.minus(gasPrice.times(gas))
|
? amount.minus(gasPrice.times(gas))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue