-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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 rounding issue when sending max tokens #5695
Conversation
9d20640
to
27738ee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small comments but otherwise this looks good to me
const tokenBalanceAmount = await findElement(driver, By.css('.transaction-view-balance__token-balance')) | ||
assert.equal(await tokenBalanceAmount.getText(), '43 TST') | ||
const tokenBalanceAmount = await findElement(driver, By.css('.transaction-view-balance__primary-balance')) | ||
assert.equal(await tokenBalanceAmount.getText(), '43\nTST') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could use \s
here in a regular expression, similar to how we have below:
await driver.wait(until.elementTextMatches(balance, /0\s*BAT/))
toDenomination: denomination, | ||
}) | ||
|
||
displayValue = propsDisplayValue || formatCurrency(convertedValue, toCurrency) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we inline convertedValue
could we write this as a single cost displayValue
statement without the conditional?
494f19b
to
3536bde
Compare
@@ -11,6 +11,9 @@ import { | |||
import SendHeader from './send-header/' | |||
import SendContent from './send-content/' | |||
import SendFooter from './send-footer/' | |||
import BigNumber from 'bignumber.js' | |||
|
|||
window.BigNumber = BigNumber |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need to put BigNumber
on window
? I'm guess this was just for local development/testing purposes?
3536bde
to
48d9ad7
Compare
I made a PR against this branch to fix a minor issue: alextsg#2 |
@danjm Merged your PR and noticed that tests were failing due to number inputs. Why was it necessary to remove the |
Fixes #5180. |
573d1c2
to
23ae1a4
Compare
Fixes #5682