Skip to content

Commit

Permalink
Numbers should padLeft
Browse files Browse the repository at this point in the history
  • Loading branch information
thodges-gh committed May 18, 2020
1 parent a0a18e2 commit c22b70c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/MyContract_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ contract('MyContract', accounts => {

describe('#fulfill', () => {
const expected = 50000
const response = web3.utils.padRight(web3.utils.toHex(expected), 64)
const response = web3.utils.padLeft(web3.utils.toHex(expected), 64)
let request

beforeEach(async () => {
Expand Down Expand Up @@ -111,8 +111,8 @@ contract('MyContract', accounts => {
it('records the data given to it by the oracle', async () => {
const currentPrice = await cc.data.call()
assert.equal(
web3.utils.toHex(currentPrice),
web3.utils.padRight(expected, 64),
web3.utils.padLeft(web3.utils.toHex(currentPrice), 64),
web3.utils.padLeft(expected, 64),
)
})

Expand Down

0 comments on commit c22b70c

Please sign in to comment.