Skip to content

Commit

Permalink
Merge pull request smartcontractkit#2 from smartcontractkit/fix-0-pad…
Browse files Browse the repository at this point in the history
…ding

Numbers should padLeft
  • Loading branch information
thodges-gh authored May 19, 2020
2 parents a0a18e2 + c22b70c commit 5ec2a6e
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 5ec2a6e

Please sign in to comment.