Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Commit

Permalink
inject new Uniswap exchange with reinitialize
Browse files Browse the repository at this point in the history
Previously was failing, but due to CI permissioning I wasn't aware of errors
  • Loading branch information
liamzebedee committed Oct 6, 2019
1 parent 05bce0c commit 30cac71
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions implementation/test/integration/UniswapTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ integration('Uniswap', (accounts) => {
const uniswapExchangeAddress = await uniswapFactory.getExchange(tbtcToken.address)
uniswapExchange = await IUniswapExchange.at(uniswapExchangeAddress)

await tbtcSystem.initialize(uniswapExchangeAddress)
await tbtcSystem.reinitialize(uniswapExchangeAddress)

deposit.setExteroriorAddresses(tbtcSystem.address, tbtcToken.address, deployed.ECDSAKeepStub.address)
tbtcSystem.forceMint(accounts[0], web3.utils.toBN(deposit.address))
Expand All @@ -203,13 +203,6 @@ integration('Uniswap', (accounts) => {
assertBalance = new AssertBalanceHelpers(tbtcToken)
})

it('returns false if address(exchange) = 0x0', async () => {
await tbtcSystem.reinitialize('0x0000000000000000000000000000000000000000')

const retval = await deposit.attemptToLiquidateOnchain.call()
expect(retval).to.be.false
})

it('liquidates using Uniswap successfully', async () => {
const ethAmount = web3.utils.toWei('0.2', 'ether')
const tbtcAmount = '100000000'
Expand Down

0 comments on commit 30cac71

Please sign in to comment.