Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: tx error strings should not contain multiple consecutive whitespace characters #578

Merged
merged 2 commits into from
Aug 27, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions lib/runTx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,14 @@ async function _runTx(this: VM, opts: RunTxOpts): Promise<RunTxResult> {
throw new Error(
`sender doesn't have enough funds to send tx. The upfront cost is: ${tx
.getUpfrontCost()
.toString()}\
and the sender's account only has: ${new BN(fromAccount.balance).toString()}`,
.toString()}` +
` and the sender's account only has: ${new BN(fromAccount.balance).toString()}`,
)
} else if (!opts.skipNonce && !new BN(fromAccount.nonce).eq(new BN(tx.nonce))) {
throw new Error(
`the tx doesn't have the correct nonce. account has nonce of: ${new BN(
fromAccount.nonce,
).toString()}\
tx has nonce of: ${new BN(tx.nonce).toString()}`,
).toString()} tx has nonce of: ${new BN(tx.nonce).toString()}`,
)
}
// Update from account's nonce and balance
Expand Down