Skip to content

Commit

Permalink
Adjust bondToken signer connection
Browse files Browse the repository at this point in the history
  • Loading branch information
pxrl committed Sep 5, 2023
1 parent fe4608d commit 528943e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/hubpool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ async function dispute(args: Record<string, number | string>, signer: Wallet): P
const avgBlockTime = 12.5; // @todo import
const fromBlock = Math.floor(latestBlock.number - (liveness - avgBlockTime));

const bondToken = WETH9.connect(bondTokenAddress, hubPool.provider).connect(signer);
const bondToken = WETH9.connect(bondTokenAddress, hubPool.provider);
const [bondBalance, decimals, symbol, allowance, proposals] = await Promise.all([
bondToken.balanceOf(signer.address),
bondToken.decimals(),
Expand Down Expand Up @@ -107,7 +107,7 @@ async function dispute(args: Record<string, number | string>, signer: Wallet): P

if (allowance.lt(bondAmount)) {
console.log(`Approving ${network} HubPool @ ${hubPool.address} to transfer ${symbol}.`);
const approval = await bondToken.approve(hubPool.address, MaxUint256);
const approval = await bondToken.connect(signer).approve(hubPool.address, MaxUint256);
console.log(`Approval: ${approval.hash}...`);
await approval.wait();
}
Expand Down

0 comments on commit 528943e

Please sign in to comment.